Page 1 of 1

pathData - The code below used to work

Posted: Sun Jul 02, 2017 8:19 am
by bobsov

Code: Select all

console.log('Creating a new report instance');
            var report = new $window.Stimulsoft.Report.StiReport();

            console.log('Load report from url');
            report.loadFile('app/reports/Report.mrt');
          
            report.dictionary.databases.getByIndex(0).pathData =  appConfig.appUrl + 'api/reporting';
       		report.render();
            var viewer = new $window.Stimulsoft.Viewer.StiViewer(null, 'StiViewer', false);

            viewer.report = report;

            console.log('Rendering the viewer to selected element');
            viewer.renderHtml('viewer');

I upgraded to latest release js files and it shows that "report.dictionary.databases.getByIndex(0)" is undefined. I know for a fact that Report.mrt has one data source defined. If I use 2016.08.12 code, it works fine.

What would be correct way to do same thing so that it works with latest code base?

Re: pathData - The code below used to work

Posted: Tue Jul 04, 2017 11:28 am
by Alex K.
Hello,

We have checked the issue. It is strange behavior. Could you send us your report template for analysis.

Thank you.

Re: pathData - The code below used to work

Posted: Tue Jul 04, 2017 1:07 pm
by HighAley
Hello.

Please, check that there is a database in your report.
Not all type of data sources use databases.
If you still get the error, please, send us your report template for analysis.

Thank you.

Re: pathData - The code below used to work

Posted: Tue Jul 04, 2017 4:10 pm
by bobsov
One crucial step I totally missed to say was - this only happens when I test in my build environment. In other words, when the js files are minified and uglified by grunt build. It does not happen in actual development. I have verified this and re-verified where in dev, i see there is one data source count and in build, the count is 0. Report.mrt file is in tact. Again, this is not an issue with older stimulsoft code but only with latest one.

Re: pathData - The code below used to work

Posted: Wed Jul 05, 2017 10:51 pm
by Alex K.
Hello,

It is strange behavior. And we couldn't reproduce it on our samples.
Please send us a sample project or report on which this issue is reproduced for analysis.

Thank you.