D3_GXT_Java D3_GXT_Java - 1 year ago 114
Java Question

How to use lambda expression in jrxml file?

I am trying to use lambda expression inside jrxml file to get values for my field.

I imported appropriate classes but it is giving me error that

p cannot be resolved to a variable.

How to use a lambda expression inside JasperReports's templates?.



net.sf.jasperreports.engine.JRException: Errors were encountered when compiling report expressions class file:
1. p cannot be resolved to a variable

Answer Source

If you're using the Eclipse JDT compiler, first make sure that you have a fairly recent version.

You can get 4.5.1 from Maven for instance, then add the following properties to your jasperreports.properties file: