Page 1 of 1

Fail load js files in single page application

Posted: Thu Jun 29, 2017 8:43 pm
by tuxwars
I have problems trying to integrate the js files in my application, I get the following message:

Code: Select all

   Uncaught TypeError: Cannot read property 'Localization' of undefined
    at e.Viewer.e.Viewer (stimulsoft.viewer.js:9)
    at Stimulsoft (stimulsoft.viewer.js:9)
    at stimulsoft.viewer.js:9
The files I load through :

Code: Select all

$.cachedScript(FilesURL + "/Assets/js/stimulsoft/" + "stimulsoft.reports.js");
$.cachedScript(FilesURL+ "/Assets/js/stimulsoft/" + "stimulsoft.viewer.js");
And when I run the report the page throws the following message:

VM2687:12 Uncaught TypeError: Stimulsoft.Viewer.StiViewer is not a constructor

The code in view is:

Code: Select all

             var report = new Stimulsoft.Report.StiReport();
            report.loadFile(ServerURL + "/DownloadFile");

            var viewer = new Stimulsoft.Viewer.StiViewer(null, "StiViewer", false);
            viewer.report = report;
            viewer.renderHtml("viewerContent");  
What am I doing wrong?

Re: Fail load js files in single page application

Posted: Fri Jun 30, 2017 2:06 pm
by tuxwars
I already found the problem, the js stimulsoft does not work with moments js

Re: Fail load js files in single page application

Posted: Fri Jun 30, 2017 2:23 pm
by Alex K.
Hello,

Please let us know if you need any additional help.

Thank you.

Re: Fail load js files in single page application

Posted: Sat Jul 01, 2017 1:19 pm
by harryf75
tuxwars wrote:I already found the problem, the js stimulsoft does not work with moments js
Works för me...

Re: Fail load js files in single page application

Posted: Mon Jul 03, 2017 5:01 am
by Andrew
Great! Thank you!