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!

crystal rep and null dates 1

Status
Not open for further replies.

johnjrd

MIS
Jun 6, 2001
54
GB
Help

Does anyone know why crystal turns null value dates into the default date. i.e In all my blank date fields im getting the value 30/12/1899. The source db's are foxpro v6. Is there a way of sorting this out or will i have to put formulaes on all my data fields and format how to handle null values

thanks
 
There are two options - one at the report level, one at the Crystal Level - That automatically convert null values to default values.

At the report level, click on file, report options, and look at the checkbox for "convert null field values to default". This would change the settings for this report ONLY.

To globally set this option, click on file, Options, Reporting tab, Convert Null field values to default.

I am pretty sure that if you change your global options, it does not change existing reports. Maybe someone else knows the answer to this one? I'm just walking out the door or I would test it. Software Support for Sage Mas90, Macola, Crystal Reports and Goldmine
 
It sets the date at 31/12/1899 because this is the first date in the calender. The calender is treated like an array, with base element 0, '31/12/1899' in this case. I would suggest formatting your date field with a formula;

if field is null then date = sysdate

I have had the same problem in Delphi, and this is how I solved it. Sorry not to have a magical solution.

Martin
 
I agree with DGillz. Crystal is showing a default value ONLY because one of the options, Report or Global, is telling it to do so.

Also, there are several date fields that you definately do not want crystal to populate with the system date -- i.e. date shipped on an unshipped order, etc.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top