views:

245

answers:

1

Hi everyone,

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:

<parameter name="dynamicSectionCondition" class="java.lang.String" isForPrompting="false"><defaultValueExpression><![CDATA[($P{sectionId} != null && $P{sectionId} > new Integer("0")) ? new String("AND loctn_sctn_id = " + $P{sectionId}) : new String("")]]></defaultValueExpression>

Google hasn't been my friend on that one. Any Jasper template expert out there has a vague idea on what's going on?

+1  A: 

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. :)

Lancelot