jasper中的静态文本或文本(动态)字段可以跨越两个页面吗?

时间:2017-03-23 19:27:46

标签: jasper-reports

我正在制作一份长度为4-5页的pdf报告。我正在使用jasper studio来设计pdf文档。我创建了A4尺寸的文档,每边有20px的边距。我正在使用的是细节带,删除了所有其他乐队。细节带1保存page1内容,细节带2保持第2页等等。以下是我想要澄清的事情......

  1. 我的方法是否正确?因为我只使用细节带来保存内容?做 你看到排除所有其他乐队的任何问题?

  2. 我遇到了空格问题:detail band1包含page1, 这个乐队的高度为802px,持有3     部分,帧1(400像素)帧2(300像素)和帧3(192像素)。在我的     情况下,Frame2具有根据情况动态拉伸的内容     数据。如果Frame2延伸到350px,现在我只有52像素     留在第一个乐队,我的Frame3是192 px,结果是jasper     将此框架推到下一页。留下52px的空白空间     在第1页看起来很尴尬。有没有办法可以配置jasper来显示     第1页的第3帧为52 px,第2页为其余140 px,因此在任何给定时间都不会在pdf中显示空格?

  3. 我尝试在框架元素上使用StretchType属性并且似乎没有帮助,是否有人对此有任何输入?提前谢谢。

    示例jrxml说明了我的问题:

    <?xml version="1.0" encoding="UTF-8"?>
    <!-- Created with Jaspersoft Studio version 6.3.1.final using JasperReports Library version 6.3.1  -->
    <!-- 2017-03-24T14:43:38 -->
    <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="newIAA" pageWidth="595" pageHeight="842" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="8de39cec-dd1f-418f-8ba0-9735f2f410ba">
        <property name="com.jaspersoft.studio.data.defaultdataadapter" value="One Empty Record"/>
        <detail>
            <band height="802">
                <property name="com.jaspersoft.studio.unit.height" value="pixel"/>
                <frame>
                    <reportElement x="0" y="0" width="555" height="190" uuid="eb437bb0-bc94-43e5-8d78-a19c7b2a6b4e">
                        <property name="com.jaspersoft.studio.unit.x" value="pixel"/>
                        <property name="com.jaspersoft.studio.unit.width" value="pixel"/>
                    </reportElement>
                    <staticText>
                        <reportElement x="119" y="0" width="289" height="30" uuid="f2530fdd-884d-43cd-b504-f21e09c9db47">
                            <property name="com.jaspersoft.studio.unit.x" value="pixel"/>
                        </reportElement>
                        <box>
                            <pen lineWidth="1.0"/>
                            <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
                            <leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
                            <bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
                            <rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
                        </box>
                        <textElement textAlignment="Center">
                            <font size="22" isBold="true" isUnderline="true"/>
                        </textElement>
                        <text><![CDATA[Customer Invoice ]]></text>
                    </staticText>
                    <staticText>
                        <reportElement x="0" y="80" width="553" height="110" uuid="565fea21-e609-4fae-abdb-640f7c2d322d">
                            <property name="com.jaspersoft.studio.unit.x" value="pixel"/>
                        </reportElement>
                        <textElement markup="styled">
                            <font fontName="SansSerif" size="16"/>
                        </textElement>
                        <text><![CDATA[<b>Details : </b><br/><li>one</li><li>two</li><li>three</li><li>four</li>]]></text>
                    </staticText>
                </frame>
                <frame>
                    <reportElement positionType="Float" x="0" y="190" width="555" height="120" uuid="a28f4d54-6499-4a69-b23f-caf5bbe7d126">
                        <property name="com.jaspersoft.studio.unit.x" value="pixel"/>
                        <property name="com.jaspersoft.studio.unit.width" value="pixel"/>
                    </reportElement>
                    <staticText>
                        <reportElement x="0" y="30" width="555" height="190" uuid="5758f399-38cf-4f98-beda-ee25a9ae785f"/>
                        <textElement markup="styled"/>
                        <text><![CDATA[<b>Shipping Information </b><li>one</li><li>two</li><li>three</li><li>four</li><li>five</li><li>six</li><li>seven</li><li>eight</li><li>nine</li><li>ten</li><li>eleven</li><li>tweleve</li><li>thirteen</li><li>fourteen</li><li>fifteen</li>]]></text>
                    </staticText>
                </frame>
                <staticText>
                    <reportElement positionType="Float" stretchType="ContainerBottom" x="0" y="440" width="555" height="280" uuid="ed31eefd-ccc2-419f-b29e-d1f33a855b6a">
                        <property name="com.jaspersoft.studio.unit.x" value="pixel"/>
                        <property name="com.jaspersoft.studio.unit.width" value="pixel"/>
                        <property name="com.jaspersoft.studio.unit.height" value="pixel"/>
                    </reportElement>
                    <textElement textAlignment="Left" markup="styled">
                        <font size="12"/>
                    </textElement>
                    <text><![CDATA[<b>Address:</b><br/><li>one</li><li>two</li><li>three</li><li>four</li><li>five</li><li>six</li><li>seven</li><li>eight</li><li>nine</li><li>ten</li><li>eleven</li><li>tweleve</li><li>thirteen</li><li>fourteen</li><li>fifteen</li><li>sixteen</li><li>seventeen</li><li>eighteen</li><li>nineteen</li>]]></text>
                </staticText>
            </band>
        </detail>
    </jasperReport>
    

1 个答案:

答案 0 :(得分:1)

  

文本字段是否可以跨越两个页面?

答案是肯定的,如果您将 Stretch with overflow 设置为 TRUE 文本字段元素可以跨越两个页面。不过,我不确定静态文本元素。我从来没有必要。我尝试了一下静态文本元素,但我没有看到一个选项会让它延伸到两个页面。也许,正如其名称所暗示的那样,它意味着与静态文本一起使用,这些内容总是相同的,因此您事先知道它将在报告中占据的大小,即使它的位置可以由其上方的其他动态元素改变。

就排除其他乐队而言,如果您不需要,我认为没有任何问题。但是,根据您的数据和您想要达到的最终结果,它可能有助于其他乐队。

详细信息频段最适合多行数据集。如果您有一个动态增长的部分,我建议您将其放在单独的详细信息范围内。将乐队的高度设置为文本字段的高度(足以容纳您正在显示的文本),然后它将根据需要动态跨越多个页面。每当您想要将某些内容放在单独的页面上(无条件)时,您可以添加中断元素,并将类型属性设置为页面

在您的示例中,我看到您已将所有数据放在文本字段中,这不是一个好习惯。如果您显示的数据是固定的(当我说固定时我指的是一行而不是多行),将每个值放在一个单独的文本字段中,它不会在您的第一个中留下空白页。它会在第一页上放置任何可以放入的内容,其余内容将移到第二页上。

这是你的例子,我修改了一下。这里,地址部分跨越两页。

<?xml version="1.0" encoding="UTF-8"?>
<!-- Created with Jaspersoft Studio version 6.3.0.final using JasperReports Library version 6.3.0  -->
<!-- 2017-03-26T14:03:51 -->
<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="newIAA" pageWidth="595" pageHeight="842" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="8de39cec-dd1f-418f-8ba0-9735f2f410ba">
    <property name="com.jaspersoft.studio.data.defaultdataadapter" value="One Empty Record"/>
    <detail>
        <band height="197">
            <property name="com.jaspersoft.studio.unit.height" value="pixel"/>
            <frame>
                <reportElement x="0" y="0" width="555" height="190" uuid="eb437bb0-bc94-43e5-8d78-a19c7b2a6b4e">
                    <property name="com.jaspersoft.studio.unit.x" value="pixel"/>
                    <property name="com.jaspersoft.studio.unit.width" value="pixel"/>
                </reportElement>
                <staticText>
                    <reportElement x="119" y="0" width="289" height="30" uuid="f2530fdd-884d-43cd-b504-f21e09c9db47">
                        <property name="com.jaspersoft.studio.unit.x" value="pixel"/>
                    </reportElement>
                    <box>
                        <pen lineWidth="1.0"/>
                        <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
                        <leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
                        <bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
                        <rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
                    </box>
                    <textElement textAlignment="Center">
                        <font size="22" isBold="true" isUnderline="true"/>
                    </textElement>
                    <text><![CDATA[Customer Invoice ]]></text>
                </staticText>
                <staticText>
                    <reportElement x="0" y="80" width="553" height="110" uuid="565fea21-e609-4fae-abdb-640f7c2d322d">
                        <property name="com.jaspersoft.studio.unit.x" value="pixel"/>
                    </reportElement>
                    <textElement markup="styled">
                        <font fontName="SansSerif" size="16"/>
                    </textElement>
                    <text><![CDATA[<b>Details : </b><br/><li>one</li><li>two</li><li>three</li><li>four</li>]]></text>
                </staticText>
            </frame>
        </band>
        <band height="214">
            <staticText>
                <reportElement x="0" y="10" width="555" height="190" uuid="5758f399-38cf-4f98-beda-ee25a9ae785f"/>
                <textElement markup="styled"/>
                <text><![CDATA[<b>Shipping Information </b><li>one</li><li>two</li><li>three</li><li>four</li><li>five</li><li>six</li><li>seven</li><li>eight</li><li>nine</li><li>ten</li><li>eleven</li><li>tweleve</li><li>thirteen</li><li>fourteen</li><li>fifteen</li>]]></text>
            </staticText>
        </band>
        <band height="470">
            <staticText>
                <reportElement positionType="Float" stretchType="ContainerBottom" x="0" y="10" width="555" height="20" uuid="462f317f-f89a-44ed-8e77-ad07a7b386e6">
                    <property name="com.jaspersoft.studio.unit.x" value="pixel"/>
                    <property name="com.jaspersoft.studio.unit.width" value="pixel"/>
                    <property name="com.jaspersoft.studio.unit.height" value="pixel"/>
                </reportElement>
                <textElement textAlignment="Left" markup="styled">
                    <font size="12" isBold="true"/>
                </textElement>
                <text><![CDATA[Address]]></text>
            </staticText>
            <staticText>
                <reportElement positionType="Float" stretchType="ContainerBottom" x="0" y="30" width="555" height="20" uuid="64991fde-9a85-45f7-8061-8b418642e457">
                    <property name="com.jaspersoft.studio.unit.x" value="pixel"/>
                    <property name="com.jaspersoft.studio.unit.width" value="pixel"/>
                    <property name="com.jaspersoft.studio.unit.height" value="pixel"/>
                </reportElement>
                <textElement textAlignment="Left" markup="styled">
                    <font size="12" isBold="true"/>
                </textElement>
                <text><![CDATA[One]]></text>
            </staticText>
            <staticText>
                <reportElement positionType="Float" stretchType="ContainerBottom" x="0" y="50" width="555" height="20" uuid="d5498a2b-1f41-4aa6-b0fd-82ca38f4fc75">
                    <property name="com.jaspersoft.studio.unit.x" value="pixel"/>
                    <property name="com.jaspersoft.studio.unit.width" value="pixel"/>
                    <property name="com.jaspersoft.studio.unit.height" value="pixel"/>
                </reportElement>
                <textElement textAlignment="Left" markup="styled">
                    <font size="12" isBold="true"/>
                </textElement>
                <text><![CDATA[Two]]></text>
            </staticText>
            <staticText>
                <reportElement positionType="Float" stretchType="ContainerBottom" x="0" y="70" width="555" height="20" uuid="92617678-99dc-489e-be27-d10ed00da863">
                    <property name="com.jaspersoft.studio.unit.x" value="pixel"/>
                    <property name="com.jaspersoft.studio.unit.width" value="pixel"/>
                    <property name="com.jaspersoft.studio.unit.height" value="pixel"/>
                </reportElement>
                <textElement textAlignment="Left" markup="styled">
                    <font size="12" isBold="true"/>
                </textElement>
                <text><![CDATA[Three]]></text>
            </staticText>
            <staticText>
                <reportElement positionType="Float" stretchType="ContainerBottom" x="0" y="90" width="555" height="20" uuid="e63ef22e-1f45-4841-b1c2-d17530ccde8c">
                    <property name="com.jaspersoft.studio.unit.x" value="pixel"/>
                    <property name="com.jaspersoft.studio.unit.width" value="pixel"/>
                    <property name="com.jaspersoft.studio.unit.height" value="pixel"/>
                </reportElement>
                <textElement textAlignment="Left" markup="styled">
                    <font size="12" isBold="true"/>
                </textElement>
                <text><![CDATA[Four]]></text>
            </staticText>
            <staticText>
                <reportElement positionType="Float" stretchType="ContainerBottom" x="0" y="110" width="555" height="20" uuid="c355db54-18b6-4fce-9086-e9c0c02d94b6">
                    <property name="com.jaspersoft.studio.unit.x" value="pixel"/>
                    <property name="com.jaspersoft.studio.unit.width" value="pixel"/>
                    <property name="com.jaspersoft.studio.unit.height" value="pixel"/>
                </reportElement>
                <textElement textAlignment="Left" markup="styled">
                    <font size="12" isBold="true"/>
                </textElement>
                <text><![CDATA[Five]]></text>
            </staticText>
            <staticText>
                <reportElement positionType="Float" stretchType="ContainerBottom" x="0" y="130" width="555" height="20" uuid="0b81eb8d-c240-4adf-acb8-882fab11666c">
                    <property name="com.jaspersoft.studio.unit.x" value="pixel"/>
                    <property name="com.jaspersoft.studio.unit.width" value="pixel"/>
                    <property name="com.jaspersoft.studio.unit.height" value="pixel"/>
                </reportElement>
                <textElement textAlignment="Left" markup="styled">
                    <font size="12" isBold="true"/>
                </textElement>
                <text><![CDATA[Six]]></text>
            </staticText>
            <staticText>
                <reportElement positionType="Float" stretchType="ContainerBottom" x="0" y="150" width="555" height="20" uuid="e50850a3-a9b8-4320-a002-a8fcae766b81">
                    <property name="com.jaspersoft.studio.unit.x" value="pixel"/>
                    <property name="com.jaspersoft.studio.unit.width" value="pixel"/>
                    <property name="com.jaspersoft.studio.unit.height" value="pixel"/>
                </reportElement>
                <textElement textAlignment="Left" markup="styled">
                    <font size="12" isBold="true"/>
                </textElement>
                <text><![CDATA[Seve]]></text>
            </staticText>
            <staticText>
                <reportElement positionType="Float" stretchType="ContainerBottom" x="0" y="210" width="555" height="20" uuid="0ad5cd07-2e6a-4a28-90f6-3d12169b8f65">
                    <property name="com.jaspersoft.studio.unit.x" value="pixel"/>
                    <property name="com.jaspersoft.studio.unit.width" value="pixel"/>
                    <property name="com.jaspersoft.studio.unit.height" value="pixel"/>
                </reportElement>
                <textElement textAlignment="Left" markup="styled">
                    <font size="12" isBold="true"/>
                </textElement>
                <text><![CDATA[Ten]]></text>
            </staticText>
            <staticText>
                <reportElement positionType="Float" stretchType="ContainerBottom" x="0" y="270" width="555" height="20" uuid="e0dc3fab-9f99-4f75-a420-434562a942f5">
                    <property name="com.jaspersoft.studio.unit.x" value="pixel"/>
                    <property name="com.jaspersoft.studio.unit.width" value="pixel"/>
                    <property name="com.jaspersoft.studio.unit.height" value="pixel"/>
                </reportElement>
                <textElement textAlignment="Left" markup="styled">
                    <font size="12" isBold="true"/>
                </textElement>
                <text><![CDATA[Thirteen]]></text>
            </staticText>
            <staticText>
                <reportElement positionType="Float" stretchType="ContainerBottom" x="0" y="230" width="555" height="20" uuid="dafe0207-10f8-4a97-8f87-2774822d5bed">
                    <property name="com.jaspersoft.studio.unit.x" value="pixel"/>
                    <property name="com.jaspersoft.studio.unit.width" value="pixel"/>
                    <property name="com.jaspersoft.studio.unit.height" value="pixel"/>
                </reportElement>
                <textElement textAlignment="Left" markup="styled">
                    <font size="12" isBold="true"/>
                </textElement>
                <text><![CDATA[Eleven]]></text>
            </staticText>
            <staticText>
                <reportElement positionType="Float" stretchType="ContainerBottom" x="0" y="190" width="555" height="20" uuid="4d3d50c6-ace9-4b1c-8ed8-e66ad7d21b60">
                    <property name="com.jaspersoft.studio.unit.x" value="pixel"/>
                    <property name="com.jaspersoft.studio.unit.width" value="pixel"/>
                    <property name="com.jaspersoft.studio.unit.height" value="pixel"/>
                </reportElement>
                <textElement textAlignment="Left" markup="styled">
                    <font size="12" isBold="true"/>
                </textElement>
                <text><![CDATA[Nite]]></text>
            </staticText>
            <staticText>
                <reportElement positionType="Float" stretchType="ContainerBottom" x="0" y="170" width="555" height="20" uuid="1f56f519-df14-438d-bd2b-3af7e6e6eaa0">
                    <property name="com.jaspersoft.studio.unit.x" value="pixel"/>
                    <property name="com.jaspersoft.studio.unit.width" value="pixel"/>
                    <property name="com.jaspersoft.studio.unit.height" value="pixel"/>
                </reportElement>
                <textElement textAlignment="Left" markup="styled">
                    <font size="12" isBold="true"/>
                </textElement>
                <text><![CDATA[Eight]]></text>
            </staticText>
            <staticText>
                <reportElement positionType="Float" stretchType="ContainerBottom" x="0" y="290" width="555" height="20" uuid="0dffe48d-65b8-4ce3-841f-9d9c85d69ad6">
                    <property name="com.jaspersoft.studio.unit.x" value="pixel"/>
                    <property name="com.jaspersoft.studio.unit.width" value="pixel"/>
                    <property name="com.jaspersoft.studio.unit.height" value="pixel"/>
                </reportElement>
                <textElement textAlignment="Left" markup="styled">
                    <font size="12" isBold="true"/>
                </textElement>
                <text><![CDATA[Fourteen]]></text>
            </staticText>
            <staticText>
                <reportElement positionType="Float" stretchType="ContainerBottom" x="0" y="250" width="555" height="20" uuid="09c6d28b-2eb1-401a-98ae-7aac905d54df">
                    <property name="com.jaspersoft.studio.unit.x" value="pixel"/>
                    <property name="com.jaspersoft.studio.unit.width" value="pixel"/>
                    <property name="com.jaspersoft.studio.unit.height" value="pixel"/>
                </reportElement>
                <textElement textAlignment="Left" markup="styled">
                    <font size="12" isBold="true"/>
                </textElement>
                <text><![CDATA[Twelve]]></text>
            </staticText>
            <staticText>
                <reportElement positionType="Float" stretchType="ContainerBottom" x="0" y="330" width="555" height="20" uuid="600b4b76-9244-4152-aa23-edd23c08d313">
                    <property name="com.jaspersoft.studio.unit.x" value="pixel"/>
                    <property name="com.jaspersoft.studio.unit.width" value="pixel"/>
                    <property name="com.jaspersoft.studio.unit.height" value="pixel"/>
                </reportElement>
                <textElement textAlignment="Left" markup="styled">
                    <font size="12" isBold="true"/>
                </textElement>
                <text><![CDATA[Fourteen]]></text>
            </staticText>
            <staticText>
                <reportElement positionType="Float" stretchType="ContainerBottom" x="0" y="310" width="555" height="20" uuid="1d7ed52c-a57b-4e70-b645-f259087ec47a">
                    <property name="com.jaspersoft.studio.unit.x" value="pixel"/>
                    <property name="com.jaspersoft.studio.unit.width" value="pixel"/>
                    <property name="com.jaspersoft.studio.unit.height" value="pixel"/>
                </reportElement>
                <textElement textAlignment="Left" markup="styled">
                    <font size="12" isBold="true"/>
                </textElement>
                <text><![CDATA[Thirteen]]></text>
            </staticText>
            <staticText>
                <reportElement positionType="Float" stretchType="ContainerBottom" x="0" y="350" width="555" height="20" uuid="da33f8f6-6269-4da3-9e86-b87037b1e543">
                    <property name="com.jaspersoft.studio.unit.x" value="pixel"/>
                    <property name="com.jaspersoft.studio.unit.width" value="pixel"/>
                    <property name="com.jaspersoft.studio.unit.height" value="pixel"/>
                </reportElement>
                <textElement textAlignment="Left" markup="styled">
                    <font size="12" isBold="true"/>
                </textElement>
                <text><![CDATA[Fourteen]]></text>
            </staticText>
            <staticText>
                <reportElement positionType="Float" stretchType="ContainerBottom" x="0" y="410" width="555" height="20" uuid="5353b3a4-e9f4-4424-b054-b4158db1f4a8">
                    <property name="com.jaspersoft.studio.unit.x" value="pixel"/>
                    <property name="com.jaspersoft.studio.unit.width" value="pixel"/>
                    <property name="com.jaspersoft.studio.unit.height" value="pixel"/>
                </reportElement>
                <textElement textAlignment="Left" markup="styled">
                    <font size="12" isBold="true"/>
                </textElement>
                <text><![CDATA[Thirteen]]></text>
            </staticText>
            <staticText>
                <reportElement positionType="Float" stretchType="ContainerBottom" x="0" y="390" width="555" height="20" uuid="1e4c1aa6-1a9a-4764-a176-ebb498a99218">
                    <property name="com.jaspersoft.studio.unit.x" value="pixel"/>
                    <property name="com.jaspersoft.studio.unit.width" value="pixel"/>
                    <property name="com.jaspersoft.studio.unit.height" value="pixel"/>
                </reportElement>
                <textElement textAlignment="Left" markup="styled">
                    <font size="12" isBold="true"/>
                </textElement>
                <text><![CDATA[Fourteen]]></text>
            </staticText>
            <staticText>
                <reportElement positionType="Float" stretchType="ContainerBottom" x="0" y="370" width="555" height="20" uuid="3f8c3dcd-e08d-40ee-8eae-afcfdfbbc14f">
                    <property name="com.jaspersoft.studio.unit.x" value="pixel"/>
                    <property name="com.jaspersoft.studio.unit.width" value="pixel"/>
                    <property name="com.jaspersoft.studio.unit.height" value="pixel"/>
                </reportElement>
                <textElement textAlignment="Left" markup="styled">
                    <font size="12" isBold="true"/>
                </textElement>
                <text><![CDATA[Thirteen]]></text>
            </staticText>
            <staticText>
                <reportElement positionType="Float" stretchType="ContainerBottom" x="0" y="430" width="555" height="20" uuid="f7b1d764-97fa-45bd-99f1-2cd24e889709">
                    <property name="com.jaspersoft.studio.unit.x" value="pixel"/>
                    <property name="com.jaspersoft.studio.unit.width" value="pixel"/>
                    <property name="com.jaspersoft.studio.unit.height" value="pixel"/>
                </reportElement>
                <textElement textAlignment="Left" markup="styled">
                    <font size="12" isBold="true"/>
                </textElement>
                <text><![CDATA[Fourteen]]></text>
            </staticText>
            <staticText>
                <reportElement positionType="Float" stretchType="ContainerBottom" x="0" y="450" width="555" height="20" uuid="9fadb409-fb15-41ed-9f39-ef6a7b86eaf5">
                    <property name="com.jaspersoft.studio.unit.x" value="pixel"/>
                    <property name="com.jaspersoft.studio.unit.width" value="pixel"/>
                    <property name="com.jaspersoft.studio.unit.height" value="pixel"/>
                </reportElement>
                <textElement textAlignment="Left" markup="styled">
                    <font size="12" isBold="true"/>
                </textElement>
                <text><![CDATA[Fourteen]]></text>
            </staticText>
        </band>
    </detail>
</jasperReport>

我认为您的送货信息正在从数据源中提取,而您正在文本字段元素中显示它。因此,在这种情况下,不要将波段的高度设置为高于文本域元素。它将占用所需的空间。

更新: 最小,完整且可验证的示例

要显示文本字段如何跨越两个页面,我将包含带有虚拟数据的jasper报告。该文本嵌入在文本字段中,但当数据源填充文本字段时,它的工作方式相同。

<?xml version="1.0" encoding="UTF-8"?>
<!-- Created with Jaspersoft Studio version 6.3.1.final using JasperReports Library version 6.3.1  -->
<!-- 2017-03-28T08:17:44 -->
<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="test" pageWidth="595" pageHeight="842" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="012f65ad-c3b4-411c-81e1-947ff7200100">
    <property name="com.jaspersoft.studio.data.sql.tables" value=""/>
    <property name="com.jaspersoft.studio.data.defaultdataadapter" value="CRK_DATADAPTER.xml"/>
    <queryString language="SQL">
        <![CDATA[usp_test]]>
    </queryString>
    <field name="Text" class="java.lang.String"/>
    <background>
        <band splitType="Stretch"/>
    </background>
    <title>
        <band height="66" splitType="Stretch">
            <staticText>
                <reportElement x="0" y="20" width="550" height="30" uuid="058b5b66-2862-4130-91a2-7e5817ac10fa"/>
                <textElement textAlignment="Center">
                    <font size="18" isBold="true"/>
                </textElement>
                <text><![CDATA[Title]]></text>
            </staticText>
        </band>
    </title>
    <detail>
        <band height="138" splitType="Stretch">
            <property name="com.jaspersoft.studio.unit.height" value="pixel"/>
            <staticText>
                <reportElement x="0" y="0" width="550" height="130" uuid="9d0688b2-a0b4-4ae9-be83-dabc35a3321d"/>
                <textElement markup="html"/>
                <text><![CDATA[Some text goes here:
<li>ka hsdlfkashdfkashdfkasjd fhkashdf </li>
<li>ka hsdlfkashdfkashdfkasjd fhkashdf </li>
<li>ka hsdlfkashdfkashdfkasjd fhkashdf </li>
<li>ka hsdlfkashdfkashdfkasjd fhkashdf </li>
<li>ka hsdlfkashdfkashdfkasjd fhkashdf </li>
<li>ka hsdlfkashdfkashdfkasjd fhkashdf </li>
<li>ka hsdlfkashdfkashdfkasjd fhkashdf </li>
<li>ka hsdlfkashdfkashdfkasjd fhkashdf </li>
<li>ka hsdlfkashdfkashdfkasjd fhkashdf </li>]]></text>
            </staticText>
        </band>
        <band height="20">
            <property name="com.jaspersoft.studio.unit.height" value="pixel"/>
            <textField isStretchWithOverflow="true">
                <reportElement x="100" y="0" width="450" height="20" uuid="7fd5b2f7-5044-465b-b2c3-a68a8263eb7a"/>
                <textElement markup="html"/>
                <textFieldExpression><![CDATA["Lorem ipsum dolor sit amet, insolens tincidunt ea vix. In eos minim detraxit, nibh expetenda pro ex. Iudicabit patrioque mel in. Sumo eligendi eloquentiam eam ei. Iisque bonorum meliore eum te, no viris conceptam his, eu nulla tation fabellas eos. Sea verear laoreet no.<br>Id odio dicant ius, tritani erroribus cum ne. Pri nominavi copiosae eu, est eirmod aliquando moderatius ut, latine commodo labitur ut duo. Dicit dicunt nonumes his te, solet graecis pertinacia ius cu. Mea ne modo deseruisse. Iriure commune tacimates ne sea, qui explicari definitiones cu. Eu salutandi appellantur consequuntur mei, nec te dico nemore.<br>Qui et utamur tacimates honestatis, sea iuvaret fabellas percipitur cu, no vim autem recteque. Vis fugit mundi convenire et, ut sed doming epicuri salutatus. No eius idque ponderum nec. Cum fugit facete ut, an vero saepe inciderint mel.<br>Viris nemore ei nam, qui graece recteque id, nam vero elit ridens ea. Labitur placerat mnesarchum ius an, ad est sonet nonumes. Dicit dicunt labitur nam id, corrumpit torquatos ei nec. Affert consetetur mediocritatem ne nam, inani efficiantur cu duo, civibus contentiones eos et.<br>Definiebas vituperata vis cu, unum fierent an cum. Et enim elitr cum, ex hinc aperiri has, sea in maiorum tibique. Cum iudico detracto cu, choro veniam consul vim et. Qui graeco commodo in, per at eirmod omittam, ut pro sale placerat.<br>Iudico forensibus his ut, no eros facete qualisque qui. Ne dolor facilisis complectitur ius, at cum sale etiam pertinacia, his regione dolorum cu. Ea sale facer usu, wisi paulo simul at duo, tritani dolorum urbanitas et eam. Liber blandit inciderint has cu. Usu an quodsi tibique interesset, at nam movet latine periculis. Mollis copiosae efficiantur vix no, te sit idque accumsan. Pro illud error saepe id, ius ut meliore inermis.<br>Sed ne quaeque aliquam inciderint, an utroque lucilius intellegam per, ius aperiri nonumes adipiscing ea. Vidit virtute his at, cu sit constituam definitionem concludaturque. Fugit fastidii liberavisse per cu. Vim suas omnium ei, et inani sadipscing mel, vis ei expetenda molestiae definiebas.<br>Lorem ipsum dolor sit amet, insolens tincidunt ea vix. In eos minim detraxit, nibh expetenda pro ex. Iudicabit patrioque mel in. Sumo eligendi eloquentiam eam ei. Iisque bonorum meliore eum te, no viris conceptam his, eu nulla tation fabellas eos. Sea verear laoreet no.<br>Id odio dicant ius, tritani erroribus cum ne. Pri nominavi copiosae eu, est eirmod aliquando moderatius ut, latine commodo labitur ut duo. Dicit dicunt nonumes his te, solet graecis pertinacia ius cu. Mea ne modo deseruisse. Iriure commune tacimates ne sea, qui explicari definitiones cu. Eu salutandi appellantur consequuntur mei, nec te dico nemore.<br>Qui et utamur tacimates honestatis, sea iuvaret fabellas percipitur cu, no vim autem recteque. Vis fugit mundi convenire et, ut sed doming epicuri salutatus. No eius idque ponderum nec. Cum fugit facete ut, an vero saepe inciderint mel."]]></textFieldExpression>
            </textField>
            <staticText>
                <reportElement x="0" y="0" width="100" height="20" uuid="21b54d29-9d8c-4c3a-82bb-f2aeb2256941">
                    <property name="com.jaspersoft.studio.unit.height" value="pixel"/>
                </reportElement>
                <text><![CDATA[Text]]></text>
            </staticText>
        </band>
        <band height="20">
            <property name="com.jaspersoft.studio.unit.height" value="pixel"/>
            <textField isStretchWithOverflow="true" isBlankWhenNull="true">
                <reportElement x="-5" y="0" width="550" height="20" uuid="cff4e917-c84e-42a6-ae07-5aa19ae0b70f">
                    <property name="com.jaspersoft.studio.unit.height" value="pixel"/>
                </reportElement>
                <textElement markup="html"/>
                <textFieldExpression><![CDATA["Lorem ipsum dolor sit amet, insolens tincidunt ea vix. In eos minim detraxit, nibh expetenda pro ex. Iudicabit patrioque mel in. Sumo eligendi eloquentiam eam ei. Iisque bonorum meliore eum te, no viris conceptam his, eu nulla tation fabellas eos. Sea verear laoreet no.<br>Id odio dicant ius, tritani erroribus cum ne. Pri nominavi copiosae eu, est eirmod aliquando moderatius ut, latine commodo labitur ut duo. Dicit dicunt nonumes his te, solet graecis pertinacia ius cu. Mea ne modo deseruisse. Iriure commune tacimates ne sea, qui explicari definitiones cu. Eu salutandi appellantur consequuntur mei, nec te dico nemore.<br>Qui et utamur tacimates honestatis, sea iuvaret fabellas percipitur cu, no vim autem recteque. Vis fugit mundi convenire et, ut sed doming epicuri salutatus. No eius idque ponderum nec. Cum fugit facete ut, an vero saepe inciderint mel.<br>Viris nemore ei nam, qui graece recteque id, nam vero elit ridens ea. Labitur placerat mnesarchum ius an, ad est sonet nonumes. Dicit dicunt labitur nam id, corrumpit torquatos ei nec. Affert consetetur mediocritatem ne nam, inani efficiantur cu duo, civibus contentiones eos et.<br>Definiebas vituperata vis cu, unum fierent an cum. Et enim elitr cum, ex hinc aperiri has, sea in maiorum tibique. Cum iudico detracto cu, choro veniam consul vim et. Qui graeco commodo in, per at eirmod omittam, ut pro sale placerat.<br>Iudico forensibus his ut, no eros facete qualisque qui. Ne dolor facilisis complectitur ius, at cum sale etiam pertinacia, his regione dolorum cu. Ea sale facer usu, wisi paulo simul at duo, tritani dolorum urbanitas et eam. Liber blandit inciderint has cu. Usu an quodsi tibique interesset, at nam movet latine periculis. Mollis copiosae efficiantur vix no, te sit idque accumsan. Pro illud error saepe id, ius ut meliore inermis.<br>Sed ne quaeque aliquam inciderint, an utroque lucilius intellegam per, ius aperiri nonumes adipiscing ea. Vidit virtute his at, cu sit constituam definitionem concludaturque. Fugit fastidii liberavisse per cu. Vim suas omnium ei, et inani sadipscing mel, vis ei expetenda molestiae definiebas.<br>Lorem ipsum dolor sit amet, insolens tincidunt ea vix. In eos minim detraxit, nibh expetenda pro ex. Iudicabit patrioque mel in. Sumo eligendi eloquentiam eam ei. Iisque bonorum meliore eum te, no viris conceptam his, eu nulla tation fabellas eos. Sea verear laoreet no.<br>Id odio dicant ius, tritani erroribus cum ne. Pri nominavi copiosae eu, est eirmod aliquando moderatius ut, latine commodo labitur ut duo. Dicit dicunt nonumes his te, solet graecis pertinacia ius cu. Mea ne modo deseruisse. Iriure commune tacimates ne sea, qui explicari definitiones cu. Eu salutandi appellantur consequuntur mei, nec te dico nemore.<br>Qui et utamur tacimates honestatis, sea iuvaret fabellas percipitur cu, no vim autem recteque. Vis fugit mundi convenire et, ut sed doming epicuri salutatus. No eius idque ponderum nec. Cum fugit facete ut, an vero saepe inciderint mel."]]></textFieldExpression>
            </textField>
        </band>
    </detail>
</jasperReport>