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!

Record Selection

Status
Not open for further replies.

sharvey90

Technical User
Apr 20, 2004
18
US
GM 6.0
Crystal 8.5

I need to know how I would phrase the following for my record selection formula,

{CONTACT2.USTOPSRVDT} is not empty

This is what I have but I don't think Crystal is recognizign "IS NULL"
{CONTACT2.USTOPSRVDT} = '' OR
{CONTACT2.USTOPSRVDT} <= ' ' OR
{CONTACT2.USTOPSRVDT} IS NOT NULL

Thanks in advance.
 
try not(isnull({CONTACT2.USTOPSRVDT}))

This is straight from Crystal Help.

Fred
 
As fredp1 says, the command is
Code:
isnull({whatever})

You also need to put the null test first, because Crystal will stop when it finds a null, even if there are instructions later on about how null values should be handled.

Madawc Williams
East Anglia, Great Britain
 
You could set the option

'Convert Database NULL Values to Default'

File Menu -> Report Options

This will convert any null sstrings to '' amking your test

{CONTACT2.USTOPSRVDT} = '' OR
{CONTACT2.USTOPSRVDT} = ' ' OR

you could also simplify this with

Trim({CONTACT2.USTOPSRVDT}) = ''

N.B.

Check the SQL to make sure the Trim function is passed to the database as this could impact on performance if processed locally.

HTH


Gary Parker
MIS Data Analyst
Manchester, England
 
You could also try

Len(Trim({CONTACT2.USTOPSRVDT})) <> 0

this would allow you to leave the 'Convert Database NULL Values to Default' unchecked but again check if the Len() and Trim() functions are passed to the database.

HTH


Gary Parker
MIS Data Analyst
Manchester, England
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top