SSRS使用查询字符串进行报告

时间:2015-03-12 03:15:38

标签: reporting-services

我无法通过将参数作为查询字符串传递来访问SSRS报告。它不会产生任何结果。我确实尝试使用& rs:par1 = value或者使用& rc:传递参数。

SSRS报告也包含空格。提供所有报告列表的网址如下:http://ipaddress:port/Reports/Pages/Folder.aspx?ItemPath=%2fMyfolder

点击任何报告http://ipaddress:port/Reports/Pages/Report.aspx?ItemPath=%2fMyfolder%2fReused+Report+v2

我确实看过.rdl文件&尝试后缀参数,如& rs:par1 = value或& rc:par1 = value但没有效果。

出了什么问题?

2 个答案:

答案 0 :(得分:0)

您需要使用reportServer网址(http://ipaddress:port/Reportserver)而不是报告管理器网址(http://ipaddress:port/Repors)和框架网址

http://hostname:portnumber/ReportServer?/AdventureWorks 2008R2 / Employee_Sales_Summary_2008R2& ReportMonth = 3& ReportYear = 2008

答案 1 :(得分:0)

.cshtml

<iframe id="frmReport" src="ReportURL" frameborder="0"  scrolling="no">

控制器(GET方法)

 ReportURL = String.Format("../../Report/WebForm.aspx?Param1Name={0}&Param2Name={1}",Param1Value, Param2Value);

WebForm.aspx.cs页面

包含--->(using ReportParameter = Microsoft.Reporting.WebForms.ReportParameter;

    ReportParameter[] param = new ReportParameter[2];

param[0] = new ReportParameter("Param1Name", Request["Param1Name"].ToString());

param [1] = new ReportParameter(“ Param2Name”,Request [“ Param2Name”]。ToString());

 ReportViewer1.ServerReport.SetParameters(param);