Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

PrintDate function help needed. 1

Status
Not open for further replies.

stormtrooper

Programmer
Apr 2, 2001
266
CA
Hi there. I have a report in which it was scheduled to run yesterday (Aug.23). Now when I go and print it out today, the PrintDate still says "Aug.23". Isn't it supposed to spit out "Aug.24"? If not, is there a way around this?

Thanks
 
You need to refresh the report if you wish to update the rendered information.

hth,
- Ido

CUT, Visual CUT, and DataLink Viewer:
view, e-mail, export, burst, distribute, and schedule Crystal Reports.
 
Okay, things are getting a little strange for me. I want the DataDate to remain "Aug.23" but PrintDate to be "Aug.24". Now, when refreshed, they both change. This is CR9 by the way. I'm actually wondering if this is changing my data?!
 
PrintDate is the date you queried the database UNLESS you manually set it to something else using the Report, Set Print Date option.

DataDate is always the date you queried the database (except for a minor bug in CR 10 whereby it actually matches the PrintDate if you refresh).

hth,
- Ido

CUT, Visual CUT, and DataLink Viewer:
view, e-mail, export, burst, distribute, and schedule Crystal Reports.
 
This is exactly what's happening, the PrintDate and DataDate are both showing "Aug.24" after the refresh eventhough the report was run yesterday. What I would expect is the DataDate to be "Aug.23" and the PrintDate to be "Aug.24". Does that make sense?
 
I think you should get Aug.24 without a refresh. I checked a report I ran yesterday (saved with data, CR 8.0) that has both print date and data date on it, and upon opening the report (without a refresh), the print date read 8/24/04 and the data date was 8/23/04. This is behavior that I regularly see.

-LB
 
This matches the expected behavior. The DataDate reflects the time the database was queries for the report (which was yesterday). PrintDate is currentdate UNLESS you manually set it (using the Report, Set Print Date option).

When you refresh, the database gets queried again so the DataDate gets updated to the current date. The only way to keep PrintDate to a prior date (not CurrentDate) is to set it manually. The only way to keep DataDate to a prior date is to not refresh the report (except for a CR 10 bug where DataDate gets set to the PrintDate upon refresh).

hth,
- Ido

CUT, Visual CUT, and DataLink Viewer:
view, e-mail, export, burst, distribute, and schedule Crystal Reports.
 
lbass: From my understanding, this is what is expected like you said. But for some reason my report displays both the PrintDate and the DataDate as "Aug.23". This is without refreshing the report. And when I do refresh the report, I get "Aug.24" for both dates. I've checked the fields and they are indeed PrintDate and DataDate.

Ido: I fully understand how the DataDate and PrintDates work, with and without refresh. I'm just boggled as to when I don't refresh that the PrintDate stays the same as the DataDate ("Aug/23").
 
Stromtrooper: I'm with you, this has ALWAYS annoyed me.

A Print date implies to most that the date indicates when the report was actually printed, not when it was displayed. I believe that printdate equates to display date, not the actual printing.

-k
 
I guess I'll just have to reword things in my report to compensate.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top