I have a field ($P{ORDER}.permit) which is Integer (0,1) and I’d like to display it as a String (“No”, “Yes”). So I added below keys to ResourceBoundle:
order.permit.0=No
order.permit.1=Yes
I wrote expression $R{order.permit.$P{ORDER}.permit} but it doesn’t work. An exception is thrown
net.sf.jasperreports.engine.JRException: Too many groovy classes were
generated. Please make sure that you don’t use Groovy features such as
closures that are not supported by this report compiler.
I suspect that this exception is caused by nesting jasper expressions or nesting them in wrong way.
How should I write the expression to achieve desired result?
EDIT: str("order.permit." + $P{ORDER}.permit) is the answer. Details in the below post.
Use
str()instead of$R{}.See also http://jasperforge.org/plugins/espforum/view.php?group_id=102&forumid=103&topicid=54665: