What is the best practice to render heavy data

Stimulsoft Reports.JS discussion
Post Reply
morteza
Posts: 17
Joined: Sat Apr 04, 2020 12:27 pm

What is the best practice to render heavy data

Post 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.
Lech Kulikowski
Posts: 6197
Joined: Tue Mar 20, 2018 5:34 am

Re: What is the best practice to render heavy data

Post 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.
morteza
Posts: 17
Joined: Sat Apr 04, 2020 12:27 pm

Re: What is the best practice to render heavy data

Post 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.
Andrew
Posts: 4104
Joined: Fri Jun 09, 2006 3:58 am

Re: What is the best practice to render heavy data

Post by Andrew »

Hello,

By splitting a report we mean create several smaller reports.
Please read the next articles which may help you
https://www.stimulsoft.com/en/blog/arti ... ng-reports
https://www.stimulsoft.com/en/blog/arti ... rts-part-2
https://www.stimulsoft.com/en/blog/arti ... rts-part-3

Thank you.
morteza
Posts: 17
Joined: Sat Apr 04, 2020 12:27 pm

Re: What is the best practice to render heavy data

Post 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)

Code: Select all

dataSet.readJson(data);
and loading template by this approach:
our template is a json

Code: Select all

 report.load(template);
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
Attachments
LastJson.json
(19.68 KiB) Downloaded 160 times
Lech Kulikowski
Posts: 6197
Joined: Tue Mar 20, 2018 5:34 am

Re: What is the best practice to render heavy data

Post by Lech Kulikowski »

Hello,

We can not provide any other information except in previous replies.

Thank you.
Post Reply