如何在jasper报告的同一页面或下一页中获取详细信息带中的文本字段

时间:2016-01-25 09:13:46

标签: jasper-reports

我的ireport中有一个细节乐队,由12个文本字段组成。在这12个文本字段中,我有"地址"文本字段作为一个大的所以当我输入详细信息时,它将获取报告中的数据,但是当它涉及到页面的最后一部分时,它将文本字段分成两个相等的一半。为了更好地理解,我将发布一个图像 enter image description here

正如您在图像中看到的那样,"地址"文本字段分为两半,它打印相同的字段两次,一旦地址字段为一半,地址字段为另一半。所以我的问题是如何将整个12个字段自动放入页面(可能是下一页或同一页面上的整个数据在一个页面中)。我发布了下面的jrxml代码

<?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="report10" language="groovy" pageWidth="842" pageHeight="595" orientation="Landscape" columnWidth="762" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" isSummaryWithPageHeaderAndFooter="true" uuid="d56b6955-1d4c-438c-af7d-059ffd618835">
    <property name="ireport.zoom" value="1.0"/>
    <property name="ireport.x" value="92"/>
    <property name="ireport.y" value="0"/>
    <property name="net.sf.jasperreports.export.xls.white.page.background" value="true"/>
    <parameter name="sql" class="java.lang.String"/>
    <queryString>
        <![CDATA[$P!{sql}]]>
    </queryString>
    <field name="id" class="java.lang.Long">
        <fieldDescription><![CDATA[]]></fieldDescription>
    </field>
    <field name="Name" class="java.lang.String">
        <fieldDescription><![CDATA[]]></fieldDescription>
    </field>
    <field name="Email" class="java.lang.String">
        <fieldDescription><![CDATA[]]></fieldDescription>
    </field>
    <field name="Company_Name" class="java.lang.String">
        <fieldDescription><![CDATA[]]></fieldDescription>
    </field>
    <field name="Contact_Person" class="java.lang.String">
        <fieldDescription><![CDATA[]]></fieldDescription>
    </field>
    <field name="Address" class="java.lang.String">
        <fieldDescription><![CDATA[]]></fieldDescription>
    </field>
    <field name="Phone" class="java.lang.String">
        <fieldDescription><![CDATA[]]></fieldDescription>
    </field>
    <field name="Company_Email" class="java.lang.String">
        <fieldDescription><![CDATA[]]></fieldDescription>
    </field>
    <field name="Review" class="java.lang.String">
        <fieldDescription><![CDATA[]]></fieldDescription>
    </field>
    <field name="Lead_Date" class="java.lang.String">
        <fieldDescription><![CDATA[]]></fieldDescription>
    </field>
    <field name="Lead_Details" class="java.lang.String">
        <fieldDescription><![CDATA[]]></fieldDescription>
    </field>
    <field name="Lead_Value" class="java.lang.String">
        <fieldDescription><![CDATA[]]></fieldDescription>
    </field>
    <field name="Followup_Date" class="java.lang.String">
        <fieldDescription><![CDATA[]]></fieldDescription>
    </field>
    <field name="Status" class="java.lang.String">
        <fieldDescription><![CDATA[]]></fieldDescription>
    </field>
    <field name="Category" class="java.lang.String">
        <fieldDescription><![CDATA[]]></fieldDescription>
    </field>
    <columnHeader>
        <band height="117" splitType="Stretch">
            <staticText>
                <reportElement positionType="Float" stretchType="RelativeToTallestObject" x="115" y="71" width="62" height="46" uuid="129f511e-4bb9-4dd9-b3cd-4b190096e88c">
                    <property name="net.sf.jasperreports.export.xls.auto.fit.row" value="true"/>
                    <property name="net.sf.jasperreports.export.xls.auto.fit.column" value="false"/>
                    <property name="net.sf.jasperreports.export.pdf.force.linebreak.policy" value="true"/>
                </reportElement>
                <box>
                    <pen lineWidth="0.5"/>
                    <topPen lineWidth="0.5"/>
                    <leftPen lineWidth="0.5"/>
                    <bottomPen lineWidth="0.5"/>
                    <rightPen lineWidth="0.0"/>
                </box>
                <textElement textAlignment="Center" verticalAlignment="Middle">
                    <font fontName="Times New Roman" size="9" isBold="true" pdfFontName="Times-Bold" pdfEncoding="Cp1250" isPdfEmbedded="true"/>
                </textElement>
                <text><![CDATA[Lead_Details]]></text>
            </staticText>
            <staticText>
                <reportElement positionType="Float" stretchType="RelativeToTallestObject" x="177" y="71" width="53" height="46" uuid="88c5b42a-2d36-453b-9c9a-17ffaf1af488">
                    <property name="net.sf.jasperreports.export.xls.auto.fit.row" value="true"/>
                    <property name="net.sf.jasperreports.export.xls.auto.fit.column" value="false"/>
                    <property name="net.sf.jasperreports.export.pdf.force.linebreak.policy" value="true"/>
                </reportElement>
                <box>
                    <pen lineWidth="0.5"/>
                    <topPen lineWidth="0.5"/>
                    <leftPen lineWidth="0.5"/>
                    <bottomPen lineWidth="0.5"/>
                    <rightPen lineWidth="0.0"/>
                </box>
                <textElement textAlignment="Center" verticalAlignment="Middle">
                    <font fontName="Times New Roman" size="9" isBold="true" pdfFontName="Times-Bold" pdfEncoding="Cp1250" isPdfEmbedded="true"/>
                </textElement>
                <text><![CDATA[Lead_Value]]></text>
            </staticText>
            <staticText>
                <reportElement positionType="Float" stretchType="RelativeToTallestObject" x="230" y="71" width="64" height="46" uuid="ed5b14db-7054-4fee-b2fc-db6ca2241ca1">
                    <property name="net.sf.jasperreports.export.xls.auto.fit.row" value="true"/>
                    <property name="net.sf.jasperreports.export.xls.auto.fit.column" value="false"/>
                    <property name="net.sf.jasperreports.export.pdf.force.linebreak.policy" value="true"/>
                </reportElement>
                <box>
                    <pen lineWidth="0.5"/>
                    <topPen lineWidth="0.5"/>
                    <leftPen lineWidth="0.5"/>
                    <bottomPen lineWidth="0.5"/>
                    <rightPen lineWidth="0.0"/>
                </box>
                <textElement textAlignment="Center" verticalAlignment="Middle">
                    <font fontName="Times New Roman" size="9" isBold="true" pdfFontName="Times-Bold" pdfEncoding="Cp1250" isPdfEmbedded="true"/>
                </textElement>
                <text><![CDATA[Contact_Person]]></text>
            </staticText>
            <staticText>
                <reportElement positionType="Float" stretchType="RelativeToTallestObject" x="294" y="71" width="64" height="46" uuid="73767c90-ebbc-44ae-aa94-9df36e11c30b">
                    <property name="net.sf.jasperreports.export.xls.auto.fit.row" value="true"/>
                    <property name="net.sf.jasperreports.export.xls.auto.fit.column" value="false"/>
                    <property name="net.sf.jasperreports.export.pdf.force.linebreak.policy" value="true"/>
                </reportElement>
                <box>
                    <pen lineWidth="0.5"/>
                    <topPen lineWidth="0.5"/>
                    <leftPen lineWidth="0.5"/>
                    <bottomPen lineWidth="0.5"/>
                    <rightPen lineWidth="0.0"/>
                </box>
                <textElement textAlignment="Center" verticalAlignment="Middle">
                    <font fontName="Times New Roman" size="9" isBold="true" pdfFontName="Times-Bold" pdfEncoding="Cp1250" isPdfEmbedded="true"/>
                </textElement>
                <text><![CDATA[Phone]]></text>
            </staticText>
            <staticText>
                <reportElement positionType="Float" stretchType="RelativeToTallestObject" x="449" y="71" width="142" height="46" uuid="3351cfa8-ee69-45d9-98ec-d777f4ba34bb">
                    <property name="net.sf.jasperreports.export.xls.auto.fit.row" value="true"/>
                    <property name="net.sf.jasperreports.export.xls.auto.fit.column" value="false"/>
                    <property name="net.sf.jasperreports.export.pdf.force.linebreak.policy" value="true"/>
                </reportElement>
                <box>
                    <pen lineWidth="0.5"/>
                    <topPen lineWidth="0.5"/>
                    <leftPen lineWidth="0.5"/>
                    <bottomPen lineWidth="0.5"/>
                    <rightPen lineWidth="0.0"/>
                </box>
                <textElement textAlignment="Center" verticalAlignment="Middle">
                    <font fontName="Times New Roman" size="9" isBold="true" pdfFontName="Times-Bold" pdfEncoding="Cp1250" isPdfEmbedded="true"/>
                </textElement>
                <text><![CDATA[Address]]></text>
            </staticText>
            <staticText>
                <reportElement positionType="Float" stretchType="RelativeToTallestObject" x="591" y="71" width="56" height="46" uuid="ffb8238b-2412-4a2a-a66b-1c70a5e01d2b">
                    <property name="net.sf.jasperreports.export.xls.auto.fit.row" value="true"/>
                    <property name="net.sf.jasperreports.export.xls.auto.fit.column" value="false"/>
                    <property name="net.sf.jasperreports.export.pdf.force.linebreak.policy" value="true"/>
                </reportElement>
                <box>
                    <pen lineWidth="0.5"/>
                    <topPen lineWidth="0.5"/>
                    <leftPen lineWidth="0.5"/>
                    <bottomPen lineWidth="0.5"/>
                    <rightPen lineWidth="0.0"/>
                </box>
                <textElement textAlignment="Center" verticalAlignment="Middle">
                    <font fontName="Times New Roman" size="9" isBold="true" pdfFontName="Times-Bold" pdfEncoding="Cp1250" isPdfEmbedded="true"/>
                </textElement>
                <text><![CDATA[lead_Date]]></text>
            </staticText>
            <staticText>
                <reportElement positionType="Float" stretchType="RelativeToTallestObject" x="647" y="71" width="56" height="46" uuid="f7706746-544f-4344-9500-0a7767fdb0a1">
                    <property name="net.sf.jasperreports.export.xls.auto.fit.row" value="true"/>
                    <property name="net.sf.jasperreports.export.xls.auto.fit.column" value="false"/>
                    <property name="net.sf.jasperreports.export.pdf.force.linebreak.policy" value="true"/>
                </reportElement>
                <box>
                    <pen lineWidth="0.5"/>
                    <topPen lineWidth="0.5"/>
                    <leftPen lineWidth="0.5"/>
                    <bottomPen lineWidth="0.5"/>
                    <rightPen lineWidth="0.0"/>
                </box>
                <textElement textAlignment="Center" verticalAlignment="Middle">
                    <font fontName="Times New Roman" size="9" isBold="true" pdfFontName="Times-Bold" pdfEncoding="Cp1250" isPdfEmbedded="true"/>
                </textElement>
                <text><![CDATA[Review]]></text>
            </staticText>
            <staticText>
                <reportElement positionType="Float" stretchType="RelativeToTallestObject" x="703" y="71" width="62" height="46" uuid="f7f9ec1b-3b8b-48e6-907e-7bb182023caa">
                    <property name="net.sf.jasperreports.export.xls.auto.fit.row" value="true"/>
                    <property name="net.sf.jasperreports.export.xls.auto.fit.column" value="false"/>
                    <property name="net.sf.jasperreports.export.pdf.force.linebreak.policy" value="true"/>
                </reportElement>
                <box>
                    <topPen lineWidth="0.5"/>
                    <leftPen lineWidth="0.5"/>
                    <bottomPen lineWidth="0.5"/>
                    <rightPen lineWidth="0.0"/>
                </box>
                <textElement textAlignment="Center" verticalAlignment="Middle">
                    <font fontName="Times New Roman" size="9" isBold="true" pdfFontName="Times-Bold" pdfEncoding="Cp1250" isPdfEmbedded="true"/>
                </textElement>
                <text><![CDATA[Followup_Date]]></text>
            </staticText>
            <staticText>
                <reportElement positionType="Float" stretchType="RelativeToTallestObject" x="765" y="71" width="37" height="46" uuid="0ad2fe4f-63d8-4ccf-9d91-f30932db0ab7">
                    <property name="net.sf.jasperreports.export.xls.auto.fit.row" value="true"/>
                    <property name="net.sf.jasperreports.export.xls.auto.fit.column" value="false"/>
                    <property name="net.sf.jasperreports.export.pdf.force.linebreak.policy" value="true"/>
                </reportElement>
                <box>
                    <pen lineWidth="0.5"/>
                    <topPen lineWidth="0.5"/>
                    <leftPen lineWidth="0.5"/>
                    <bottomPen lineWidth="0.5"/>
                    <rightPen lineWidth="0.5"/>
                </box>
                <textElement textAlignment="Center" verticalAlignment="Middle">
                    <font fontName="Times New Roman" size="9" isBold="true" pdfFontName="Times-Bold" pdfEncoding="Cp1250" isPdfEmbedded="true"/>
                </textElement>
                <text><![CDATA[Status]]></text>
            </staticText>
            <staticText>
                <reportElement positionType="Float" stretchType="RelativeToTallestObject" x="37" y="71" width="78" height="46" uuid="3042b27b-209e-45d5-88a9-fc8e6bdd1ad1">
                    <property name="net.sf.jasperreports.export.xls.auto.fit.row" value="true"/>
                    <property name="net.sf.jasperreports.export.xls.auto.fit.column" value="false"/>
                    <property name="net.sf.jasperreports.export.pdf.force.linebreak.policy" value="true"/>
                </reportElement>
                <box>
                    <pen lineWidth="0.5"/>
                    <topPen lineWidth="0.5"/>
                    <leftPen lineWidth="0.5"/>
                    <bottomPen lineWidth="0.5"/>
                    <rightPen lineWidth="0.0"/>
                </box>
                <textElement textAlignment="Center" verticalAlignment="Middle">
                    <font fontName="Times New Roman" size="9" isBold="true" pdfFontName="Times-Bold" pdfEncoding="Cp1250" isPdfEmbedded="true"/>
                </textElement>
                <text><![CDATA[Company_Name]]></text>
            </staticText>
            <staticText>
                <reportElement positionType="Float" stretchType="RelativeToTallestObject" x="0" y="71" width="37" height="46" uuid="11b0ebc8-3acc-4eca-b6ab-bade1018626c">
                    <property name="net.sf.jasperreports.export.xls.auto.fit.row" value="true"/>
                    <property name="net.sf.jasperreports.export.xls.auto.fit.column" value="false"/>
                    <property name="net.sf.jasperreports.export.pdf.force.linebreak.policy" value="true"/>
                </reportElement>
                <box>
                    <pen lineWidth="0.5"/>
                    <topPen lineWidth="0.5"/>
                    <leftPen lineWidth="0.5"/>
                    <bottomPen lineWidth="0.5"/>
                    <rightPen lineWidth="0.0"/>
                </box>
                <textElement textAlignment="Center" verticalAlignment="Middle">
                    <font fontName="Times New Roman" size="9" isBold="true" pdfFontName="Times-Bold" pdfEncoding="Cp1250" isPdfEmbedded="true"/>
                </textElement>
                <text><![CDATA[Name]]></text>
            </staticText>
            <staticText>
                <reportElement positionType="Float" stretchType="RelativeToTallestObject" x="358" y="71" width="91" height="46" isPrintWhenDetailOverflows="true" uuid="d68bbc76-ddcc-4e8e-a849-9f4b8ed18890">
                    <property name="net.sf.jasperreports.export.xls.auto.fit.row" value="true"/>
                    <property name="net.sf.jasperreports.export.xls.auto.fit.column" value="false"/>
                    <property name="net.sf.jasperreports.export.pdf.force.linebreak.policy" value="true"/>
                </reportElement>
                <box>
                    <pen lineWidth="0.5"/>
                    <topPen lineWidth="0.5"/>
                    <leftPen lineWidth="0.5"/>
                    <bottomPen lineWidth="0.5"/>
                    <rightPen lineWidth="0.0"/>
                </box>
                <textElement textAlignment="Center" verticalAlignment="Middle">
                    <font fontName="Times New Roman" size="9" isBold="true" pdfFontName="Times-Bold" isPdfEmbedded="true"/>
                </textElement>
                <text><![CDATA[Company_Email]]></text>
            </staticText>
            <staticText>
                <reportElement x="330" y="0" width="100" height="33" uuid="5f3da1a4-9c04-4580-b25d-bace6758d64a"/>
                <textElement textAlignment="Center" verticalAlignment="Middle">
                    <font fontName="Times New Roman" size="15" isBold="true"/>
                </textElement>
                <text><![CDATA[Lead Details]]></text>
            </staticText>
        </band>
    </columnHeader>
    <detail>
        <band height="31" splitType="Stretch">
            <textField isStretchWithOverflow="true" isBlankWhenNull="true">
                <reportElement positionType="Float" stretchType="RelativeToTallestObject" x="0" y="0" width="37" height="31" isPrintWhenDetailOverflows="true" uuid="549ab824-ce1b-4d92-8a62-29d80d9d9431">
                    <property name="net.sf.jasperreports.export.xls.auto.fit.row" value="true"/>
                    <property name="net.sf.jasperreports.export.xls.auto.fit.column" value="false"/>
                    <property name="net.sf.jasperreports.export.pdf.force.linebreak.policy" value="true"/>
                </reportElement>
                <box>
                    <pen lineWidth="0.5"/>
                    <topPen lineWidth="0.5"/>
                    <leftPen lineWidth="0.5"/>
                    <bottomPen lineWidth="0.5"/>
                    <rightPen lineWidth="0.5"/>
                </box>
                <textElement textAlignment="Center" verticalAlignment="Middle">
                    <font fontName="Times New Roman" size="10" pdfFontName="Times-Roman" pdfEncoding="Cp1250" isPdfEmbedded="true"/>
                </textElement>
                <textFieldExpression><![CDATA[$F{Name}]]></textFieldExpression>
            </textField>
            <textField isStretchWithOverflow="true" pattern="" isBlankWhenNull="true">
                <reportElement positionType="Float" stretchType="RelativeToTallestObject" x="37" y="0" width="78" height="31" isPrintWhenDetailOverflows="true" uuid="80cad50c-fb9c-414e-9996-990ebdb8435f">
                    <property name="net.sf.jasperreports.export.xls.auto.fit.row" value="true"/>
                    <property name="net.sf.jasperreports.export.xls.auto.fit.column" value="false"/>
                    <property name="net.sf.jasperreports.export.pdf.force.linebreak.policy" value="true"/>
                </reportElement>
                <box>
                    <pen lineWidth="0.5"/>
                    <topPen lineWidth="0.5"/>
                    <leftPen lineWidth="0.5"/>
                    <bottomPen lineWidth="0.5"/>
                    <rightPen lineWidth="0.5"/>
                </box>
                <textElement textAlignment="Center" verticalAlignment="Middle">
                    <font fontName="Times New Roman" size="10" pdfFontName="Times-Roman" pdfEncoding="Cp1250" isPdfEmbedded="true"/>
                </textElement>
                <textFieldExpression><![CDATA[$F{Company_Name}]]></textFieldExpression>
            </textField>
            <textField isStretchWithOverflow="true" isBlankWhenNull="true">
                <reportElement positionType="Float" stretchType="RelativeToTallestObject" x="230" y="0" width="64" height="31" isPrintWhenDetailOverflows="true" uuid="b1937422-a70b-4fa9-a637-13515e970213">
                    <property name="net.sf.jasperreports.export.xls.auto.fit.row" value="true"/>
                    <property name="net.sf.jasperreports.export.xls.auto.fit.column" value="false"/>
                    <property name="net.sf.jasperreports.export.pdf.force.linebreak.policy" value="true"/>
                </reportElement>
                <box>
                    <pen lineWidth="0.5"/>
                    <topPen lineWidth="0.5"/>
                    <leftPen lineWidth="0.5"/>
                    <bottomPen lineWidth="0.5"/>
                    <rightPen lineWidth="0.5"/>
                </box>
                <textElement textAlignment="Center" verticalAlignment="Middle">
                    <font fontName="Times New Roman" size="10" pdfFontName="Times-Roman" pdfEncoding="Cp1250" isPdfEmbedded="true"/>
                </textElement>
                <textFieldExpression><![CDATA[$F{Contact_Person}]]></textFieldExpression>
            </textField>
            <textField isStretchWithOverflow="true" isBlankWhenNull="true">
                <reportElement positionType="Float" stretchType="RelativeToTallestObject" x="449" y="0" width="142" height="31" isPrintWhenDetailOverflows="true" uuid="29c9fc1b-7b0c-4c88-bad3-3be577dfeb06">
                    <property name="net.sf.jasperreports.export.xls.auto.fit.row" value="true"/>
                    <property name="net.sf.jasperreports.export.xls.auto.fit.column" value="false"/>
                    <property name="net.sf.jasperreports.export.pdf.force.linebreak.policy" value="true"/>
                </reportElement>
                <box>
                    <pen lineWidth="0.5"/>
                    <topPen lineWidth="0.5"/>
                    <leftPen lineWidth="0.5"/>
                    <bottomPen lineWidth="0.5"/>
                    <rightPen lineWidth="0.5"/>
                </box>
                <textElement textAlignment="Center" verticalAlignment="Middle">
                    <font fontName="Times New Roman" size="10" pdfFontName="Times-Roman" pdfEncoding="Cp1250" isPdfEmbedded="true"/>
                </textElement>
                <textFieldExpression><![CDATA[$F{Address}]]></textFieldExpression>
            </textField>
            <textField isStretchWithOverflow="true" isBlankWhenNull="true">
                <reportElement positionType="Float" stretchType="RelativeToTallestObject" x="294" y="0" width="64" height="31" isPrintWhenDetailOverflows="true" uuid="a3a0d8b6-e00b-48c9-a93d-9f368b77ae6f">
                    <property name="net.sf.jasperreports.export.xls.auto.fit.row" value="true"/>
                    <property name="net.sf.jasperreports.export.xls.auto.fit.column" value="false"/>
                    <property name="net.sf.jasperreports.export.pdf.force.linebreak.policy" value="true"/>
                </reportElement>
                <box>
                    <pen lineWidth="0.5"/>
                    <topPen lineWidth="0.5"/>
                    <leftPen lineWidth="0.5"/>
                    <bottomPen lineWidth="0.5"/>
                    <rightPen lineWidth="0.5"/>
                </box>
                <textElement textAlignment="Center" verticalAlignment="Middle">
                    <font fontName="Times New Roman" size="10" pdfFontName="Times-Roman" pdfEncoding="Cp1250" isPdfEmbedded="true"/>
                </textElement>
                <textFieldExpression><![CDATA[$F{Phone}]]></textFieldExpression>
            </textField>
            <textField isStretchWithOverflow="true">
                <reportElement positionType="Float" stretchType="RelativeToTallestObject" x="358" y="0" width="91" height="31" isPrintWhenDetailOverflows="true" uuid="5ec9fef3-3509-47a4-96ae-8fe6dc0bd440">
                    <property name="net.sf.jasperreports.export.xls.auto.fit.row" value="true"/>
                    <property name="net.sf.jasperreports.export.xls.auto.fit.column" value="false"/>
                    <property name="net.sf.jasperreports.export.pdf.force.linebreak.policy" value="true"/>
                </reportElement>
                <box>
                    <pen lineWidth="0.5"/>
                    <topPen lineWidth="0.5"/>
                    <leftPen lineWidth="0.5"/>
                    <bottomPen lineWidth="0.5"/>
                    <rightPen lineWidth="0.5"/>
                </box>
                <textElement textAlignment="Center" verticalAlignment="Middle">
                    <font fontName="Times New Roman" size="10"/>
                </textElement>
                <textFieldExpression><![CDATA[$F{Company_Email}]]></textFieldExpression>
            </textField>
            <textField isStretchWithOverflow="true" isBlankWhenNull="true">
                <reportElement positionType="Float" stretchType="RelativeToTallestObject" x="591" y="0" width="56" height="31" isPrintWhenDetailOverflows="true" uuid="041239c9-9a1b-4815-816d-5bab4c2150ed">
                    <property name="net.sf.jasperreports.export.xls.auto.fit.row" value="true"/>
                    <property name="net.sf.jasperreports.export.xls.auto.fit.column" value="false"/>
                    <property name="net.sf.jasperreports.export.pdf.force.linebreak.policy" value="true"/>
                </reportElement>
                <box>
                    <pen lineWidth="0.5"/>
                    <topPen lineWidth="0.5"/>
                    <leftPen lineWidth="0.5"/>
                    <bottomPen lineWidth="0.5"/>
                    <rightPen lineWidth="0.5"/>
                </box>
                <textElement textAlignment="Center" verticalAlignment="Middle">
                    <font fontName="Times New Roman" size="10" pdfFontName="Times-Roman" pdfEncoding="Cp1250" isPdfEmbedded="true"/>
                </textElement>
                <textFieldExpression><![CDATA[$F{Lead_Date}]]></textFieldExpression>
            </textField>
            <textField isStretchWithOverflow="true" isBlankWhenNull="true">
                <reportElement positionType="Float" stretchType="RelativeToTallestObject" x="115" y="0" width="62" height="31" isPrintWhenDetailOverflows="true" uuid="3e6d8ab4-9257-481b-8c58-4f1e6058fe1d">
                    <property name="net.sf.jasperreports.export.xls.auto.fit.row" value="true"/>
                    <property name="net.sf.jasperreports.export.xls.auto.fit.column" value="false"/>
                    <property name="net.sf.jasperreports.export.pdf.auto.fit.row" value="true"/>
                </reportElement>
                <box>
                    <pen lineWidth="0.5"/>
                    <topPen lineWidth="0.5"/>
                    <leftPen lineWidth="0.5"/>
                    <bottomPen lineWidth="0.5"/>
                    <rightPen lineWidth="0.5"/>
                </box>
                <textElement textAlignment="Center" verticalAlignment="Middle">
                    <font fontName="Times New Roman" size="10" pdfFontName="Times-Roman" pdfEncoding="Cp1250" isPdfEmbedded="true"/>
                </textElement>
                <textFieldExpression><![CDATA[$F{Lead_Details}]]></textFieldExpression>
            </textField>
            <textField isStretchWithOverflow="true" isBlankWhenNull="true">
                <reportElement positionType="Float" stretchType="RelativeToTallestObject" x="177" y="0" width="53" height="31" isPrintWhenDetailOverflows="true" uuid="51d984bd-3e90-4879-838a-93a09c5866cf">
                    <property name="net.sf.jasperreports.export.xls.auto.fit.row" value="true"/>
                    <property name="net.sf.jasperreports.export.xls.auto.fit.column" value="false"/>
                    <property name="net.sf.jasperreports.export.pdf.force.linebreak.policy" value="true"/>
                </reportElement>
                <box>
                    <pen lineWidth="0.5"/>
                    <topPen lineWidth="0.5"/>
                    <leftPen lineWidth="0.5"/>
                    <bottomPen lineWidth="0.5"/>
                    <rightPen lineWidth="0.5"/>
                </box>
                <textElement textAlignment="Center" verticalAlignment="Middle">
                    <font fontName="Times New Roman" size="10" pdfFontName="Times-Roman" pdfEncoding="Cp1250" isPdfEmbedded="true"/>
                </textElement>
                <textFieldExpression><![CDATA[$F{Lead_Value}]]></textFieldExpression>
            </textField>
            <textField isStretchWithOverflow="true" isBlankWhenNull="true">
                <reportElement positionType="Float" stretchType="RelativeToTallestObject" x="765" y="0" width="37" height="31" isPrintWhenDetailOverflows="true" uuid="343a31be-2382-4cc7-8f56-c17d9c1f6325">
                    <property name="net.sf.jasperreports.export.xls.auto.fit.row" value="true"/>
                    <property name="net.sf.jasperreports.export.xls.auto.fit.column" value="false"/>
                    <property name="net.sf.jasperreports.export.pdf.force.linebreak.policy" value="true"/>
                </reportElement>
                <box>
                    <pen lineWidth="0.5"/>
                    <topPen lineWidth="0.5"/>
                    <leftPen lineWidth="0.5"/>
                    <bottomPen lineWidth="0.5"/>
                    <rightPen lineWidth="0.5"/>
                </box>
                <textElement textAlignment="Center" verticalAlignment="Middle">
                    <font fontName="Times New Roman" size="10" pdfFontName="Times-Roman" pdfEncoding="Cp1250" isPdfEmbedded="true"/>
                </textElement>
                <textFieldExpression><![CDATA[$F{Status}]]></textFieldExpression>
            </textField>
            <textField isStretchWithOverflow="true" isBlankWhenNull="true">
                <reportElement positionType="Float" stretchType="RelativeToTallestObject" x="703" y="0" width="62" height="31" isPrintWhenDetailOverflows="true" uuid="3a9c7a9b-77bf-4b74-a119-4076fbbe9907">
                    <property name="net.sf.jasperreports.export.xls.auto.fit.row" value="true"/>
                    <property name="net.sf.jasperreports.export.xls.auto.fit.column" value="false"/>
                    <property name="net.sf.jasperreports.export.pdf.force.linebreak.policy" value="true"/>
                </reportElement>
                <box>
                    <pen lineWidth="0.5"/>
                    <topPen lineWidth="0.5"/>
                    <leftPen lineWidth="0.5"/>
                    <bottomPen lineWidth="0.5"/>
                    <rightPen lineWidth="0.5"/>
                </box>
                <textElement textAlignment="Center" verticalAlignment="Middle">
                    <font fontName="Times New Roman" size="10" pdfFontName="Times-Roman" pdfEncoding="Cp1250"/>
                </textElement>
                <textFieldExpression><![CDATA[$F{Followup_Date}]]></textFieldExpression>
            </textField>
            <textField isStretchWithOverflow="true">
                <reportElement positionType="Float" stretchType="RelativeToTallestObject" x="647" y="0" width="56" height="31" isPrintWhenDetailOverflows="true" uuid="36caba9f-b250-455a-821b-f3cf67ffbf59"/>
                <box>
                    <topPen lineWidth="0.5"/>
                    <leftPen lineWidth="0.5"/>
                    <bottomPen lineWidth="0.5"/>
                    <rightPen lineWidth="0.5"/>
                </box>
                <textElement textAlignment="Center" verticalAlignment="Middle">
                    <font fontName="Times New Roman" pdfFontName="Times-Roman" isPdfEmbedded="true"/>
                </textElement>
                <textFieldExpression><![CDATA[$F{Review}]]></textFieldExpression>
            </textField>
        </band>
    </detail>
</jasperReport>

2 个答案:

答案 0 :(得分:1)

尝试为详细信息区域设置splitType="Prevent"属性:

<detail>
    <band height="31" splitType="Prevent">

答案 1 :(得分:1)

我找到了一个正确或不正确的答案我不知道。我试过这样。我把细节带Splittype=prevent而不是拉伸。