Hi all
I got a silly problem with DistinctCount.
In the expression (jrxml):
<variable name="TICKET_COUNT_P1" class="java.lang.Integer" calculation="DistinctCount">
<variableExpression><![CDATA[( $F{payment}.intValue() == 1 ? $F{ticket_no} : new Integer(0))]]></variableExpression>
</variable>
the Null value (Integer(0) is interpreted as a distinct value and therefore - even there is no payment-type of 1 - the sum of the DistinctCounts will be 1, not 0 as expected. How do I create a real Null value that isn't counted?
Kind regards, Michael