how to using IN operator in ssrs expression

我的梦境 提交于 2020-01-16 05:47:04

问题


First of all sorry about my english. I want to use in ssrs in tablix-fields expresion something like this:

=iif(CStr(Fields!Id.Value) in Split(Parameters!IdListStr.Value, ","), Fields!Sum, "")

where Parameters!IdListStr.Value = "1,2,3".

is it possible?


回答1:


You can add the filter on the dataset using the below values,

 Expression := Fields!Id.Value
 Operator := In
 Value:= Split(Parameters!IdListStr.Value, ",")

And if you dont want to filter out the records from the dataset then you an use the below expression

= IIF(Array.IndexOf(Parameters!IdListStr.Value, Fields!Id.Value) > -1,Fields!Sum.Value,Nothing)


来源:https://stackoverflow.com/questions/28432312/how-to-using-in-operator-in-ssrs-expression

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