问题
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