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

Using OR in formula

Status
Not open for further replies.

bernie321

Programmer
Jan 7, 2004
477
GB
Hi

I have the below formula:

{DateTable.LastDate} < DateAdd ('D', (0-{?Days}), CurrentDate)
OR
ISNULL({DateTable.LastDate}) = TRUE

The ISNULL code works on its own but not in this selection formula with the date add row.

Any advice on this matter would be great.

Thanks B
 
You should always check for NULLs first as Crystal will return NULL as soon as it encounters NULL in a formula.

ISNULL({DateTable.LastDate})
OR
{DateTable.LastDate} < DateAdd ('D', (0-{?Days}), CurrentDate)

~Brian
 
Thanks Brian

Its been driving me crazy I didnt think about execution order.

Cheers B
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top