passing parameter to JSViewer openReport()

Posted by: hafiz.hassan on 22 April 2021, 7:54 pm EST

  • Posted 22 April 2021, 7:54 pm EST

    AR15 JSViewer API documentation contains below function:
    openReport(reportID: string, reportParameters?: Array<Parameter>)

    However, I get 'Internal server error' when I try to pass parameter.
    Below is my code:
     <script type="text/javascript">
    var viewer = GrapeCity.ActiveReports.JSViewer.create({
    element: '#viewer-id',
    displayMode: 'Continuous',
    reportService: {
    url: 'api/reporting',
    settings: {
    zoomType: 'FitPage'

    function buttonA()
    viewer.openReport("MyReport.rdlx", [{ name: 'param1', values: '12' }]);
  • Marked as Answer

    Replied 25 April 2021, 1:22 am EST


    Try to use the following code:
    viewer.openReport("RdlReport1.rdlx", [{ name: 'Test', values: ['Test'] }]);

  • Replied 15 July 2021, 2:37 am EST

    Hi, i have the same issue, when i send the parameters to openReport, i obtain this error message from the Backend..
    The JSON value could not be converted to System.Collections.Generic.Dictionary`2[System.String,GrapeCity.ActiveReports.Web.Viewer.I.+ParameterValuesQuery+RequestFields]. Path: $.request | LineNumber: 0 | BytePositionInLine: 103.

    Im using this code

    report = "CycleSummaryReport.rdlx"
    viewer.openReport(report, [{ name: 'CycleId', values: [Cycle] }, { name: 'Version', values: [Version] }, { name: 'WorkOrder', values: [WorkOrder] }, { name: 'RecipeId', values: [Recipe] }]);

  • Replied 15 July 2021, 6:39 pm EST


    Your query has been replied here:

Need extra support?

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

Learn More

Forum Channels