Display count sum in a group header(Jasper Report)

My code:

 1 <variable name="Chart" class="net.sf.jasperreports.engine.JRRenderable" calculation="System"/>
 2     <variable name="Counts" class="java.lang.Integer" resetType="Group" resetGroup="BgCheckOverallStatusGroup" calculation="Count">
 3         <variableExpression><![CDATA[$F{personUniqueID}]]></variableExpression>
 4         <initialValueExpression><![CDATA[0]]></initialValueExpression>
 5     </variable>
 6 
 7 ...
 8 
 9 <groupHeader>
10             <band height="15">
11                 <textField evaluationTime="Group" evaluationGroup="BgCheckOverallStatusGroup">
12                     <reportElement uuid="f5c1b936-6a8a-4b51-ba5f-ed69343f34f4" style="Arial_Bold" x="508" y="0" width="46" height="15" forecolor="#000000"/>
13                     <textElement textAlignment="Left" verticalAlignment="Middle"/>
14                     <textFieldExpression><![CDATA[$V{Counts}]]></textFieldExpression>
15                 </textField>
16             </band>
17         </groupHeader>

 

posted on 2013-06-01 01:21  Step-BY-Step  阅读(499)  评论(0编辑  收藏  举报

导航