IN operator in Crystal Report

风格不统一 提交于 2019-12-30 04:49:22

问题


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?


回答1:


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



回答2:


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.



来源:https://stackoverflow.com/questions/6788743/in-operator-in-crystal-report

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!