Saving report to FS / MongoDB



  • I've been trying to explore jsreport-core. I've been using jsreport-handlebars with chrome-pdf recipe for generating pdfs. What I'd appreciate help in figuring out is how to use jsreport-fs-store or mongodb-store to save the generated reports in file system or in Mongo with a custom name for each report. All examples somehow just focus only on retrieving templates.

    Is there any example for such usage?
    Thank


  • administrators

    hi! right now we don't have specific examples that uses just jsreport-core.

    however here are some steps that you need to do:

    the best will be to add jsreport-fs-store or jsreport-mongodb-store and configure your instance to use it, then you can add jsreport-reports extensions that is designed to store the reports on the configured blobStorage of your instance, you can configure the blobStorage to be based on the file system (fs-store) or in mongodb (mongodb-store), you just need to specify it in your config. then when you are rendering make sure to pass the options needed to save the generated report.


Log in to reply
 

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