string comparision/conditional statements

  • Hi,

    We are using dynamic report template (not using stored templates). We have challenge in using the if condition for string comparision and learnt from this link its not possible

    So we have written some helper functions, but since we not using stored templates, how can we use these helper functions?

  • You just send the helpers with the template content in the helpers property

       "template": {
         "content": "{{myHelper}}",
         "helpers": "function myHelper() { return 'foo' }",
         "engine": "handlebars",
         "recipe":  "chrome-pdf"
      "data": ...   

Log in to reply

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