javafreemarkerxdocreport

Freemarker break line


I have such code in my template as merge field

[#list testList as tl] ${tl} [/#list]

but all tl printed near each other, but I have to print all tl on their own lines. If i will do like this

[#list testList as tl] 
${tl} 
[/#list]

I got an error that freemarker expects string literal or parameter, but got [/#list]


Solution

  • Found the way. Instead of one merge field I created three that looks like this: [#list testList as tl] ${tl} [/#list]