Lun*_*ens 14 vb.net asp.net reporting-services
我正在寻找一些帮助,通过VB.NET和ASP.NET以编程方式将参数传递给SSRS报告.这似乎应该是一个相对简单的事情,但我没有太多运气找到帮助.
有没有人有任何建议去哪里获得帮助,甚至可能是一些示例代码?
谢谢.
Abr*_*mon 15
您可以执行以下操作:(它在本地报告中同样适用于Full Blown SSRS报告.但在完整模式下,使用适当的类,参数部分保持不变)
LocalReport myReport = new LocalReport();
myReport.ReportPath = Server.MapPath("~/Path/To/Report.rdlc");
ReportParameter myParam = new ReportParameter("ParamName", "ParamValue");
myReport.SetParameters(new ReportParameter[] { myParam });
// more code here to render report
Run Code Online (Sandbox Code Playgroud)
Hec*_*Mac 11
如果可以直接访问报表服务器,则可以在使用URL访问repoort时在Querystring中传递参数:
HTTP:// MyServer的/的ReportServer/MyReport&RS:COMMAND =渲染&参数1 = 54321&参数2 =产品
您可以通过在URL的末尾添加以下内容来添加输出格式:
&RS:格式= Excel中
要么
&RS:格式= PDF