导航

【HOW】如何通过URL给Reporting Services报表传递参数

Posted on 2013-12-30 18:14  FryFish  阅读(524)  评论(0编辑  收藏  举报

【本地模式Reporting Services】

参见官方文档:http://msdn.microsoft.com/en-us/library/ms154042.aspx

示例:http://servername/reportserver?/SampleReports/Employee%20Sales%20Summary&rs:Command=Render&rs:format=HTML4.0
 

【SharePoint集成模式Reporting Services】

可通过如下两种方式给Reporting Services报表通过URL传递参数:

方法一:向RSViewerPage及Report Viewer Web Part传递参数

示例:http://{SharePointServer}/_layouts/ReportServer/RSViewerPage.aspx?rv:RelativeReportUrl={ReportRelativeUrl}&rp:param1=param1_value&rp:param2=param2_value

方法二:向HTML Viewer Page传递参数

示例:http://{SharePointServer}/_vti_bin/ReportServer?{ReportPositiveUrl}&rs:Command=Render&param1=param1_value&param2=param2_value
注意:如上方式中要传递报表URL的绝对路径。

另,关于Reporting Services预定义的参数名称,参见:

http://technet.microsoft.com/en-us/library/ms152835(v=sql.105).aspx
http://technet.microsoft.com/en-us/library/ms155395(v=sql.105).aspx
 
参考:http://techpunch.wordpress.com/2008/09/17/sql-server-reporting-services-url-parameters-in-sharepoint-integrated-mode/