Infinite loop on generate report with report.js

Stimulsoft Reports.JS discussion
Post Reply
robops
Posts: 10
Joined: Thu Dec 07, 2023 8:02 am

Infinite loop on generate report with report.js

Post by robops »

Hello,
I'm creating a report with fixed header.
It works well when i preview in desinger,however,when load in report&viewer.js,i got a Infinite loop and the page can not show and takes large amount of memory.
Look at this below.
Image
Image
Image

The template and data here↓
https://webcc-pro.obs.cn-east-3.myhuawe ... %8D%95.mrt
https://webcc-pro.obs.cn-east-3.myhuawe ... BC%80.json

Please,I need help!
Thank you!
Lech Kulikowski
Posts: 6271
Joined: Tue Mar 20, 2018 5:34 am

Re: Infinite loop on generate report with report.js

Post by Lech Kulikowski »

Hello,

We require more time to investigate the issue thoroughly. Rest assured, we will keep you informed about the outcome as soon as possible.

Thank you.
#13744
robops
Posts: 10
Joined: Thu Dec 07, 2023 8:02 am

Re: Infinite loop on generate report with report.js

Post by robops »

OK,waiting for your good news.
Lech Kulikowski
Posts: 6271
Joined: Tue Mar 20, 2018 5:34 am

Re: Infinite loop on generate report with report.js

Post by Lech Kulikowski »

Hello,

The main problem: the same data source is used in several bends at once.
Our product is technically designed so that the current position is stored in the data source, not in the band.
But if the second band starts working before the first band has completely worked - the second band changes the position in the source, disrupting the work of the first band, and it most often stops its work, not outputting all the data to the end.
To solve the problem in this case, it is necessary to make a copy of the data source and assign this copy to the second band.
In this report, there are several such bends at once. One pair spins data on the page, the second in the PageHeader.
We have added fixes in this direction. It will be available in the next build.
But you still need to make a copy of the data sources to render all the data, at the same time the problem with freezing on the current build will be solved.

The second problem is the "Line / 7 == PageNumber - 1" expression is written in the Enabled property of the image.
This works correctly in Net as integer division. But JS has math for fractional numbers only.
To make it work correctly in JS, you need to change the expression: (int)(Line / 7) == PageNumber - 1

Thank you.
robops
Posts: 10
Joined: Thu Dec 07, 2023 8:02 am

Re: Infinite loop on generate report with report.js

Post by robops »

Great,It works!
Many thanks for your guidance!
Lech Kulikowski
Posts: 6271
Joined: Tue Mar 20, 2018 5:34 am

Re: Infinite loop on generate report with report.js

Post by Lech Kulikowski »

Hello,

You are welcome.
Post Reply