可以爲name
場創建組,並設置isStartNewPage
屬性爲Group
帶。
樣本:
<queryString>
<![CDATA[SELECT name, description, value FROM table_name ORDER BY name]]>
</queryString>
<field name="name" class="java.lang.String"/>
<field name="description" class="java.lang.String"/>
<field name="value" class="java.lang.Integer"/>
<group name="nameGroup" isStartNewPage="true">
<groupExpression><![CDATA[$F{name}]]></groupExpression>
<groupHeader>
<band height="20">
<textField>
<reportElement x="0" y="0" width="200" height="20"/>
<textElement/>
<textFieldExpression><![CDATA["Name: " + $F{name}]]></textFieldExpression>
</textField>
</band>
</groupHeader>
</group>
<detail>
<band height="20" splitType="Stretch">
<textField>
<reportElement x="0" y="0" width="100" height="20"/>
<textElement/>
<textFieldExpression><![CDATA[$F{description}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="100" y="0" width="100" height="20"/>
<textElement/>
<textFieldExpression><![CDATA[$F{value}]]></textFieldExpression>
</textField>
</band>
</detail>
通過分組的名稱來實現它。 – user1120946 2012-02-26 14:21:51