I'm trying to make the report viewer work on an angularjs app with php connection to MS SQL and while it seems to be working, the rendering of my report is breaking with the "Unexpected end of JSON input" error message posted twice as shown on the attached image. The following is my script for calling the viewer:
Code: Select all
vm.reporte = function () {
StiOptions.WebServer.url = "php/handler.php";
var viewer = new $window.Stimulsoft.Viewer.StiViewer(null, 'StiViewer', false);
viewer.onBeginProcessData = function (event) {
event.connectionString = "server=***CENSORED***; uid=***CENSORED***; password=***CENSORED***; database=***CENSORED***;";
}
var report = new $window.Stimulsoft.Report.StiReport();
report.loadFile('/MainV4/app/reports/TiposDocumento.mrt');
viewer.report = report;
viewer.renderHtml('viewer');
};
I added all the corresponding files (reports.js,viewer.js, etc. including the handler.php, helper.php, classes.php and stimulsoft adapter folder), and the connection string matches the one on my .mrt file, which connects succesfully on the designer. Is there something missing on my script? or is my .mrt file not properly made? I attached it too in case there is something I overlooked in it that needs fixing.