Search code examples
jasper-reports

How to get the text field present in detail band in the same page or next page in jasper reports


I have a detail band in my ireport which consists of 12 text fields.In those 12 text fields i have "Address" text field as a large one So when i am entering details it is getting the data in report but when it comes to last part of a page then it is breaking the text field into two equal halves.For better understanding i will post an image enter image description here

As you can see in the image the "Address" text field is broken into two halfs and it is printing the same fields two times,once the address field as half and second the address field as another half.So my question is how to get the entire 12 fields automatically into a page(that may be next page or on the same page with the entire data in one page). I am posting jrxml code below

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

Solution

  • I found out an answer which is correct or not i dont know.I tried like this.I put in detail band Splittype=prevent instead of stretch.