This is a really good article on multivalued parameters in a stored procedure. Very good read for SQL Server Reporting Services.
In SSRS reports we can have multi valued paremeters, which means we can select multiple values for that parameter and based on all those selected values result in the report is shown. We can write the SQL query to pass those parameter’s values and populate the data set, but sometimes it is required or to optimize the performance we need to use the stored procedure instead of direct sql query. This stored procedure will be taking the report paremeter as input and returing the result set to populate the data set.
In case of sql query as well as stored procedure, all selected values of the multi-value parameter will be passed as ‘,’ (comma) separated. So we should use IN clause in WHERE to impose the desired condition.
Problem: If we use stored procedure passing an input parameter which is multi-value parameter, SSRS will take all those selected multiple values…
View original post 398 more words