C1FlexReport No value given for parameter

Posted by: elogsdon on 1 December 2020, 5:54 am EST

  • Posted 1 December 2020, 5:54 am EST

    I a currently working on a prototype of a report using C1FlexReport in WPF. The report is a simple log dump with some filtering criteria. One of the parameters is a multi-value integer. There are several other parameters in the report that are strings and multi-value strings. This is the only parameter that is contains integers.

    When I run the report I get the message "[ERROR]: No value given for one or more required parameters." at the bottom of the report. If I click on the C1ReportViewer button to show the parameters and exception is thrown "Unable to cast object of type 'System.Int32[]' to type 'System.IConvertible'."

    The parameter causing the issue is EventCodes. If I re-work the report to remove that parameter the report runs and renders correctly.

    I am not sure what is causeing the cast error. The parameter value in my c# code is defined as int[] _eventCodes = { 0, 1 };

    I have attached a zip file containing the c# code (the MVVM view model and view), the report file and the Cast Exception stack trace.

    Thank you,
    EricCast Exception.zip
  • Replied 1 December 2020, 5:56 am EST

    I also attached a screenshot of a watch of the parameter in question.
  • Replied 3 December 2020, 10:11 pm EST

    Hello,

    I am not able to replicate the issue by creating the similar situation in the stripped down sample. Please refer to the attached application for the same. Could you please provide the dummy application with dummy db so that I can able to run the report at my end.

    Thanks,
    Mohit

    WpfApp3.zip
  • Marked as Answer

    Replied 4 December 2020, 3:28 am EST

    Mohit,
    I resolved the problem by deleting the query from the datasource and rebuilding it with the query builder.

    Thanks,
    Eric.
Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels