12

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?

3 Answers 3

22
({i_NonPfcIncDetStt.TeamCode} IN ['ABC','DEF']) perhaps?
0
4

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.

1

This works too:

Month({Person.Date}) IN [7,8]

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.