Using html-with-browser-client to render report through node.
-
Hi,
I am trying to generate a report through node using jsreport package and html-with-browser-client recipe. But i am getting an error saying "Cannot read property baseUrl of undefined".
I am using jsreport.generate() to generate my report and return the response to UI.
I also tried setting jsreport.serverUrl but this did not help.Kindly let me know what i am missing.
Thanks.
-
hi! can you show the code that you are trying (template source, etc)? or even better create the template on http://playground.jsreport.net save it and then share the URL here so we can try the same and tell what is wrong
-
Hi
I even I am facing same error. But I am using JSreports Core package and not the full installation.
Please check the issue details:
https://forum.jsreport.net/topic/1105/can-i-use-html-with-browser-client-recipe-with-jsreport-core-package/3
-
@Mayura-Deshmukh let's move the conversation here https://github.com/jsreport/jsreport-core/issues/47
-
Hi @bjrmatos .Thanks for the quick reply.
Actually when we tested the same in jsreport studio, it worked fine for us. Hence we are sharing the code snippet instead of creating a template on playground.
We are using the below method to generate the report and return it to client to display on web :return this._jsreport.render({ template: { content: this.template(args.recipe), helpers: this._helper, engine: "handlebars", recipe: "html-with-browser-client", scripts: this.scripts(), resources: { items: dataIds, defaultLanguage: defaultLanguage } }, data: { reportName: this._name, reportDisplayName: this._displayName, scheduleType: "generate", filters: JSON.stringify(args.filters), recipe: args.recipe }, options: { language: args.language } })
If a template is required, we will create a template at playground and share the link.
-
i replied in the github issue, let's do future comments there