Hello Everyone,
We have a scenario where if the screen gives any exception or timeout error, the Ultimate PDF component still returns the binary output file with error screenshot.
We want to show the error message to users if there was any exception or timeout error in loading the screen.
Also we have some timers where we generate some documents and save them in the database. Currently we are checking if the output binary file is not null binary then we save this information in the database.
However we do not want to save any document with error, so we were looking if this component has any way to identify if the screen was converted to PDF without any exceptions? or if it can be enhanced to return the a flag as output parameters indicating there was no exceptions in the screen while loading the screen for PDF generation.
Attaching a sample output with exception.
Regards,
Zubair
Hi Zubair.
An alternative would be to execute the "data fetch" logic needed by the PDF screen prior to navigating to it, and saving the data on the database. Then, if there's an error, you can handle it even before producing the PDF. If there is no error, the data is saved on the database, and the actual PDF screen can read it from there, which will minimize if not eliminate the timeouts.
Hi Zubair,
I've faced this same issue in one of my projects, and this is how I handled it:
This allows you to detect when there was an error generating the PDF and act accordingly.
Please be advised that you might have to ajust the number of KBs used in the comparison, depending on the size of your reports. In my case, it was safe to assume that a file with 10KB or less was always the result of an exception.