I have several Multi-Select parameters in my report. I am trying to find a way to pass in multiple values for a single parameter in the web query string? If I pass in a single value, it works fine.
The report runs fine selecting multiple choices for a single param. My trouble lies in the web query string.
My logic to solve this problem:Pack the values into one string with comma separated. Set the string as parameter and pass it into the SQL statement. Unpack the values and insert the values into a table, Where customerid in (select id from #temp)
The SSRS Multi Value Parameter allows the users to select More than one value from a list, and filter the Report data using the user-selected values. Or, SSRS Multi Value Parameter enables the users to to Filter the Reports using more than one value Dynamically.
What can be done to support sending all values of the parameter to the sub report? Use the JOIN function to combine all the values into a single string that you can pass. An expression that concatenates all the values in the array of a multivalued parameter of type String into one string.
Although John Sansom's solution works, there's another way to do this, without having to use a potentially inefficient scalar valued UDF. In the SSRS report, on the parameters tab of the query definition, set the parameter value to
=join(Parameters!<your param name>.Value,",")
In your query, you can then reference the value like so:
where yourColumn in (@<your param name>)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With