In my report, I have two values of column "Status" are: Y/N. I want to count "Y" in "Status". I created a variable $V{count_y} with Variable Expression : String.valueOf($F{status})=="Y" but $V{count_y} count all record (include Y and N).
<variable name="count_y" class="java.lang.Integer" calculation="Count">
<variableExpression><![CDATA[String.valueOf($F{status})=="Y"]]></variableExpression>
</variable>
Now, how can i count? Thanks !
Create variable like this
and put $V{countY} into Summary band