How to repeat a single band in group header if the

2019-08-04 00:21发布

I need to repeat the immediate band if the detail section spans for multiple pages.

Below is my source code related to group headers. Here I want to repeat the 2nd band (height = 25) if the detail band spanned to the next page. How can I repeat only the 2nd band

<group name="Lines">
    <groupExpression><![CDATA[$F{ordernum}]]></groupExpression>
    <groupHeader>
        <band height="102">

        </band>
        <band height="25">

        </band>
    </groupHeader></group><detail>
    <band height="40" splitType="Stretch"></band></detail>

enter image description here

1条回答
戒情不戒烟
2楼-- · 2019-08-04 01:09

Instead of 1 group with 2 bands use 2 groups with 1 band and set the attribute isReprintHeaderOnEachPage to true on the group you like to reprint on every page.

<group name="Lines1">
    <groupExpression><![CDATA[$F{ordernum}]]></groupExpression>
    <groupHeader>
        <band height="102">
        ...
</group>
<group name="Lines2" isReprintHeaderOnEachPage="true">
    <groupExpression><![CDATA[$F{ordernum}]]></groupExpression>
    <groupHeader>
        <band height="25">
        ....
</group>
查看更多
登录 后发表回答