Jasper reports 向页脚栏添加扩展列表项(Jasper报告)

Jasper reports 向页脚栏添加扩展列表项(Jasper报告),jasper-reports,ireport,Jasper Reports,Ireport,是否可以通过增加列表组件的详细信息来扩展页脚的高度。我创建了一个测试jasper报告来模拟这种情况 <?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:

是否可以通过增加列表组件的详细信息来扩展页脚的高度。我创建了一个测试jasper报告来模拟这种情况

<?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="footer_test" language="groovy" pageWidth="595" pageHeight="842" whenNoDataType="AllSectionsNoDetail" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="1ab4a8b2-176a-422c-b4e2-afd6b2f5c01e">
    <property name="ireport.zoom" value="1.0"/>
    <property name="ireport.x" value="0"/>
    <property name="ireport.y" value="0"/>
    <subDataset name="dataset1" uuid="cd6ab13b-6111-4e9f-897b-afe354e16a24">
        <queryString>
            <![CDATA[select t.first_name,t.last_name from test_footer as `t` limit 0,3;]]>
        </queryString>
        <field name="first_name" class="java.lang.String">
            <fieldDescription><![CDATA[]]></fieldDescription>
        </field>
        <field name="last_name" class="java.lang.String">
            <fieldDescription><![CDATA[]]></fieldDescription>
        </field>
    </subDataset>
    <background>
        <band splitType="Stretch"/>
    </background>
    <title>
        <band height="79" splitType="Stretch"/>
    </title>
    <pageHeader>
        <band height="35" splitType="Stretch"/>
    </pageHeader>
    <columnHeader>
        <band height="61" splitType="Stretch"/>
    </columnHeader>
    <detail>
        <band height="125" splitType="Stretch"/>
    </detail>
    <columnFooter>
        <band height="45" splitType="Stretch"/>
    </columnFooter>
    <pageFooter>
        <band height="54" splitType="Stretch">
            <frame>
                <reportElement uuid="4d39142a-5378-4c16-9f34-7bcfe334f8aa" x="0" y="0" width="555" height="33" isPrintWhenDetailOverflows="true"/>
                <componentElement>
                    <reportElement uuid="4292c68b-c14a-4edd-9077-19164fcab508" x="0" y="0" width="555" height="33" isPrintWhenDetailOverflows="true"/>
                    <jr:list xmlns:jr="http://jasperreports.sourceforge.net/jasperreports/components" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports/components http://jasperreports.sourceforge.net/xsd/components.xsd" printOrder="Vertical">
                        <datasetRun subDataset="dataset1" uuid="b787c354-2d90-45c7-9927-2106939bb2da">
                            <connectionExpression><![CDATA[$P{REPORT_CONNECTION}]]></connectionExpression>
                        </datasetRun>
                        <jr:listContents height="33" width="555">
                            <textField>
                                <reportElement uuid="1ca36f79-f891-4e45-83fd-c3e4cdb44b92" x="0" y="0" width="100" height="20"/>
                                <textElement/>
                                <textFieldExpression><![CDATA[$F{first_name}]]></textFieldExpression>
                            </textField>
                            <textField>
                                <reportElement uuid="21fb2a6e-4a3d-488b-a203-136c63e3c5f0" x="322" y="0" width="100" height="20"/>
                                <textElement/>
                                <textFieldExpression><![CDATA[$F{last_name}]]></textFieldExpression>
                            </textField>
                            <line>
                                <reportElement uuid="3c56f817-e07f-4dde-9d7a-89a4bea76c2d" x="0" y="20" width="266" height="1"/>
                            </line>
                            <line>
                                <reportElement uuid="716e36f4-884a-431c-b483-a005cbaf966a" x="322" y="21" width="219" height="1"/>
                            </line>
                        </jr:listContents>
                    </jr:list>
                </componentElement>
            </frame>
            <line>
                <reportElement uuid="0dfbaf15-6aa5-4560-ba8f-824b35df2914" x="0" y="33" width="555" height="1" forecolor="#0033FF" backcolor="#0033CC"/>
                <graphicElement>
                    <pen lineWidth="4.0" lineColor="#0033FF"/>
                </graphicElement>
            </line>
            <textField pattern="MM/dd/yyyy h:mm a">
                <reportElement uuid="1406ccec-0c5c-450b-a6e8-91aeda0d0619" x="0" y="34" width="166" height="20"/>
                <textElement/>
                <textFieldExpression><![CDATA[new java.util.Date()]]></textFieldExpression>
            </textField>
        </band>
    </pageFooter>
    <summary>
        <band height="42" splitType="Stretch"/>
    </summary>
</jasperReport>

但是现在列表中的所有项目都没有打印出来,可能是因为页脚带的高度不够

但当我增加页脚带的高度时,所有项目都会打印出来


所以,我的问题是,有没有一种方法可以随着列表组件中项目的增加而增加页脚栏的高度。我需要在页脚中添加列表组件,因为它迭代用户签名。

页脚栏需要有一个固定的大小。否则JR不知道什么时候开始添加页脚。好的,所以这是不可能的。但是,我们是否可以添加此详细信息栏,但在不禁用分页的情况下将其打印在页脚上方?我们是否可以添加此详细信息栏,但将其打印在页脚上方?因为您通常不知道页面上的最后一个详细信息实例,我看不到此功能。或者您是否有其他信息,例如,每页是否只有足够的空间容纳一个详细信息实例?您的示例JRXML似乎表明签名者的数量是动态的,但不依赖于其他报表内容。如果这是正确的,你可以通过某种方式解决这个问题。是的,签名者的数量是动态的。比如说,我会将其添加到摘要栏中,以便在细节栏后打印,但我希望这些签名显示在页脚上方。有可能吗?。我将再次提醒您,禁用分页以实现这一点不是一个选项