Error in JSViewer

Posted by: pooja.srivastava on 2 June 2022, 2:10 am EST

    • Post Options:
    • Link

    Posted 2 June 2022, 2:10 am EST

    Hi,

    I am using Active reports 16 with jsviewer. I am using the RDFRenderingExtension to view report in a web application. While rendering the report, I am getting “Document processing error: Cannot obtain report info”. Can anyone suggest what might be causing this error?

  • Posted 2 June 2022, 8:18 pm EST

    Hello,

    If you wish to preview the report in JSVIewer, RdfRenderingExtension should not be required to view the same. For more detailed information on ActiveReports JSVIewer, please refer to the below link:

    https://www.grapecity.com/activereportsnet/docs/latest/online/js-viewer.html

    You can refer to the below link for samples of the same:

    https://www.grapecity.com/activereportsnet/docs/latest/online/js-viewer-mvc-(core).html

    However, if the issue still persists, please provide a sample depicting the issue so that we could debug it at our end, and reply accordingly,

    Regards

    Dushyant Sharma

  • Posted 5 June 2022, 3:42 pm EST

    Thanks for the reply.

    1. I tried the sample code and it expects to install node.js which we are not using.
    2. When I installed AR 16 trial version, I dont see any files for JSViewer (neither js nor css). Can you please share the steps to install jsviewer?
    3. My application tries to view the rdf file in jsviewer which throws an error. The RDF file is attached for your reference.
    4. Do I always have to use the OWINStartup class with jsviewer? If yes, then do I have to place the rdf files at a specific location?
    5. I will greatly appreciate if you can share any working sample with jsviewer ?
    6. My code sample is below.
    index.html
     <div class="col-md-12" id="marsARviewer" style="height: 545px;overflow-y:auto"></div>
    <script>
    
     var viewer = GrapeCity.ActiveReports.JSViewer.create({
                element: "#marsARviewer",
              
            });
            viewer.openReport('sampleReport.rdf');
    
    </script>
    
    Owinstartup.cs
     public class Startup1
        {
            public void Configuration(IAppBuilder app)
            {
                // For more information on how to configure your application, visit http://go.microsoft.com/fwlink/?LinkID=316888
                app.UseReporting(settings =>
                {
                    //configure Middleware "UseFileStore" to fetch the report's location
                    settings.UseFileStore(new System.IO.DirectoryInfo(@"C:\\Report")); //sampleReport.rdf is in c:\Report folder.
                });
            }
        }
    
    
  • Posted 9 June 2022, 8:57 am EST

    Hello,

    Please refer to the following points for the resolution of the above query:

    When I installed AR 16 trial version, I don’t see any files for JSViewer (neither js nor css). Can you please share the steps to install jsviewer?

    The attached sample utilizes node.js to download npm package which contains the required jsViewer js and CSS files.

    https://www.npmjs.com/package/@grapecity/ar-viewer

    My application tries to view the RDF file in jsviewer which throws an error. The RDF file is attached for your reference.

    Could you please provide a screenshot of the error message which you are getting at your end? Also, it seems like the RDF file was not attached properly in the last reply, could you please try sharing it again?

    Do I always have to use the OWINStartup class with jsviewer? If yes, then do I have to place the RDF files at a specific location?

    Yes, it is used to specify the reporting API, which would host all the required files to be viewed by the JSViewer. The below sample uses EmbeddedResource to fetch the required files, alternatively, you can also use FIleStore to provide the directory of your choice.

    For more information on the same, please refer to the below link:

    https://www.grapecity.com/activereportsnet/docs/latest/online/pure-js-integration.html

    Please find the MVC Core JSViewer sample attached below.

    Regards

    Dushyant Sharma

    JSViewer_MVC_Core.zip

Need extra support?

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

Learn More

Forum Channels