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 » Tue Jun 30, 2020 3:17 am

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: 3569
Joined: Tue Mar 20, 2018 5:34 am

Re: What is the best practice to render heavy data

Post by Lech Kulikowski » Tue Jun 30, 2020 10:36 am

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 » Wed Jul 01, 2020 4:15 am

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: 4037
Joined: Fri Jun 09, 2006 3:58 am

Re: What is the best practice to render heavy data

Post by Andrew » Wed Jul 01, 2020 5:58 am

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 » Mon Jul 13, 2020 8:59 am

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 50 times
Lech Kulikowski
Posts: 3569
Joined: Tue Mar 20, 2018 5:34 am

Re: What is the best practice to render heavy data

Post by Lech Kulikowski » Wed Jul 15, 2020 9:15 pm

Hello,

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

Thank you.
Post Reply