0
私は、グループ:columnHeader、columnFooter、およびタイトルと詳細に関するレポートを持っています。ジャスパーレポートの改ページ - グループ
私はそれが新しいページになりたいです。私はisStartNewPage="true"
、keepTogether
で試してみましたが、![CDATA[$V{PAGE_NUMBER}==...]]
で試しました。私が到達した最も遠いステップは、私ののcolumnHeaderがいくつかの新しいページに印刷されたときです(私のパラメータの値に依存します)。
改ページについてのご意見はありますか?
<group name="Categorii" isStartNewPage="true">
<groupHeader>
<band height="20">
<textField evaluationTime="Group" evaluationGroup="Categorii" bookmarkLevel="1" isStretchWithOverflow="true">
<reportElement x="0" y="5" width="208" height="15" style="TableGroup" stretchType="RelativeToTallestObject"/>
<box leftPadding="10" topPadding="2">
</box>
<textElement verticalAlignment="Middle" textAlignment="Left">
<font isBold="true"/>
</textElement>
<textFieldExpression class="java.lang.String">"Alte cheltuieli directe"</textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement x="208" y="5" mode="Opaque" width="347" height="15" style="TableGroup" stretchType="RelativeToTallestObject"/>
<box padding="2">
</box>
<textElement verticalAlignment="Top" textAlignment="Right">
<font isBold="true"/>
</textElement>
<textFieldExpression class="java.lang.String"><![CDATA[""]]></textFieldExpression>
</textField>
</band>
</groupHeader>
<groupFooter>
<band height="80">
<staticText>
<reportElement mode="Opaque" x="0" y="0" width="208" height="25" style="TableHeader" backcolor="white"/>
<textElement verticalAlignment="Middle" textAlignment="Right"/>
<text><![CDATA[]]></text>
</staticText>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement x="0" y="0" width="208" height="35" style="TableGroup" stretchType="RelativeToTallestObject"/>
<box padding="2">
<topPen lineWidth="0.5"/>
<bottomPen lineWidth="0.5"/>
</box>
<textElement verticalAlignment="Bottom" textAlignment="Left">
<font isBold="true"/>
</textElement>
<textFieldExpression class="java.lang.String">"TOTAL CHELT. DIRECTE "</textFieldExpression>
</textField>
<staticText>
<reportElement mode="Opaque" x="208" y="0" width="68" height="25" style="TableHeader" backcolor="white"/>
<textElement verticalAlignment="Middle" textAlignment="Center"/>
<text><![CDATA[Mo]]></text>
</staticText>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement x="208" y="0" width="68" height="35" style="TableGroup" stretchType="RelativeToTallestObject"/>
<box padding="2">
<topPen lineWidth="0.5"/>
<bottomPen lineWidth="0.5"/>
</box>
<textElement verticalAlignment="Bottom" textAlignment="Right">
<font isBold="true"/>
</textElement>
<textFieldExpression class="java.math.BigDecimal"><![CDATA[$F{sub_cat_material}]]></textFieldExpression>
</textField>
<staticText>
<reportElement mode="Opaque" x="276" y="0" width="68" height="25" style="TableHeader" backcolor="white"/>
<textElement verticalAlignment="Middle" textAlignment="Center"/>
<text><![CDATA[mo]]></text>
</staticText>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement x="276" y="0" width="68" height="35" style="TableGroup" stretchType="RelativeToTallestObject"/>
<box padding="2">
<topPen lineWidth="0.5"/>
<bottomPen lineWidth="0.5"/>
</box>
<textElement verticalAlignment="Bottom" textAlignment="Right">
<font isBold="true"/>
</textElement>
<textFieldExpression class="java.math.BigDecimal"><![CDATA[$F{sub_cat_manopera}]]></textFieldExpression>
</textField>
<staticText>
<reportElement mode="Opaque" x="344" y="0" width="68" height="25" style="TableHeader" backcolor="white"/>
<textElement verticalAlignment="Middle" textAlignment="Center"/>
<text><![CDATA[Uo]]></text>
</staticText>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement x="344" y="0" width="68" height="35" style="TableGroup" stretchType="RelativeToTallestObject"/>
<box padding="2">
<topPen lineWidth="0.5"/>
<bottomPen lineWidth="0.5"/>
</box>
<textElement verticalAlignment="Bottom" textAlignment="Right">
<font isBold="true"/>
</textElement>
<textFieldExpression class="java.math.BigDecimal"><![CDATA[$F{sub_cat_utilaj}]]></textFieldExpression>
</textField>
<staticText>
<reportElement mode="Opaque" x="412" y="0" width="68" height="25" style="TableHeader" backcolor="white"/>
<textElement verticalAlignment="Middle" textAlignment="Center"/>
<text><![CDATA[to]]></text>
</staticText>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement x="412" y="0" width="68" height="35" style="TableGroup" stretchType="RelativeToTallestObject"/>
<box padding="2">
<topPen lineWidth="0.5"/>
<bottomPen lineWidth="0.5"/>
</box>
<textElement verticalAlignment="Bottom" textAlignment="Right">
<font isBold="true"/>
</textElement>
<textFieldExpression class="java.math.BigDecimal"><![CDATA[$F{sub_cat_transport}]]></textFieldExpression>
</textField>
<staticText>
<reportElement mode="Opaque" x="480" y="0" width="68" height="25" style="TableHeader" backcolor="white"/>
<textElement verticalAlignment="Middle" textAlignment="Center"/>
<text><![CDATA[To]]></text>
</staticText>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement x="480" y="0" width="75" height="35" style="TableGroup" stretchType="RelativeToTallestObject"/>
<box padding="2">
<topPen lineWidth="0.5"/>
<bottomPen lineWidth="0.5"/>
</box>
<textElement verticalAlignment="Bottom" textAlignment="Right">
<font isBold="true"/>
</textElement>
<textFieldExpression class="java.math.BigDecimal"><![CDATA[$F{sub_cat_total}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement x="0" y="35" width="150" height="15" style="TableGroup" stretchType="RelativeToTallestObject"/>
<box padding="2">
<topPen lineWidth="0.5"/>
<bottomPen lineWidth="0.5"/>
</box>
<textElement verticalAlignment="Bottom" textAlignment="Left">
<font isBold="true"/>
</textElement>
<textFieldExpression class="java.lang.String">"Cheltuieli indirecte "</textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement x="180" y="35" width="280" height="15" style="TableGroup" stretchType="RelativeToTallestObject"/>
<box padding="2">
<topPen lineWidth="0.5"/>
<bottomPen lineWidth="0.5"/>
</box>
<textElement verticalAlignment="Bottom" textAlignment="Left">
<font isBold="true"/>
</textElement>
<textFieldExpression class="java.lang.String">"Io = 5.000% x To"</textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement x="450" y="35" width="105" height="15" mode="Opaque" style="TableData" stretchType="RelativeToTallestObject"/>
<box padding="2">
<topPen lineWidth="0.5"/>
<bottomPen lineWidth="0.5"/>
</box>
<textElement verticalAlignment="Top" textAlignment="Right">
<font isBold="true"/>
</textElement>
<textFieldExpression class="java.math.BigDecimal"><![CDATA[$F{sub_total}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement x="0" y="50" width="180" height="15" style="TableGroup" stretchType="RelativeToTallestObject"/>
<box padding="2">
<topPen lineWidth="0.5"/>
<bottomPen lineWidth="0.5"/>
</box>
<textElement verticalAlignment="Bottom" textAlignment="Left">
<font isBold="true"/>
</textElement>
<textFieldExpression class="java.lang.String">"Profit "</textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement x="180" y="50" width="280" height="15" style="TableGroup" stretchType="RelativeToTallestObject"/>
<box padding="2">
<topPen lineWidth="0.5"/>
<bottomPen lineWidth="0.5"/>
</box>
<textElement verticalAlignment="Bottom" textAlignment="Left">
<font isBold="true"/>
</textElement>
<textFieldExpression class="java.lang.String">"Po = 5.000% x (To+Io) "</textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement x="450" y="50" width="105" height="15" mode="Opaque" style="TableData" stretchType="RelativeToTallestObject"/>
<box padding="2">
<topPen lineWidth="0.5"/>
<bottomPen lineWidth="0.5"/>
</box>
<textElement verticalAlignment="Top" textAlignment="Right">
<font isBold="true"/>
</textElement>
<textFieldExpression class="java.math.BigDecimal"><![CDATA[$F{sub_total}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement x="0" y="65" width="180" height="15" style="TableGroup" stretchType="RelativeToTallestObject"/>
<box padding="2">
<topPen lineWidth="0.5"/>
<bottomPen lineWidth="0.5"/>
</box>
<textElement verticalAlignment="Bottom" textAlignment="Left">
<font isBold="true"/>
</textElement>
<textFieldExpression class="java.lang.String">"TOTAL GENERAL pe categorie "</textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement x="180" y="65" width="280" height="15" style="TableGroup" stretchType="RelativeToTallestObject"/>
<box padding="2">
<topPen lineWidth="0.5"/>
<bottomPen lineWidth="0.5"/>
</box>
<textElement verticalAlignment="Bottom" textAlignment="Left">
<font isBold="true"/>
</textElement>
<textFieldExpression class="java.lang.String">"Vo = To+Io+Po "</textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement x="450" y="65" width="105" height="15" mode="Opaque" style="TableData" stretchType="RelativeToTallestObject"/>
<box padding="2">
<topPen lineWidth="0.5"/>
<bottomPen lineWidth="0.5"/>
</box>
<textElement verticalAlignment="Top" textAlignment="Right">
<font isBold="true"/>
</textElement>
<textFieldExpression class="java.math.BigDecimal"><![CDATA[$P{total_general}]]></textFieldExpression>
</textField>
</band>
</groupFooter>
</group>
問題を再現するために小さな* jrxml *を投稿する必要があります+スクリーンショット –
@AlexK私のグループのコードを投稿しました。私はそのグループを新しいページにしたい。ありがとうございました。 –
問題を再現するための本当に小さな(そして完全な)テンプレートはどうでしょうか? –