How to throw error from jsreport engine if it fails to render report (Rendering async report)?



  • Hi sir,

    We are rendering our report asynchronously using jsreport-browser client package from our angular application.
    Since the report rendering is asynchronous a url will be return like this,

    Async rendering in progress. Use Location response header to check the current status. Check it <a href='http://localhost:5488/reports/624eadda935011c1881550db/status'>here</a>

    And after that using afterRender hook we send a message to our client side that report rendering is completed using AWS websocket and SNS).

    But my doubt is, if report render fails at beforeRender hook itself then how to throw the error from beforeRender hook to our client side ,because now jsreport-browser-client is returning only url like this,

    Async rendering in progress. Use Location response header to check the current status. Check it <a href='http://localhost:5488/reports/624eadda935011c1881550db/status'>here</a>

    Could you please suggest any solution?



    • I have written sub function inside before render , suppose if there is any exception comes in any of subfunction how can i throw those error from jsreport to client?
      Could you please show me one example which handle exception inside jsreport and throw those error to client.Actually is show in jsreport terminal while rendering renport from local host (In AWS error is shown in cloudwatch log) but my issue is how to throw this error from jsreport log to client side?

      jsreport-browser-client package is we are using to render our report from angular application.

    Could you please suggest me any solution?


Log in to reply
 

Looks like your connection to jsreport forum was lost, please wait while we try to reconnect.