Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Scheduling fails when Date = 1900/01/01 Post Reply Post New Topic
Author Message
achaithanya
Newbie
Newbie
Avatar

Joined: 19 Jul 2007
Location: India
Online Status: Offline
Posts: 10
Quote achaithanya Replybullet Topic: Scheduling fails when Date = 1900/01/01
    Posted: 03 Nov 2009 at 10:54pm

Hi,

I have a requirement like this
 
if {?Date} = Date (1900, 01, 01) then current date
                                                     else {?Date}.
 
I have added this condition in record selection formulae. I ran this report and it works fine.
 
When i try to schedule and {?Date} is current date then i'm not able to see any data in my report.
 
if i manually provide any date it runs well even while scheduling.
It fails only during scheduling and when the {?Date}= Date(1900, 01, 01).
 
if anyone has come across such issue can let me know...
 
 
Thanks in advance,
achaithanya.
 
Chaitu
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4372
Quote lockwelle Replybullet Posted: 04 Nov 2009 at 6:22am
wouldn't you want something like:
 
if {?Date} = Date (1900, 01, 01) then
  currentDate = {table.field}
else
  {?Date}={table.field}
 
just wondering
 
1/1/1900 is basically 0 for a datetime field in SQL server. Perhaps that is part of the issue. Could the values be NULL in the DB and the report is converting them to their 'default' value?


Edited by lockwelle - 04 Nov 2009 at 6:24am
IP IP Logged
achaithanya
Newbie
Newbie
Avatar

Joined: 19 Jul 2007
Location: India
Online Status: Offline
Posts: 10
Quote achaithanya Replybullet Posted: 04 Nov 2009 at 6:59am

Hi Lockwelle,

Default date which would be displayed is 01/01/1900. If the user doesn't select a date then it should automatically take the current date.

I have used the same formulae which you have mentioned over here in my report (Record selection formulae).

We are using DB2 database.

 
achaithanya.
Chaitu
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.017 seconds.