简体   繁体   中英

Filter by Multi Value Parameter in SSRS

I need to filter my report( in the report itself not in the database side) based on multivalue paramater

I tried

Fields!MyField.Value IN Parameters!MyParm.Value

Fields!MyField.Value IN Join(Parameters!MyParm.Value, ",")

Fields!MyField.Value = Parameters!MyParm.Value

Fields!MyField.Value = Join(Parameters!MyParm.Value, ",")

Fields!MyField.Value LIKE Parameters!MyParm.Value

Fields!MyField.Value LIKE Join(Parameters!MyParm.Value, ",")

non works

How to do that?!

in the filter screen there is IN 在此处输入图片说明

There are a few options. I do think the easiest is so close to one of yours:

Fields!MyField.Value IN (@ParamNameHere)

See https://www.mssqltips.com/sqlservertip/2866/sql-server-reporting-services-using-multivalue-parameters/

“,” + join(Parameters!ParamNameHere.Value,“,”)像“ ,” + cstr(Fields!myValue.Value)+“,

If its not working you can try to build the filter a bit different. Add the following filter. Just replace the Values with your parameter values:

'Expression
=Fields!MyField.Value = "Value1" Or Fields!MyField.Value = "Value2"
'Format
Boolean
'Value
True

Now it displays just Value1 and Value2 in the tablix

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM