Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Passing multiple values for a single parameter in Reporting Services

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.

like image 692
Scott and the Dev Team Avatar asked Feb 04 '09 16:02

Scott and the Dev Team


People also ask

How do you pass multiple values in one parameter?

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)

What is multi value parameter in SSRS report?

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.

How do you pass multiple value parameters to subreport in SSRS?

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.


1 Answers

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>) 
like image 177
Ed Harper Avatar answered Sep 21 '22 06:09

Ed Harper