JSViewer issue on AR15.1.3

Posted by: michael.zhong on 24 May 2021, 4:10 am EST

  • Posted 24 May 2021, 4:10 am EST

    We upgrage AR to 15.1.3 just lately. When we open the reports what include some parameters to preview them, It always show me the error message "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: 24."
    What can we do?
  • Replied 24 May 2021, 3:28 pm EST


    Can you please share the report with us so that I can replicate the issue at my end. Also, in which viewer are you previewing the report.

  • Replied 25 May 2021, 5:01 pm EST

    We use the jsViewer to open our report.
  • Replied 25 May 2021, 6:49 pm EST


    Can you please tell in which version that you had created this report. I try to open the report in AR10-AR15 version but give the error while opening the report.

  • Replied 26 May 2021, 2:53 am EST

    I use AR 15.1.2 create it. Can you show me the error message? Maybe it caused by chinese character.
  • Replied 26 May 2021, 4:39 pm EST


    It shows the error ": 'Data at the root level is invalid. Line 1, position 1.'". Could you please recheck at your end with same report.

  • Replied 28 May 2021, 4:15 am EST

    Thanks for your feedback, I have found the root cause what come from the UTF-8 BOM format of report file. We make some step to get the contents.

    byte[] bomBuffer = new byte[] { 0xef, 0xbb, 0xbf };
    if (content[0] == bomBuffer[0]
    && content[1] == bomBuffer[1]
    && content[2] == bomBuffer[2])
    var xmlStr = System.Text.Encoding.UTF8.GetString(content, 3, content.Length - 3);
    content = System.Text.Encoding.UTF8.GetBytes(xmlStr);
  • Replied 30 May 2021, 4:37 pm EST


    I am glad you issue is resolved now. Feel free to revert if you have any other issue.

Need extra support?

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

Learn More

Forum Channels