如何在我的 table 的底部添加一行?

How to add a line to the bottom of my table?

我正在使用 Java Swing with JasperReports。在 Jasper 中,我有 Band: Details. 中的项目,我围绕它们创建了线条(顶部、左侧、右侧)。问题是底部的线。

报表布局

当我放入页脚并 运行 它时 - 线条不会关闭正方形。我怎样才能关闭这个方块并且独立于我有多少物品?

当前输出,预期结果

要在每个页面 table 的 末尾添加边框 使用 columnFooter 带并在 [=14= 上设置 isFloatColumnFooter="true" ] 标签

示例

<?xml version="1.0" encoding="UTF-8"?>
<jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" name="Example" pageWidth="595" pageHeight="842" columnWidth="500" leftMargin="20" rightMargin="20" topMargin="30" bottomMargin="30"  isFloatColumnFooter="true" uuid="43c90ca5-f3c3-4dda-8423-9ff1442f90e3">
    .....
   <columnFooter>
    <band height="2">
        <line>
            <reportElement x="0" y="0" width="555" height="1" uuid="1c32f6e5-414a-428d-8b06-35cd80e8dff6"/>
        </line>
    </band>
   </columnFooter>
</jasperReport>

要在 table 的 末尾添加边框(如果溢出则不在每一页上)使用虚拟组和 groupFooter

例子

<group name="lastBorderLine">
    <groupExpression><![CDATA["dummy"]]></groupExpression>  
    <groupFooter>
        <band height="2">
            <line>
                <reportElement x="0" y="0" width="555" height="1" uuid="3510fdc6-0f30-4ec9-8e17-ac51fd4012c1"/>
            </line>
        </band>
    </groupFooter>
</group>

已解决,添加群组。 我有 Band: Detail,在细节的顶部和底部有线条(以关闭矩形)。然后我在 Detail Band 下添加了 Group,仅此而已

P.S。我遵循@YasuyukiUno 的指示

您可以创建带底部边框的样式并将其应用于 table。这会在每个页面的 table 底部添加一行。