[英]how to check if a string value exists in ReportParameter list c#
[英]How to SET ReportParameter Value of SSRS Report in WPF
我正在尝试使用WPF UI中传递的参数调用WPF中的SSRS报告,而不使用Microsoft Report Viewer组件。 我使用以下代码将参数传递给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)”的最佳重载方法匹配具有一些无效的参数。
我该如何解决这个问题? 谁能帮我。? 提前致谢...
SetParameters方法需要一个IEnumerable ,而不是一个数组
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.