Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>There are several answers on SO related to passing multi-valued parameters to a dataset query in SSRS. See this --> <a href="https://stackoverflow.com/questions/512105/passing-multiple-values-for-a-single-parameter-in-reporting-services">Passing multiple values for a single parameter in Reporting Services</a>. </p> <p>I wasn't able to reproduce the scenario you described (choosing one value works, but ALL values don't work). However, I implemented one of the answers from the link above (Minks) using SQL Server 2008 as the data source. Below are the details:</p> <p>I have a parameter named @ReportParameter1 that is populated from the following Dataset query (Value field = id, Label field = description):</p> <pre><code>select 1 as id, 'choice1' as description union select 2 as id, 'choice2' as description union select 3 as id, 'choice3' as description union select 4 as id, 'choice4' as description </code></pre> <p>Then I have my report Dataset query as:</p> <pre><code>select * from (select 1 as id union select 2 as id union select 3 as id union select 4 as id) x where id in (@ReportParameter1) </code></pre> <p>Under the Parameters tab for the report Dataset, I have the following expression set for @ReportParameter1:</p> <pre><code>=Split(Join(Parameters!@ReportParameter1.Value,","),",") </code></pre> <p>If I choose ALL values for @ReportParameter1, then the query effectively becomes:</p> <pre><code>select * from (select 1 as id union select 2 as id union select 3 as id union select 4 as id) x where id in (1,2,3,4) </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload