Can I put java code inside .jrxml (jasperreport)?

Is it possible to put java code inside .jrxml?

For example, I want to put if () or "new .. ()"

Is it possible? How?

thank

+5
source share
2 answers

You cannot put any code, you can only express expressions. So you can put:

  • new Something(someParameter)
  • somebool.booleanValue == true ? new Something() : new OtherThing();

but you can not use the if, for, switch, declare methods or classes.

+4
source

use scriptlet

Jasper Design Studio 6.2 Professional,

Eclipse Mars. 1 Release (4.5.1)

Jaspersoft 6.x - Hello World

0

All Articles