[#3810] - The operator > is undefined

Category:
Bug report
Priority:
High
Status:
New
Project: Severity:
Minor
Resolution:
Open
Component: Reproducibility:
N/A
Assigned to:
0

PrintWhenExpression failed:
<printWhenExpression><![CDATA[($V{Mandantennummer_COUNTER} != null ? $V{Mandantennummer_COUNTER} : new Integer(0)) > ($V{Mandantennummer_COUNT_VALUE_1} != null ? $V{Mandantennummer_COUNT_VALUE_1} : new Integer(1))]]></printWhenExpression>

Message:
The operator > is undefined for the argument type(s) java.lang.Integer, java.lang.Integer

Declaration:
<variable name="Mandantennummer_COUNTER" class="java.lang.Integer" resetType="Report" calculation="DistinctCount">
<variableExpression><![CDATA[$F{MandantNo}]]></variableExpression>
<initialValueExpression><![CDATA[Integer.valueOf("0") ]]></initialValueExpression>
</variable>
<variable name="Mandantennummer_COUNT_VALUE_1" class="java.lang.Integer" resetType="None" calculation="Nothing">
<initialValueExpression><![CDATA[Integer.valueOf("1")]]></initialValueExpression>
</variable>
This was a given solution if it not possible to compare directly with Integer.parseInt(1).

The same works in 5.5. Unfortunately I have to use 3.0 in a project.
When was it fixed?
Is there a workaround?
The Goal:
Print a field only if group of Mandantennummer is not unique.

v3.0
mpeters_1's picture
Joined: Jan 2 2014 - 4:47am
Last seen: 7 years 1 month ago

1 Comment:

#1
  • Assigned:nobody»

Following hint I have found in forum "Use CompareTo"
New Code:
$V{Mandantennummer_COUNTER}.CompareTo($V{Mandantennummer_COUNTER})
Raise an error also:
The method CompareTo(Integer) is undefined for the Type Integer.

Feedback
randomness