gpt4 book ai didi

jasper-reports - 当记录分隔在两页之间时,如何避免丢失单元格边框?

转载 作者:行者123 更新时间:2023-12-02 02:04:17 25 4
gpt4 key购买 nike

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

这是结果:

enter image description here

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

最佳答案

您可以将不带文本的 staticText 元素放在 textField 元素后面。您应该将 stretchType 属性设置为 RelativeToTallestObject 值和 isPrintWhenDetailOverflows 具有真实值的属性。

示例:

<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>

因此,您将在第二页看到垂直边框。

The text from resulting PDF file with vertical border after using the staticText

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

The text from resulting PDF file without vertical border before using the staticText

关于jasper-reports - 当记录分隔在两页之间时,如何避免丢失单元格边框?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8870482/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com