SSRS Pass Parameter via URL

走远了吗. 提交于 2019-12-23 18:32:15

问题


I have the following report URL:

/Reports/Pages/Report.aspx?ItemPath=%2fcMIS%2fgradebookProfileView

I'm trying to pass the parameter TG via the URL so it looks like so:

/Reports/Pages/Report.aspx?ItemPath=%2fcMIS%2fgradebookProfileView&TG=10BEE%20C

However this doesn't work, how can I make this work so that it automatically enters 10BEE C into the parameter textbox.


回答1:


You can't use the /Reports/ front end to pass parameters, you have to use the web services end point to pass the parameter (normally at /ReportServer/). It should still present the Report Viewer interface just like it does on the Reports url.

But your URL would become:

/ReportServer/Pages/ReportViewer.aspx?%2fcMIS%2fgradebookProfileView&rs:Command=Render&TG=10BEE+C

Two things of note. The URL parameter name must match the report parameter name, not the prompt. Also, spaces are encoded to + instead of %20.



来源:https://stackoverflow.com/questions/20003663/ssrs-pass-parameter-via-url

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!