如何在 WPF 中设置 SSRS 报告的 ReportParameter 值
How to SET ReportParameter Value of SSRS Report in WPF
我试图在不使用 Microsoft 报表查看器组件的情况下使用从 WPF UI 传递的参数在 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);
引发以下错误...
The Best Overload method match for 'Microsoft.reporting.Winform.Report.Setparameters(Microsoft.Reporting.Winform.ReportParameter)' has Some Invalid Argument.
如何解决这个问题?谁能帮我。?提前致谢...
SetParameters method requires an IEnumerable,不是你的数组
我试图在不使用 Microsoft 报表查看器组件的情况下使用从 WPF UI 传递的参数在 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);
引发以下错误...
The Best Overload method match for 'Microsoft.reporting.Winform.Report.Setparameters(Microsoft.Reporting.Winform.ReportParameter)' has Some Invalid Argument.
如何解决这个问题?谁能帮我。?提前致谢...
SetParameters method requires an IEnumerable,不是你的数组