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

Suppress if A or Supress if B

Status
Not open for further replies.

SDS100UK

MIS
Jul 15, 2001
185
GB
Hi,

Could someone please give the code that says:
If fieldA = "cat" or fieldB = "dog" or fieldC = "Pig" then. . . .

I know how to do this in VB but do not understand Crystal Syntax.

Thanks very much

Steven
 
Hi Steven,

You put your answer in your question!
If your formula doesn't work as it stands try adding brackets to force it to calculate the or's correctly.

If (({fieldA} = "cat") or ({fieldB} = "dog")) or
({fieldC} = "Pig"))
then "It is a cat or a dog or a pig!!"
else "It is not!!"

Hth,
Geoff
 
Hi Steven,

If it is a suppression formula you just need...


(({fieldA} = "cat") or ({fieldB} = "dog")) or
({fieldC} = "Pig")

Geoff

Ps. Only one close bracket should be after "Pig"
The second bracket was a mistake!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top