Accessing JS Viewer with mrt file having Database as data source

Stimulsoft Reports.JS discussion
Post Reply
ajithks44
Posts: 2
Joined: Wed Jun 01, 2022 11:25 am

Accessing JS Viewer with mrt file having Database as data source

Post 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?
Post Reply