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

Overriding the 2000 compliant date to show dummy date

Status
Not open for further replies.

SJW78

Technical User
Oct 29, 2008
9
CA
The database that Crystal Reports (version 12.1.2.996) is connected to contains blank/null dates as 0001-01-01, however Crystal converts 0001 to 2001 (2000 compliant date). Therefore any blank date in our database is reflected in Crystal Reports has 2001-01-01. We are not able to just treat the 2001-01-01 date as a blankdate because there might be valid data with the date of 2001-01-01.
Can someone please advise if there is a way to identify the blank dates in Crystal Reports or if we can get these dates to show as the dummy date of 0001-01-01?

Any assistance would be GREATLY appreciated.

Thanks!
 
Test what happens if you use formula

@Year
Year(yourdatefield)

If that returns 1 for your nulls you can use that to suppress in crystal

Format field in suppress formula

Year(yourdatefield) = 1
 
In file->report options, if you uncheck "convert nulls to default values", does your date field appear null when placed on the report? If so, you can convert the date in a formula like this:

if isnull({table.date}) then
date(0,0,0) else
{table.date}

Or you could change date(0,0,0) to some later date, like date(2999,9,9).

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top