I was trying to filter the crystal report by using the IN operator like what we do in SQL. In crystal report, i was trying to do it the same way as something like this ({i_NonPfcIncDetStt.TeamCode} IN ('ABC','DEF')) but it's giving me error, "The ) is mising".
Any idea how can i do this in crystal report?
The comparison operators are equal (=), not equal (<>), less than (<), less than or equal (<=), greater than (>) and greater than or equal (>=).
({i_NonPfcIncDetStt.TeamCode} IN ['ABC','DEF']) perhaps?
Yep, use the brackets not parens.
For fancy, you can put the to-match strings in a delimited string variable, and then use SPLIT.
@toMatchList
"ABC,DEF,MDV,HLV,ILY,TLA,OMG,LOL,GOD,ETC"
({i_NonPfcIncDetStt.TeamCode} in Split(@toMatchList, ","))
For extra-fancy, you can do pattern matching.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With