I am trying to use lamda 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 lamda expression inside jasper. Please help. I am using jasperreports 6.3.0. <jr:listContents height="20" width="400"> <textFieldExpression> <![CDATA[stringUtils.join(((Collection<Property>)((Object2)$F{field1}.getPropertyValue("property1")).getPropertyValue("property2")).stream().map(p->((Object1)p.getValue()).getName()).collect(toList()),',');]]></textFieldExpression> </textField> </jr:listContents> </jr:list> Exception net.sf.jasperreports.engine.JRException: Errors were encountered when compiling report expressions class file: 1. p cannot be resolved to a variable