Possible to hve conditional text within a docx tempalte

I wonder if i can use conditional text within a template. I want have some text lines within the report that depend on the report output variables. To make that clear here an easy example.

if ${band.credit} > 0 
    "You get ${band.credit} paied."
else
   "Please pay until the 02/02/2020 ${band.credit} to the account XXX."

You cannot write this code in a DOCX template, but you can do it in a Groovy dataset and use the result in the template.

1 Like