Accessing JS Viewer with mrt file having Database as data source
Posted: Wed Jun 01, 2022 11:51 am
Code setup:
viewer = JS Viewer with Angular11
Designer: dotnet mvc
DB: MS SQL Server
Angular code for JS viewer
Above code will work fine, since the data source is json while report is saved.
My doubt is if I'm saving another report with data source as database, and if I'm just loading the mrt file using will everything work?
viewer = JS Viewer with Angular11
Designer: dotnet mvc
DB: MS SQL Server
Angular code for JS viewer
Code: Select all
this.reportViewer = new Stimulsoft.Viewer.StiViewer(this.reportViewerData.reportViewerOptions, 'StiViewer', false);
this.report = new Stimulsoft.Report.StiReport();
this.dataSet = new Stimulsoft.System.Data.DataSet('Report viewer');
this.report.loadFile('../sample.mrt');
this.dataSet.readJson(this.reportJsonData);
My doubt is if I'm saving another report with data source as database, and if I'm just loading the mrt file using
Code: Select all
this.report.loadFile('../sample.mrt')