I have a problem when creating a report which has two separate tables as i defined a custom data source then added two tables "salesInvoice" & "SysCompany"
In JS i did the following code
this.report.loadFile(this._getSubFolder()+'/'+file.FileName);
// Set Company Dataset
var dataSetCompany = new Stimulsoft.System.Data.DataSet("SysCompany");
dataSetCompany.readJson(JSON.stringify(this.SelectedCompany))
this.report.regData("SysCompany", "", dataSetCompany);
// Set Sales Invoice Dataset
var dataSet = new Stimulsoft.System.Data.DataSet("salesInvoice");
dataSet.readJson(JSON.stringify(this.Data))
this.report.regData(dataSet.dataSetName, "", dataSet);
I tried many many scenario like attached two tables as one json and send but no way
All result give me NAN
I am using Stimulsoft 17_2_3 JS
DataSet With Two Tables
-
- Posts: 6245
- Joined: Tue Mar 20, 2018 5:34 am
Re: DataSet With Two Tables
Hello,
Please try to use the synchronize() method. If the issue still present, please send us your JSON data for analysis.
Thank you.
Please try to use the synchronize() method. If the issue still present, please send us your JSON data for analysis.
Thank you.
Re: DataSet With Two Tables
Now its working
I have combined the two dataset on one Json variable ans register the dataset.
// Coabmbine Two Table Into One Json Object
reportData={details:this.Data,SysCompany:this.SelectedCompany}
// Define DataSet For Report
var dataSet = new Stimulsoft.System.Data.DataSet("root");
//Read Data Into Defined Dataset
dataSet.readJson(JSON.stringify(reportData))
// Register Defined Data Set
this.report.dictionary.databases.clear();
this.report.regData("root", "root", dataSet);
this.report.dictionary.synchronize();
Many Thanks to Lech Kulikowski
I have combined the two dataset on one Json variable ans register the dataset.
// Coabmbine Two Table Into One Json Object
reportData={details:this.Data,SysCompany:this.SelectedCompany}
// Define DataSet For Report
var dataSet = new Stimulsoft.System.Data.DataSet("root");
//Read Data Into Defined Dataset
dataSet.readJson(JSON.stringify(reportData))
// Register Defined Data Set
this.report.dictionary.databases.clear();
this.report.regData("root", "root", dataSet);
this.report.dictionary.synchronize();
Many Thanks to Lech Kulikowski
-
- Posts: 6245
- Joined: Tue Mar 20, 2018 5:34 am
Re: DataSet With Two Tables
Hello,
We are always glad to help you!
Please let us know if you need any additional help.
Thank you.
We are always glad to help you!
Please let us know if you need any additional help.
Thank you.