Passing a Report Parameter within a URL

SQL Server & BI

Hi Friends,

We all know how to access a report using the Report Manager (the web application which gets installed with Reporting Services). You can also access your reports using the web service which is also installed during installation of Reporting Services. The URL to access the web service is:

/ReportServer">http://<ServerName>/ReportServer

This means, suppose you have a report by the name of Employee Sales Report, you can access/run the report using the web service URL:

http://server/reportserver?/Sales/Northwest/Employee Sales Report&rs:Command=Render

And most interestingly, you can also pass parameters using the URL. Lets take an example: suppose your report has 6 parameters. A business user spends 15 minutes in supplying the right parameter values to get a desired output. He wants his colleagues to use the same values so that all of them get the same output. Sending an email to all the users with the parameter values they should put will be time-consuming. Every user has to manually put all the parameter values again to see the output.

Instead, you can just send the complete URL with parameter values concatenated in the URL itself. Suppose the above report takes EmployeeID as a parameter; you can run the report in the following way:

http://server/reportserver?/Sales/Northwest/Employee Sales Report&rs:Command=Render&EmployeeID=1234

This is good. URL access functionality in SSRS is very powerful and there are many tweaks that can be implemented. See books online for more details.

Leave a Reply

Allowed tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>