I'm trying to pass a parameter via the url to SSRS and it appears not to work!
I'm trying to pass a userId (string) via the url which will be passed to the database and used by the query.
base url: http://blah/Reports/Pages/Report.aspx?ItemPath=MyReport
tried this but it doesn't work: http://blah/Reports/Pages/Report.aspx?ItemPath=MyReport&UserId=fred
Any ideas
I've just solved this problem myself. I found the solution on MSDN: http://msdn.microsoft.com/en-us/library/ms155391.aspx.
The format basically is
Try changing "Reports" to "ReportServer" in your url
Try changing "Reports" to "ReportServer" in your url. For that just access this
http://host/ReportServer/
and from there you can go to the report pages. There append your parmaters like this&<parameter>=<value>
For more detailed information:
http://dobrzanski.net/2008/08/11/reporting-services-problem-with-passing-parameters-directly-in-the-url/
https://www.mssqltips.com/sqlservertip/1336/pass-parameters-and-options-with-a-url-in-sql-reporting-services/
Try passing multiple values via url:
This should work.
I solved a similar problem by passing the value of the available parameter in the URL instead of the label of the parameter.
For instance, I have a report with a parameter named viewName and the predefined Available Values for the parameter are: (labels/values) orders/sub_orders, orderDetail/sub_orderDetail, product/sub_product.
To call this report with a URL to render automatically for parameter=product, you must specify the value not the label.
This would be wrong: http://server/reportserver?/Data+Dictionary/DetailedInfo&viewName=product&rs:Command=Render
This is correct: http://server/reportserver?/Data+Dictionary/DetailedInfo&viewName=sub_product&rs:Command=Render
As well as what Shiraz said, try something like this:
Note the path would only work if you are in a single folder. When I have to do this I simply browse to the report using the reportserver path ("reports" is the report manager) and copy the url then add
&<ParameterName>=<value>
to the end.