我有两列,例如
ITP,VPVP
250,10
330,10
255,20
565,10
84,20....
$F(ITP)
$F(VPVP)
如何求和VPVP 10和VPVP 20的值?
例如,在报告中
The sum for 10 is: 1145 (250+330+565 - This should not be written)
The sum for 20 is: 339 (255+84 - This should not be written)
我尝试了类似的方法,但这并不好:
<variable name="The sum for 10 is:" class="java.math.BigDecimal" calculation="Sum">
<variableExpression><![CDATA["10".equals($F{VPVP})?$F{ITP}:$V{zero}]]></variableExpression>
</variable>