Search code examples
wpfreporting-servicesssrs-2008reportparameter

Pass integer type parameters to ssrs Reports


I have a report with integer parameters and while passing the parameters from WPF client to ReportParameter object, it gives an error:

"The best overloaded method match for 'Microsoft.Reporting.WinForms.ReportParameter.ReportParameter(string, string[])' has some invalid arguments".

How can I pass an integer type parameter to my SSRS report from my WPF client?


Solution

  • you should not use toString() to pass values to a integer parameter.

    The ideal for parameters being passed from outside the report is set them as "Text". You dont even have to cast them (to integer in your case) on the dataset. For example, if you have a ID parameter like this:

    where ID=@ID
    

    you can create it as text and pass it as a parameter from the URL like if it were a text