Questions about flow of information between portal, webservice, and jsreports



  • Hi all. I'm new to jsreports and am documenting a high-level process flow of integrating our portal with jsreports and a web service to get the data from our data warehouse.

    Could you give me a stamp of approval or suggestions for this flow?

    • User views report select page in my portal and enters/select parameters.
    • Portal calls my custom web service with report parameters.
    • My custom web service queries the data warehouse to get the data set.
    • My custom web service calls jsreports and provides the data set for the report.
    • jsreports renders the report as a PDF.
    • PDF appears in the user's browser window as a download.

    Diagram: Sequence Diagram

    I have a couple of questions/doubts that I hope you can help me with:

    • What method is used to pass a JSON file from my web service to jsreports?
    • How do return the PDF that is generated by jsreports back to the portal web page?

    Thank you for your help!
    Jerry



  • Could you give me a stamp of approval or suggestions for this flow?

    Yes, this looks like pretty much the most common flow.

    What method is used to pass a JSON file from my web service to jsreports?

    You send the report data inside the API http POST request body
    https://jsreport.net/learn/api

    How do return the PDF that is generated by jsreports back to the portal web page?

    jsreport sends back the pdf binary stream. You will send it to your web application client and display the pdf from jsreport as any other pdf.

    You can find how we display pdf in our jsreport browser client here and use the same approach.
    https://github.com/jsreport/jsreport/blob/master/packages/browser-client/src/jsreport.js
    However, you can use any approach you find on the internet.



  • Thank you so much!!!


Log in to reply
 

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