How to know when the report preview is rendered completely?

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

Stimulsoft Reports.JS discussion

How to know when the report preview is rendered completely?

Post Tue Oct 03, 2017 10:38 am

Hi,

I'm working on the report preview panel, my report has a lot of charts and data.
When I click the Preview button, it take too long for the report to render completely.
And when it rendered, I will capture the report image for making its thumbnail.
But I could not find any method that fires after the report is render completely.

Someone please help me.
Thanks :)
Last edited by titanotam on Mon Oct 09, 2017 4:36 am, edited 1 time in total.
titanotam
 
Posts: 12
Joined: Thu Jun 29, 2017 6:22 am

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

Post Tue Oct 03, 2017 5:56 pm

Hello,

You can check the StiEndRenderEvent event.

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

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

Post Mon Oct 09, 2017 4:03 am

Aleksey wrote:Hello,

You can check the StiEndRenderEvent event.

Thank you.


Thanks, but could you please show me how to use this event?
titanotam
 
Posts: 12
Joined: Thu Jun 29, 2017 6:22 am

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

Post Tue Oct 10, 2017 8:00 pm

Hello.

Could you specify what you want to do in this event?

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

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

Post Wed Oct 11, 2017 1:40 am

HighAley wrote:Hello.

Could you specify what you want to do in this event?

Thank you.


In this event, I use the html2canvas library to capture the image of report and save it as report thumbnail. So I need to make sure that the report is rendered completely
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 11, 2017 1:39 pm

Hello.

But the report is stored not in HTML format.
It's better to use an event of the Viewer.
Please, look at this sample.

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

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

Post Wed Oct 11, 2017 3:10 pm

HighAley wrote:Hello.

But the report is stored not in HTML format.
It's better to use an event of the Viewer.
Please, look at this sample.

Thank you.


The html2canvas library can take the html DOM by jquery, then capture the image, in my case this is:
Code: Select all
html2canvas($('div.stiJsViewerPageShadow'), { <--- This is the DIV that hold the rendered report
  onrendered: function(canvas) {
    //convert canvas to image then save as report thumbnail
  }
});
titanotam
 
Posts: 12
Joined: Thu Jun 29, 2017 6:22 am

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

Post Sat Oct 14, 2017 3:09 pm

Hello.

Did you solve your issue?
Can you create a thumbnail?

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

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

Post Sun Oct 15, 2017 2:35 am

HighAley wrote:Hello.

Did you solve your issue?
Can you create a thumbnail?

Thank you.


Still not yet :(
I only create a full thumbnail after setting timeout for about 5000 ms. It’s not a good idea. :)

Can you please show me how to use the StiEndRenderEvent event?
titanotam
 
Posts: 12
Joined: Thu Jun 29, 2017 6:22 am

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

Post Tue Oct 17, 2017 10:01 am

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.
HighAley
 
Posts: 7579
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Next

Return to Stimulsoft Reports.JS

Who is online

Users browsing this forum: Google [Bot] and 3 guests