我正在寻找有关通过 VB.NET 和 ASP.NET 以编程方式将参数传递给 SSRS 报告的一些帮助。这似乎应该是一件相对简单的事情,但我没有太多运气在这方面找到帮助。
有没有人对去哪里寻求帮助有任何建议,或者甚至是一些示例代码?
谢谢。
最佳答案
您可以执行以下操作:(它既适用于 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
关于asp.net - 如何以编程方式将参数传递给 SSRS 报告,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/368766/