Use multi-value parameter as a filter example #1
There are a few ways to filter a dataset used in an SSRS report using a multi-value parameter. One approach is to pass the parameter value to the query used in the dataset to filter the dataset. This approach is explained in another post.
If the SSRS dataset is not based upon a query, but instead a stored procedure, passing the multi-valued parameter to the stored procedure is possible, but more tricky. To accomplish this, please refer to this associated post.
Yet another approach is to return all of the data from the query or stored procedure, but then filter the dataset or table with an SSRS based filter. This would seem straightforward, and it is, but you must reference the multi-valued parameter like the below to get it to work as expected.
Suppose you have a multi valued parameter, @ItemGroup.
- Right mouse click on either the dataset or tablix and choose properties.
- In the properties dialog box, select filters.
- Choose to add a filter.
- In the Expression drop down list, select the dataset field for which the multi-valued parameter should apply.
- Select “In” from the Operator drop down list.
- Type in the Value field the parameter name in brackets preceded by an @ symbol. For example [@ItemGroup].
- Press OK
The dataset or tablix data will now be filtered to the values selected by the user.