I have some code where I load the report in the viewer and after the report is fully loaded I need to print to PDF.
How can I detect when the report is fully loaded and rendered so that I can call my function to print to PDF?
I have tried the onEndProcessData of the viewer and the report but the event is triggered before the report is fully rendered.
Auto Print after report loaded
Re: Auto Print after report loaded
Hello.
You don't need to wait for loading of the report, you could render and export the report in your code.
Sorry, maybe we don't understand your problem right. We need more information about the issue.
Could you send us a sample with your Print to PDF function that reproduces the issue?
Thank you.
You don't need to wait for loading of the report, you could render and export the report in your code.
Sorry, maybe we don't understand your problem right. We need more information about the issue.
Could you send us a sample with your Print to PDF function that reproduces the issue?
Thank you.
Re: Auto Print after report loaded
I have my JavaScript code in the page header that loads the report in the viewer then if I call my JavaScript code to create the PDF in the document ready function (jquery) it will proceed before the report is rendered therefore the PDF file will be empty.
But I have found some code that seems to work fine so far. I added a JavaScript timer and in the timer I check if the report has finished rendering and if so I call the code to save to PDF.
Here is my timer code:
var myVar = setInterval(myTimer, 2000);
function myTimer() {
if (viewer.report.isRendered == true){
window.clearInterval(myVar);
saveReportPdf();
}
}
But I have found some code that seems to work fine so far. I added a JavaScript timer and in the timer I check if the report has finished rendering and if so I call the code to save to PDF.
Here is my timer code:
var myVar = setInterval(myTimer, 2000);
function myTimer() {
if (viewer.report.isRendered == true){
window.clearInterval(myVar);
saveReportPdf();
}
}
Re: Auto Print after report loaded
Hello,
Thank you for provided information.
Please let us know if you need any additional help.
Thank you.
Thank you for provided information.
Please let us know if you need any additional help.
Thank you.