4
votes

I am using crystal report 2008 version and i need to write formula for a date parameter.

In some case datetime will come null value from db. That time i need to show a blank space in the same report fileld. So how can we write the formula for this using crystal report formula editor

Thanks in advance

1
Crystal Reports usually displays blank itself, if underlying value is null. What it does display for you?Arvo
Now its displaying '12/30/1899 12:00:00AM' , i need to check like if(date=='12/30/1899 12:00:00AM') then ' ' else date... Please do an help.Jidheesh Rajan
That means that you have checked "convert null values to default" in report options. Easiest formula would be "if year(datefield)=1899 then '' else cstr(datefield)".Arvo
@Arvo Even easier would be to just uncheck the "convert null values to default" optionRyan
@Ryan: Yes, but depend on report contents and selection formulas this may create new interesting effects :) Probably not in this case however.Arvo

1 Answers

1
votes

you can write sql codes as select isnull(datefield,''), col1,col2 from table...