Timeout Error - jsreportonline
-
Hi
I have a report that get data when we make ajax call and call took 10-15s to complete that's why sometime report show data and sometime do not show data.
I have set print delay and resource timeout to 18000.Please suggest how can handle this and what is the max value of print delay and resource timeout.
Is there way to configure print delay and resource timeout for all online jsreports in a configuration file?
Thank You in Advance.
-
Use printing triggers instead
https://jsreport.net/learn/phantom-pdf#printing-triggersIs there way to configure print delay and resource timeout for all online jsreports in a configuration file?
You could use jsreport custom script and set the
req.template.phantom.resourceTimeout
in thebeforeRender
hook.
However, printing triggers are definitely the right way to go.
-
Hi
I have created sample in which I have defined two constants for print delay and resource timeout.
I used resourceTimeout in beforeRender hook in global_helpers.js and printDelay in script tag on pdf page.
Actually I need to pass these constant variables values to all reports.
Please review and suggest me best approach.
https://playground.jsreport.net/w/RajeevK94037758/0d_gefqxThank You in Advance.
-
You can mark script as global and it will run for every rendering request.
https://jsreport.net/learn/scripts#global-scripts
-
I have marked "shared helpers attached to each template" but how can we access value of global_helpers.js constants on pdf page.
Currently getting this error when I try to access value of printDelay constant.
https://playground.jsreport.net/w/RajeevK94037758/0d_gefqx+140 ReferenceError: Can't find variable: printDelay +140 file:///%2Ftmp%2Fautocleanup%2F027ac4ff-5149-485b-a7f1-2782115a6289html.html : 6
What is the max value of print delay and resource timeout in studio menu?
Thank You in Advance.