Configure what path reports are saved to
-
Hi
We have recently upgraded our jsreport from version 2.11.0 to the latest version.
I have seen that the path in which reports have saved have changed. We are using azure for our blob storage.In 2.11.0 the rendered report was just saved into the root directory of the container.
In the latest version it mimics the folder structure of jsreport.Is there anyway that I can configure this? It will save some development on our application
Thanks for the help
-
I have tried to add the data directory to the config file like so:
however it still does not save to just the reports directory.
-
You can implement jsreport custom script that will customize the path
https://jsreport.net/learn/scriptsasync function afterRender (req, res) { if (res.meta.reportsOptions) { res.meta.reportsOptions.blobName = "myreport" + new Date().getTime() } }
You can give it a global scope so you won't need to add it to every template.
-
Awesome thank you very much, working perfectly.