Page 1 of 1

Accessing JS Viewer with mrt file having Database as data source

Posted: Wed Jun 01, 2022 11:51 am
by ajithks44
Code setup:
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);
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

Code: Select all

this.report.loadFile('../sample.mrt')
will everything work?

Re: Accessing JS Viewer with mrt file having Database as data source

Posted: Wed Jun 01, 2022 8:18 pm
by Lech Kulikowski