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!

Select dates that are null

Status
Not open for further replies.

tmunson99

MIS
Jun 18, 2004
62
US
I am fairly new to Crystal Reports although I use T-SQL on a regular basis. Can anyone tell me what the syntax is for selecting records that have a null value for a particular date field? I don't see anything in the select expert that would give me the option of selecting null values. The closest I could come was

not ({EComp.EmDateEnd} in AllDatesToToday)

but that didn't return any records and I know there are records. Thanks!
 
I have a SQL file that has the field email. In QUERY ANALYZER the following statement returns 528 rows:

select * from customerlist where email is null and lastvisit >='10/08/2005'

But in Crystal Reports 9, the following statement in my record selection formula:

{CustomerList.LASTVISIT} in {?Date Range} and
IsNull ({CustomerList.EMAIL})

Returns no records. Even if I remark out the "IsNull" section I see 804 records.

Why can't I see NULL RECORDS?
 
You might want to go to file->report options and make sure that "convert null values to default" is not checked.

-LB
 
Check to see that they are truly null, and not space filled:

Length({YourDateField})

If this returns a value other than zero, you have a problem.

Software Sales, Training, Implementation and Support for Macola, eSynergy, and Crystal Reports
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top