I am trying to add a very simple suppression formula to my Crystal Report (XI) field but it is not working as expected. I would like a text box to be visible if certain conditions are met, otherwise suppress. With the suppress box ticked my current formula is below:
= "V1" or <> "V2" or PageNumber > 1
If any combination of 1, 2 or all 3 of the conditions are met then display the text (neither field1 nor field2 ever return null ). However Crystal Reports is only evaluating the first line of the formula; if field1 = V2 then the field does not show. Any assistance would be most appreciated.
asked Mar 5, 2015 at 20:39 184 2 2 gold badges 2 2 silver badges 19 19 bronze badgesIts a bit confusing but try below way.
if you are trying to meet all 3 conditions then you need to write that first because if any of the one condition is met first then control will never reach to statisying all 3 conditions and after that your regular conditions to satisy each one.
so your formula would be:
If ( = "V1" and <> "V2" and PageNumber > 1) then false //don't Supress when all are met else if = "V1" Then false //field1 is met so don't supress else if <> "V2" then false //field2 is met don't supress else if PageNumber > 1 then false //3rd condition is met don't supress else true //Supress anything as all conditions were failed