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!

Supress - what is wrong with my formula 1

Status
Not open for further replies.

BCarol

Technical User
Feb 14, 2002
23
AU
This is what I want:

Code:
(CurrentFieldValue = 0 and {testH.UHEAD3_13} ="") or ({test1.ctotid} IN ['O','C'] and {test1.REP} IN ['No','Nc','NC'])

However, it suppresses everything.

if I use the first part, i.e.:
Code:
(CurrentFieldValue = 0 and {testH.UHEAD3_13} ="")
it works OK.
How do I enter my formula so that Crystal reports is happy?

(I am using CR9).
 
You've probably hit a null - formulas fail if a null is encountered.

To check, separate each test out in its own formula field, e.g.
Code:
{test1.ctotid} IN ['O','C']
Put each of these besides the data and check that it shows 'True' or 'False'. If it shows as blank you have hit a null and should do an IsNull test before checking for other values.

Once you have the tests working correclty, you can use them anywhere by just entering the name, e.g.
Code:
Boolian1 or (Boolian2 and Boolian3)

It helps to give your Crystal version - 8, 8.5, 9, 10, 11 or whatever. Methods sometimes change between versions, and higher versions have extra options. In this case, it probably makes no difference.

[yinyang] Madawc Williams (East Anglia, UK). Using Crystal 10 & 11.5 with Windows XP [yinyang]
 
Thanks for the information that a formula fails if a null is encountered.

Most helpful.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top