Quantcast
Channel: SQL Server Reporting Services FAQ
Viewing all articles
Browse latest Browse all 158

SQL Server Reporting Services FAQ

$
0
0

Question 15: How to enable the Select All option for a multi-value parameter?

 

Problem:

 

When a user defines an available values list for a multi-value parameter, a Select ALL option on the report parameter drop-down list automatically appears. However, if you don’t want to make the parameter multi-value, how to enable the Select All option for the query parameter?

 

Solution:

 

Since the single-value query parameter does not provide the Select All option, you cannot query the data without any limitations. Sometimes, the end user may want to ignore the condition for the parameterized query. In this case, you can add the "Select All" option to the parameter dataset by using SQL statement.

 

Here are the detailed steps:

 

  1. Create a dataset for the parameter using the following query string:

 

SELECT ‘ALL’

UNION ALL

SELECT Field from table

 

  1. Edit your base dataset query:

 

The original query:

… AND Field=@Parameter…

Change it to this:

…AND (( Field=@Parameter ))OR(@Parameter=’ALL’))…

 

  1. Set the report parameter.

 

1) Set the available values as the field created in Step 1.

2) Set the default value of parameter to All.


Microsoft Online Community Support

Viewing all articles
Browse latest Browse all 158

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>