Reg Data Problem

Stimulsoft Reports.JS discussion
Post Reply
G.hammad
Posts: 63
Joined: Tue Jun 24, 2014 7:59 am

Reg Data Problem

Post by G.hammad »

Dear,

I'm using stimulsoft report js for my project and trying to send data by json in data set to MRT report , but it view only the first record in databand and i'm try to define business object datasource / dataset in mrt & both not work . :roll: :|
can any one help me this is the below code used:

this.report = new Stimulsoft.Report.StiReport();
this.viewer = new Stimulsoft.Viewer.StiViewer(this.options, 'StiViewer', false);
this.report.load(this.reportFilterData.ReportSchema);
this.report.dictionary.databases.clear();
var reportData: any;
reportData = "{" + dataSource.DataSourceName + ":"+ JSON.stringify(dataSource.DataSource) + ','
reportData = reportData.substring(0, reportData.length - 1);
reportData = reportData + "}"

var reDateDetect = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.\d{1,3}/;
// startswith: 2015-04-29T22:06:55

var resultObject = JSON.parse(reportData, (key: any, value: any) => {
if (typeof value === 'string' && (reDateDetect.exec(value))) {
return new Date(value)
}
return value;
});

var dataSet = new Stimulsoft.System.Data.DataSet("DS");
dataSet.readJson(resultObject);

this.report.regData("DS." + dataSource.DataSourceName,"", dataSet);
this.report.dictionary.synchronize();
Attachments
OrderReport.mrt
(30.54 KiB) Downloaded 9 times
Max Shamanov
Posts: 318
Joined: Tue Sep 07, 2021 10:11 am

Re: Reg Data Problem

Post by Max Shamanov »

Hello,

Please send us a sample project that reproduces the issue.

Thank you.
Post Reply