Initialization error

Posted by: albertowebmail on 13 September 2021, 5:54 am EST

  • Posted 13 September 2021, 5:54 am EST

    Hi,

    I'm trying ActiveReportsJS and following the documentation

    I created the basic example report.rdlx-json in the root and

    I imported all the required scripts via cdn, but unfortunately

    when I call: var viewer = new ActiveReports.Viewer("#viewer-host")

    I get the error (in the browser console):

    Uncaught ReferenceError: ActiveReports is not defined

    at <anonymous>:1:14

    at t.onPropertyChanged (bundle.js:1)

    at t.e.dataBind (bundle.js:1)

    at t.dataBind (bundle.js:1)

    at o (bundle.js:1)

    and nothing is shown on the screen.

    Can you give me any help ?

    Thank you in advance.

    Alberto Monteverdi.
  • Marked as Answer

    Replied 13 September 2021, 3:45 pm EST

    The only reason this error could error is when the references are not getting loaded correctly. Please see the Network tab of your browser's Developer Tools to verify if all references are being loaded.

    I have attached a sample application for your reference as well.
    ARJS_Viewer.zip
  • Replied 14 September 2021, 1:47 pm EST

    Hi,
    I solved the issue.
    Because I'm using html inside web pages in bundle deployment file with webpack
    I was calling the initialization scripts in files inside that bundle and it didn't work
    (they were loaded with delay).
    Now I moved the call to initialization scripts in index.html file (the main file outside
    the bundle.js) and it works.
    Thank you.
    Alberto.
Need extra support?

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

Learn More

Forum Channels