Using external report parameters in template


I’ve got a question about using external report parameters in template. I use external report parameters to pass simple data types (strings and dates) to report and then I want to print these values to HTML template.

I pass value user = ‘Jozef’ into report and then in HTML template I want to do something like this:
<p> USER: <value-of-user-parameter> </p> to get <p> USER: Jozef </p>

When I use ${root.user} syntax, I get an exception that “.” operand expects hash, not string.

Can you help me?


The possible solution is to create the Groovy band that returns corresponding parameter value and use band values in the HTML-template. For example, you can create band User and access band values like:

<#assign user = Root.bands.User[0] />
<p>Name: ${}</p>


Thank you for answer, I solved it by creating Groovy band that reads external parameters as you suggested. I asked because my first thought was that external parameters could (or should) be used without explicit binding.

I marked this question as solved. Thank you Andrey.