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

Check for NULL in Date field

Status
Not open for further replies.

rf222

Programmer
Jan 29, 2004
94
0
0
US
I have a problem in Crystal, hope maybe you know the answer. When I test for null in Crystal using isnull(CBDate) it returns false, even if the value is null in the database. I think Crystal is doing something to date data type. Please advise. Thanks.
 
You could try:

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

-LB
 
hi
Create a formula you can have N/A displayed or a blank space just replace "N/A" with " "
@ValidDate
if
isnull({your_date_field})
then
"N/A"
else
{your_date_field}


you will get something like this

07/02/2004
N/A
07/30/2004
and so on

cheers

pg

pgtek
 

When a field is empty from the data base some times you don't know which value crystal read. In order to avoid this problem you should give a default value depending of the data type activating the option "Convert to NULL field value to default". This option is in File\Report Options .


Lorein....
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top