Passing multi-value report parameters to SSRS using the URL querystring

Passing parameters to reports in SSRS using the URL can be really helpful, especially when you want to link to a report with some of the data aleady filled out. We had an email alert that some accounts in active directory were incorrect, and we wanted a way to link to a report that provided some additional detail for those accounts. Querystring parameters aren’t very well documented (and I couldn’t find anything on multi-value parameters), and I hope this saves you some time if you’re in the same situation.

There’s a pretty good reference on Technet, but it’s got some gaps (for me, the biggest was even mentioning multi-value/multi-select parameters). The basic syntax is pretty straightforward – normally, a report is called with a URL like the following:

http://YourSsrsServer/Reports/Some%20Folder/YourReportName

From there, you can select the parameters and run the report. To provide a link to the report with the parameters already filled out (if they’re blank or if you gnat to override the defaults), just append this to the end of the URL:

?ReportParam1=SomeValue&ReportParam2=SomeOtherValue

You can pass any type of parameter with this same syntax – text, datetime, integer, float, or boolean (use Yes/No). Your full url would look like this:

http://YourSsrsServer/Reports/Some%20Folder/YourReportName?ReportParam1=SomeValue&ReportParam2=SomeOtherValue

To do a multi-value parameter, you repeat the name of the parametr to provide it multiple values:

http://YourSsrsServer/Reports/Some%20Folder/YourReportName?ReportMultiParam=SomeValue&ReportMultiParam=SomeOtherValue

If this is the only parameter on the report and it doesn’t need any other user input, the report will automatically execute because it has everything it needs. If you want the report to wait for the user to hit “View Report”, you need to leave at least one parameter empty.

Two quick notes if you’re having trouble:

  • Use the parameter name, not the prompt text. If your parameter is called “Office” but the prompt says “Which office?”, use “Office”. Parameter names aren’t always intuitive and you may need to open the report in Visual Studio to get these names if you can’t guess them.
  • In the same way, you need to use the field’s value, not the label. If the dropdown contains the full name of the office, but the value behind the list is the office number, you’ll need to provide the numbers on the querystring.

Good luck!

4 thoughts on “Passing multi-value report parameters to SSRS using the URL querystring”

  1. Refreshing to see an article that discusses things that others don’t seem to explain.
    Do you know a source where the right syntax is mentioned?
    In my report parameter I need to filter on ‘All Details’ and I read the space needs to be substituted with ‘+’ but that doesn’t work if I use that in the URL.
    Have been making an excel file to convert plain text to the SSRS URL syntax so that users have a ‘template’ for their reports instead of having to fill in all parameter on each use.

    1. I haven’t seen the + used before – have you tried either putting a space or a %20 in the URL instead of a space? I’ve done it with spaces before, though I don’t have an SSRS instance handy to confirm – I would think you could just include that text in the URL querystring without any issues.

    1. To have it generate the file in Excel format automatically, you can just add “&rs:Format=excel” (without the quotes) to the end of the query string and it will automatically download an XLSX file.

Leave a Reply

Your email address will not be published. Required fields are marked *

Why ask?