JRXML operator error-Collection of common programming errors
I’m getting this error when compiling my JRXML file in iReport 3.1.2:
com.jaspersoft.ireport.designer.errorhandler.ProblemItem@f1cdfb The operator > is undefined for the argument type(s) java.lang.Integer, java.lang.Integer net.sf.jasperreports.engine.design.JRDesignExpression@eb40fe
The only place in my entire report where I use the operator > is here:
new Integer("0")) ? new String("AND loctn_sctn_id = " + $P{sectionId}) : new String("")]]>
Google hasn’t been my friend on that one. Any Jasper template expert out there has a vague idea on what’s going on?
-
Figured out how to compare 2 Integers in the JRXML. Instead of doing this:
$P{sectionId} > new Integer("0")
The solution is this:
$P{sectionId}.compareTo(new Integer("0")) != 0
That looks a little convoluted but it works for me. 🙂