当记录分为2页时,如何避免丢失单元格的边框? [英] How to avoid of missing cell's border when a record is separated between 2 pages?

查看:100
本文介绍了当记录分为2页时,如何避免丢失单元格的边框?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当页面中的最后一个条目太长时,它将显示在下一页,当它显示所有表格行缺失时。

When the last entry in a page is too long, It will show in next page, when it show all the table line is missing.

这是结果:

如何将最后一条记录(第26条)移至下一页,或如何显示该行?

How do I move the last record (no.26) to the next page, or how I can show the line?

推荐答案

您可以将 staticText 元素放在 textField 元素后面。您应该使用 RelativeToTallestObject 值和 <设置 stretchType 属性code> isPrintWhenDetailOverflows 属性 true 值。

You can put the staticText element without text behind the textField element. You should set stretchType property with RelativeToTallestObject value and isPrintWhenDetailOverflows property with true value.

样本:

<detail>
    <band height="20" splitType="Stretch">
        <staticText>
            <reportElement stretchType="RelativeToTallestObject" x="0" y="0" width="100" height="20" isPrintWhenDetailOverflows="true"/>
            <box>
                <leftPen lineWidth="1.0"/>
                <bottomPen lineWidth="1.0"/>
                <rightPen lineWidth="1.0"/>
            </box>
            <textElement/>
            <text><![CDATA[]]></text>
        </staticText>
        <textField>
            <reportElement stretchType="RelativeToTallestObject" x="0" y="0" width="100" height="20"/>
            <box>
                <leftPen lineWidth="1.0"/>
                <bottomPen lineWidth="1.0"/>
                <rightPen lineWidth="1.0"/>
            </box>
            <textElement/>
            <textFieldExpression><![CDATA[$F{id}]]></textFieldExpression>
        </textField>

结果您将在第二页获得垂直边框。

As result you will get the vertical border at the second page.

结果之前添加第二个 staticText 是(第二页的垂直边框缺席):

The result before adding the second staticText was (the vertical border at the second page is absent):

这篇关于当记录分为2页时,如何避免丢失单元格的边框?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆