How to know when the report preview is rendered completely?

Jump to: Board indexJS, Java, PHP, FlexStimulsoft Reports.JS

Stimulsoft Reports.JS discussion

Re: How to know when the report preview is rendered complete

Post Tue Oct 17, 2017 10:14 am

HighAley wrote:Hello.

Unfortunately, there is no such event and the StiEndRenderEvent will not help you.
Maybe it will be better to export the report to HTML and then you can do with this HTML all that you need.

Thank you.


Ok, I'll try this

Thanks
titanotam
 
Posts: 12
Joined: Thu Jun 29, 2017 6:22 am

Re: How to know when the report preview is rendered complete

Post Wed Oct 18, 2017 4:45 pm

Hello.

You could find a sample here:
https://github.com/stimulsoft/Samples-J ... 0HTML.html
Let us know if you need additional help.

Thank you.
HighAley
 
Posts: 7510
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: How to know when the report preview is rendered complete

Post Wed Nov 01, 2017 1:43 pm

Hi,

I solve my problem by using the jQuery event and looking for DOM change on the div that contains the rendered report. Since the DOM is changed continuously, I need to wait to make sure there is no DOM change event is fired anymore, then I continue to capture the report thumbnail

Code: Select all
var previewRenderTimer;
var previewRenderInterval = 1000;<-- time to wait to make sure there is no DOM change event anymore
...
$('div#StiDesigner_Viewer_JsViewerMainPanel').on("DOMSubtreeModified", () => {
            clearTimeout(previewRenderTimer);
            previewRenderTimer = setTimeout(createReportThumbnailFunc, previewRenderInterval);
});
titanotam
 
Posts: 12
Joined: Thu Jun 29, 2017 6:22 am

Re: How to know when the report preview is rendered complete

Post Thu Nov 02, 2017 12:04 pm

Hello,

Thank you for the information about your solution.

Thank you.
Alex K.
 
Posts: 6278
Joined: Thu Jul 29, 2010 2:37 am

Previous

Return to Stimulsoft Reports.JS

Who is online

Users browsing this forum: No registered users and 1 guest

cron