Hi @LH ,
- Pass the multi-value parameter to the stored procedure as a comma-separated string by setting the parameter expression in the SSRS Dataset Properties: =JOIN(Parameters!ClientCountry.Value,",")
2) If you need to use a different delimiter, like a Pipe delimiter, Please change =JOIN(Parameters!ClientCountry.Value,",")
to =JOIN(Parameters!ClientCountry.Value,"|")
, and change the stored procedure to use a where clause like this:
Where prod.Color in (Select value from string_split(@Color,'|') where RTRIM(value)<>'')
That is, it uses string_split to split the passed value into a table, then selects from that table and checks for membership with 'in'.
3) Since SQL Server 2016, you can use built-in functions for this.
4) We cannot call the stored procedure in Text query, please select "Stored Procedure" in the dataset query type.
Please refer to the following article : SSRS : How to pass multi-value Parameter to a Stored Procedure.
Best Regards,
Joy
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.