Page 1 of 1
What is the best practice to render heavy data
Posted: Tue Jun 30, 2020 3:17 am
by morteza
Hello
In our Project, we are dealing with heavy data recorders, As we see, rendering heavy data toke a very long time.
This the way we load data in client-side:
Code: Select all
var report = new window.Stimulsoft.Report.StiReport();
report.loadDocument(data);
my questions are :
1-Is it the best way to load data?
2-Is there any way to implement pagination(loading data part to part)?
3-Is there any way to render just current page not all pages?
best regards.
Re: What is the best practice to render heavy data
Posted: Tue Jun 30, 2020 10:36 am
by Lech Kulikowski
Hello,
> 1-Is it the best way to load data?
Split report on several parts.
> 2-Is there any way to implement pagination(loading data part to part)?
No.
> 3-Is there any way to render just current page not all pages?
No.
Thank you.
Re: What is the best practice to render heavy data
Posted: Wed Jul 01, 2020 4:15 am
by morteza
thanks for your response
could you please give me some hints about splitting report into parts.
Is there any document or sample that help me to implement splitting.
Re: What is the best practice to render heavy data
Posted: Wed Jul 01, 2020 5:58 am
by Andrew
Re: What is the best practice to render heavy data
Posted: Mon Jul 13, 2020 8:59 am
by morteza
Thanks Andrew
We have changed our procedure to render a report.
Now we have separates template and origin data.
As I read the document I come up with this way :
reading data (an object)
and loading template by this approach:
our template is a json
and render the report by this code :
Code: Select all
export function renderSt(data, template) {
var report = new window.Stimulsoft.Report.StiReport();
report.load(template);
var options = new window.Stimulsoft.Viewer.StiViewerOptions();
options.appearance.showTooltips = false;
options.toolbar.showPrintButton = false;
var viewer = new window.Stimulsoft.Viewer.StiViewer(
options,
"StiViewer",
false
);
var dataSet = new window.Stimulsoft.System.Data.DataSet("SimpleDataSet");
dataSet.readJson(data);
report.regData(dataSet.dataSetName, "", dataSet);
viewer.report = report;
viewer.renderHtml("viewer");
As a sample, a report with 600 pages takes 120 seconds to render.
Is there a better way to reduce this time? for instance, using XML or XSD format?
I have attached my template Json in the case you need to check.
Best regards
Re: What is the best practice to render heavy data
Posted: Wed Jul 15, 2020 9:15 pm
by Lech Kulikowski
Hello,
We can not provide any other information except in previous replies.
Thank you.