Reporting Services (SSRS) Multi Value Parameter (Integer Type )


There is an easy way to setup a report integer type multiple value parameter without helper function or T-SQL manipulation.
From the Report Parameter Properties:

Check the parameter (ids for example) to allow multiple values

From Dataset Property:

Set the parameter value with this experission:

=Parameters!ids.Value

(The following works with built-in functions)

=Split(CStr(Join(Parameters!ids.Value,”,”)),”,”)

The WHERE clause in query part looks like this

WHERE id IN (@ids)
–other condition …
Of course, you can use Filter from Dataset Property section to do the same with small dataset. (remove the parameter from the WHERE clause).

Advertisements


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s