![](http://content.invisioncic.com/i328763/set_resources_3/84c1e40ea0e759e3f1505eb1788ddf3c_pattern.png)
mistub
-
Posts
2 -
Joined
-
Last visited
Content Type
Forum
Downloads
Featured Visualizations
Knowledge Base
Documentation (PDF Downloads)
Blog
Documentation (Test Area)
Documentation
Dr. Jaspersoft Webinar Series
Security Advisories
Events
Profiles
Posts posted by mistub
-
-
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
Null value for DistinctCount
in Products
Posted
Thx a lot! null did the trick! Kind regards, Michael