我需要将一个值作为参数从 ASP.Net 应用程序传递到 SSRS 报告。我该怎么做?有人可以帮助我吗?
提前致谢。
最佳答案
按照下面的行试一试...
ReportViewer1.ServerReport.ReportServerUrl = new System.Uri("http://MyPC/reportserver");
ReportViewer1.ServerReport.ReportPath = "/ReportFolder/Reportname";
Microsoft.Reporting.WebForms.ReportParameter[] Param = new Microsoft.Reporting.WebForms.ReportParameter[3];
Param(2) = new Microsoft.Reporting.WebForms.ReportParameter("SDATE", "02/02/2002");
Param(1) = new Microsoft.Reporting.WebForms.ReportParameter("EDATE", "09/06/2000");
Param(0) = new Microsoft.Reporting.WebForms.ReportParameter("TASK", 0);
View.ReportViewer.ShowParameterPrompts = false;
View.ReportViewer.ServerReport.SetParameters(Param);
View.ReportViewer.ServerReport.Refresh();
关于c# - 如何将参数从 ASP.NET 传递到 SSRS 报告?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3155215/