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 MikeeOK on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem With Todays Date

Status
Not open for further replies.

Lseveron

Technical User
Feb 4, 2002
4
AU
Hiya,

I am currently having a problem running certin reports over
Today this only happens to reports where I have changed the Date-Time Field to a Date field under the Report Options. this problem never used to occur when running CR8 although what is happening through Crystal Enterprise is a little weird if I run the report from the 14th to the 14th (Todays Date) The Report Headers and some other items appear but no actual data is shown, if I Run the Report from the 14th (Today) and the 15th (Tommorow) all of todays data appears in the report as I would like it to. running a report on say the 13th to the 13th results in all the data being shown correctly I've changed a Couple of reports over to the Date-Time Field and they work fine on todays date.

As you can probably tell I have no Idea on whats going on here and if anyone could give me an explination or awnser that means I don't have to change all the reports it would be a huge help

Thanxs

Adam
 
Where did you do the DateTime conversion? In the Report Options, or Options, or both?

It sounds as if you only changed it in Report Options - but you can confirm whether or not that's true. If you're still having a problem, an example of your selection criteria wouldn't go unappreciated.

Naith
 
What usually happens in this scenario is that the SQL that is getting created is passing a DateTime value derived from your date value. So, when you select tomorrow it is using a time of 00:00:00 (or midnight) instead of 23:59:59. So anything with a real time is out of the range.

But, that doesn't fit with your experience on the 13th. One workaround, if you can't get the SQL to be correct, is to always add one day to the criteria. I also seem to remember a KB article about this issue.
Ken Hamady, On-site Custom Crystal Reports Training & Consulting
Public classes and individual training.
Guide to using Crystal in VB
tek@kenhamady.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top