Page 1 of 1
Java Interrupt Rendering
Posted: Tue May 09, 2017 10:05 am
by Richard
Hello,
Is it possible to start rendering a report from code, with the possibility to interrupt it during the rendering? If so, how? I found the attribute isStopped, that should stop the rendering after a page finishes, but I can't find a way to set it during the rendering process.
Kind regards,
Richard.
Re: Java Interrupt Rendering
Posted: Wed May 10, 2017 11:16 am
by Alex K.
Hello,
In this case, you can set the StopBeforePage property of the report.
Thank you.
Re: Java Interrupt Rendering
Posted: Wed May 10, 2017 11:49 am
by Richard
I tried it - I would stop rendering after each page, and if no interruption occured, I would just increase the StopBeforePage property by one, and call Render again.
This solved my problem, thank you!
Have a great day!
Edit: It didn't work as I previously thought. Follow up in next post.
Re: Java Interrupt Rendering
Posted: Wed May 10, 2017 1:55 pm
by Richard
Sorry, I was mistaken, it did not work as I expected.
My problem is this:
I wanted to render the report page by page, so if it takes too long, a user can stop the rendering. I would run it in it's own thread, but I can't just render it at once, because it could take several minutes to finish rendering entirely, and the thread would be busy the whole time.
So I tried your suggestion, rendered a single page, then checked the current state, rendered another page, and so on...
But if I stop the rendering at some point, I can't continue from where I paused. If I have already rendered pages 1 to 9, and I render JUST the page number 10, the last page takes the same time to render as if I would render pages 1 to 10.
Does the rendering start all over if I call Render()? Does it ignore the already rendered pages?
So I am rephrasing my question:
Is it possible to pause the rendering process (for example at some page), and then continue with the rendering? Without having to render it all again?
Because now, if I continue by calling render again, it renders the whole thing again from scratch.
Thank you for your time.
Re: Java Interrupt Rendering
Posted: Fri May 12, 2017 7:24 am
by Alex K.
Hello,
Unfortunately, this feature is not available in our products.
As a way, you can split the report into several parts, render it and then merge it in one report.
Thank you.
Re: Java Interrupt Rendering
Posted: Mon May 15, 2017 7:52 am
by Richard
Thank you for your time.
Best regards,
Richard.
Re: Java Interrupt Rendering
Posted: Tue May 16, 2017 6:41 am
by Alex K.
Hello
We are always glad to help you!
Please let us know if you need any additional help.
Thank you.