multi json datasets from ajax request in PHP report

Stimulsoft Reports.PHP discussion
Post Reply
SigmaOne
Posts: 9
Joined: Wed Dec 12, 2018 6:30 pm
Location: Sudan

multi json datasets from ajax request in PHP report

Post by SigmaOne »

Hello :

I am using multi json datasets from ajax request in PHP report the report appears empty on databand but when I use one dataset it works normally
Lech Kulikowski
Posts: 6196
Joined: Tue Mar 20, 2018 5:34 am

Re: multi json datasets from ajax request in PHP report

Post by Lech Kulikowski »

Hello,

Please send us a sample that reproduces the issue for analysis.

Thank you.
SigmaOne
Posts: 9
Joined: Wed Dec 12, 2018 6:30 pm
Location: Sudan

Re: multi json datasets from ajax request in PHP report

Post by SigmaOne »

var report = new Stimulsoft.Report.StiReport();


var dataSet1 = new Stimulsoft.System.Data.DataSet("table_1");
var dataSet2 = new Stimulsoft.System.Data.DataSet("table_2");


dataSet1.readJson(<?php echo ($DataSource->GetData1ById($fin_app_id)); ?>);
dataSet2.readJson(<?php echo ($DataSource->GetData2ById($fin_app_id)); ?>);

report.loadFile("../reports/mrt_files/rpt_101.mrt");

report.dictionary.databases.clear();
report.regData("json", "table_1", dataSet1);
report.regData("json", "table_2", dataSet2);
report.dictionary.synchronize();

viewer.report = report;

function onLoad() {
viewer.renderHtml("viewerContent");
}

when I view the report it show blank databand but when I delete table_2 it run normally
Lech Kulikowski
Posts: 6196
Joined: Tue Mar 20, 2018 5:34 am

Re: multi json datasets from ajax request in PHP report

Post by Lech Kulikowski »

Hello,

Also, please send your report for analysis.

Thank you.
SigmaOne
Posts: 9
Joined: Wed Dec 12, 2018 6:30 pm
Location: Sudan

Re: multi json datasets from ajax request in PHP report

Post by SigmaOne »

hello this sample of of requested files
Attachments
rpt_100.zip
The files as you request
(5.46 KiB) Downloaded 158 times
Lech Kulikowski
Posts: 6196
Joined: Tue Mar 20, 2018 5:34 am

Re: multi json datasets from ajax request in PHP report

Post by Lech Kulikowski »

Hello,

We need some additional time to investigate the issue, we will let you know about the result.

Thank you.
SigmaOne
Posts: 9
Joined: Wed Dec 12, 2018 6:30 pm
Location: Sudan

Re: multi json datasets from ajax request in PHP report

Post by SigmaOne »

hello

I am waiting

thanks for replying
Lech Kulikowski
Posts: 6196
Joined: Tue Mar 20, 2018 5:34 am

Re: multi json datasets from ajax request in PHP report

Post by Lech Kulikowski »

Hello,

Please check the following code:
report.dictionary.databases.clear();
report.dictionary.dataSources.clear();
report.regData("json", "json", dataSet1);
report.regData("json", "json", dataSet2);
report.dictionary.synchronize();

Thank you.
Attachments
Screenshot 2023-03-13 233429.png
Screenshot 2023-03-13 233429.png (60.51 KiB) Viewed 9731 times
Post Reply