I am trying to Call SSRS Report in WPF with Parameter Passing From WPF UI without using Microsoft Report Viewer Component. I Used the following Code for Passing Parameter to SSRS Report...
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);
But, the Last Statement...
rpt.SetParameters(reportParameterCollection);
raise the following error...
The Best Overload method match for 'Microsoft.reporting.Winform.Report.Setparameters(Microsoft.Reporting.Winform.ReportParameter)' has Some Invalid Argument.
How Can I Solve this issue? Can Anyone help Me.? Thanks in advance...