【发布时间】:2016-08-23 12:34:39
【问题描述】:
我正在尝试通过从 WPF UI 传递参数而不使用 Microsoft Report Viewer 组件在 WPF 中调用 SSRS 报告。我使用以下代码将参数传递给 SSRS 报告...
Microsoft.Reporting.WebForms.ReportParameter[] reportParameterCollection = new Microsoft.Reporting.WebForms.ReportParameter[1]; //Array size describes the number of paramaters.
reportParameterCollection[0] = new Microsoft.Reporting.WebForms.ReportParameter();
reportParameterCollection[0].Name = "OfficeCode";
reportParameterCollection[0].Values.Add(cmbOfficeName.SelectedValue.ToString().Trim());
rpt.SetParameters(reportParameterCollection);
但是,最后的陈述......
rpt.SetParameters(reportParameterCollection);
引发以下错误...
“Microsoft.reporting.Winform.Report.Setparameters(Microsoft.Reporting.Winform.ReportParameter)”的最佳重载方法匹配有一些无效参数。
我该如何解决这个问题?谁能帮我。?提前谢谢...
【问题讨论】:
标签: .net wpf c#-4.0 reporting-services ssrs-2008-r2