Avatar of rayrover00
Flag for United States of America

asked on 

Crystal Reports XI - syntax question If, then else

I have this as code in a formula:

if {brptPRRegister;1.EarnCode} in [125, 126, 401] then ""
else {brptPRRegister;1.EarnCode}

what I want is for the result of this field NOT to include 125, 126 or 401, but everything else. The
field {brptPRRegister;1.EarnCode} is a number type.

The error I get is the part after the "else" gets highlighted and says a string is required here. Am I even writing this properly to get what I want?

Crystal Reports

Avatar of undefined
Last Comment

8/22/2022 - Mon