Render report through API with custom parameters and post-render scripts



  • Hello,

    We are interested in purchasing your product, but we need to verify a specific feature.

    jsreports would be deployed with our product to customer premise including pre-made reports. Through our interface, customers need to be able to schedule these reports and specify the email addresses that they will be sent to. They will also need to be able to specify date ranges and other parameters, that will in turn be used to gather the report data from our own api endpoint before rendering.

    Is it possible, through your API, to render a report passing custom parameters and email recipients?


  • administrators

    hi!

    Is it possible, through your API, to render a report passing custom parameters and email recipients?

    with our API you have full control of every part of the rendering, this includes rendering reports based on dynamic data, for your case i think you have the following options:

    reports based on dynamic parameters

    • you can use the parameters of the user to call your custom api endpoint (the request will happen in your backend) to gather all the data that your report template need, and then call jsreport http API (or any other method you want) to render the report with the collected data.
    • you can use the parameters of the user to call your custom api endpoint in jsreport's beforeRender script (this time the request will happen in jsreport app) , in this hook/event you can call your api and use the response to populate the data that jsreport will use to render.

    scheduling

    • handling scheduling on your own, using any external scheduling mechanism you want, maybe something you have built in-house that your apps are currently using, and just call jsreport using our http API (or any other method you want) when the time to render comes.
    • handling scheduling with jsreport using our scheduling extension and if the time of scheduling needs to change (because of user have changed it with your interface) then just call jsreport http API to update the definition of the scheduling.

    sending emails

    • you can use any external method to send the email to users, maybe something that you are already using in your apps
    • you can use jsreport's afterRender script to send the email, in this hook/event you can send the email using some node.js module or you can do a http request to some email service that does this job.

    what you choose depends just in what way you want to work, jsreport is intentionally flexible to not lock specific use cases of the user.


Log in to reply
 

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