Some attribute character is coming in the next line.it should come in one line
Example:
Student looking like
Student
but name is looking like
nam
e
The code is
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement positionType="Float" stretchType="RelativeToTallestObject" x="0" y="0" width="200" height="21" uuid="e3b2f0ba-d810-42d5-aad6-74b440e871c6"/>
<box>
<pen lineWidth="1.0"/>
<topPen lineWidth="1.0"/>
<leftPen lineWidth="1.0" lineStyle="Solid"/>
<bottomPen lineWidth="1.0"/>
<rightPen lineWidth="1.0"/>
</box>
<textElement>
<font fontName="SansSerif" size="8" isBold="true"/>
</textElement>
<textFieldExpression><![CDATA[$F{name}]]></textFieldExpression>
</textField>
Related
I have a main report this main report contains two subreports ,
The first subreport contains two tables, when there is a lot of data on the first table it prints the first page successfully but the other pages are empty.
The expected output is to continue show the rows of the first table until it go to the second table, if there is no a lot of data it works correctly
This the design code :
<band height="429">
<staticText>
<reportElement x="13" y="5" width="100" height="60" uuid="b236e2f4-495e-4a22-87fa-4e316ea5f41f"/>
<textElement textAlignment="Left" verticalAlignment="Middle">
<font size="11" isBold="true"/>
</textElement>
<text><![CDATA[Account Number :]]></text>
</staticText>
<staticText>
<reportElement x="13" y="27" width="89" height="18" uuid="7fdc8df6-4c51-4d87-b8f7-cb0acec8acef"/>
<textElement textAlignment="Left" verticalAlignment="Middle">
<font size="11" isBold="true"/>
</textElement>
<text><![CDATA[Description :]]></text>
</staticText>
<staticText>
<reportElement x="13" y="47" width="80" height="21" uuid="294925d2-bf2a-4c51-9f8a-339873e0f747"/>
<textElement textAlignment="Left" verticalAlignment="Middle">
<font size="11" isBold="true"/>
</textElement>
<text><![CDATA[Period from :]]></text>
</staticText>
<textField>
<reportElement x="113" y="7" width="100" height="17" uuid="0406491b-1bdb-41db-8ece-4058578dc28a"/>
<textElement textAlignment="Left" verticalAlignment="Middle">
<font isBold="true"/>
</textElement>
<textFieldExpression><![CDATA[$F{CUSTOMERACCOUNTNUMBER}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="100" y="24" width="350" height="23" uuid="f3a441fe-3d57-490d-9d24-cd0d060694f3"/>
<textElement textAlignment="Left" verticalAlignment="Middle">
<font isBold="true"/>
</textElement>
<textFieldExpression><![CDATA["Summary invoice for "+ $F{COMPANYNAME}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="204" y="47" width="100" height="20" uuid="e71997f3-50fb-4736-8fdc-cd74d95204db"/>
<textElement textAlignment="Left" verticalAlignment="Middle">
<font isBold="true"/>
</textElement>
<textFieldExpression><![CDATA[$F{PERIODTO}]]></textFieldExpression>
</textField>
<staticText>
<reportElement x="174" y="47" width="30" height="20" uuid="bec9327c-65d8-4070-9b55-ddeaa6527e2f"/>
<textElement textAlignment="Left" verticalAlignment="Middle">
<font isBold="true"/>
</textElement>
<text><![CDATA[ To:]]></text>
</staticText>
<textField>
<reportElement x="94" y="47" width="80" height="20" uuid="9e431304-75d4-43e6-9e7b-663a1dabf504"/>
<textElement textAlignment="Left" verticalAlignment="Middle">
<font isBold="true"/>
</textElement>
<textFieldExpression><![CDATA[$F{PERIODFROM}]]></textFieldExpression>
</textField>
<frame>
<reportElement positionType="Float" stretchType="RelativeToTallestObject" x="20" y="-10" width="760" height="287" isPrintWhenDetailOverflows="true" uuid="81f11b41-36e2-4795-9965-02ae41b1b338"/>
<box>
<topPen lineWidth="2.0" lineStyle="Solid" lineColor="#20E827"/>
<leftPen lineWidth="2.0" lineStyle="Solid" lineColor="#20E827"/>
<bottomPen lineWidth="2.0" lineStyle="Solid" lineColor="#20E827"/>
<rightPen lineWidth="2.0" lineStyle="Solid" lineColor="#20E827"/>
</box>
<componentElement>
<reportElement positionType="Float" stretchType="RelativeToTallestObject" isPrintRepeatedValues="false" mode="Opaque" x="21" y="111" width="724" height="60" isPrintWhenDetailOverflows="true" uuid="6b9558ad-488a-4954-98f0-b4a4c19a3dbe">
<property name="net.sf.jasperreports.export.headertoolbar.table.name" value=""/>
<property name="local_mesure_unitwidth" value="pixel"/>
<property name="com.jaspersoft.studio.unit.width" value="px"/>
</reportElement>
<jr:table xmlns:jr="http://jasperreports.sourceforge.net/jasperreports/components" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports/components http://jasperreports.sourceforge.net/xsd/components.xsd">
<datasetRun subDataset="InvoiceDetailDS" uuid="d4a58f73-73e9-432a-bc4c-bc82959e3959">
<datasetParameter name="headerId">
<datasetParameterExpression><![CDATA[$F{HEADERID}]]></datasetParameterExpression>
</datasetParameter>
<connectionExpression><![CDATA[$P{REPORT_CONNECTION}]]></connectionExpression>
</datasetRun>
<jr:column width="95" uuid="52966a24-1f98-4445-b6f6-f83ada4ec1f8">
<jr:columnHeader height="30" rowSpan="1">
<staticText>
<reportElement mode="Opaque" x="0" y="0" width="95" height="30" backcolor="#A6FFB5" uuid="868f2a68-0cba-47ce-9c30-f955deb28e85"/>
<box>
<topPen lineWidth="0.3" lineStyle="Solid" lineColor="#000000"/>
<leftPen lineWidth="0.3" lineStyle="Solid" lineColor="#000000"/>
<bottomPen lineWidth="0.3" lineStyle="Solid" lineColor="#000000"/>
<rightPen lineWidth="0.3" lineStyle="Solid" lineColor="#000000"/>
</box>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="11" isBold="true"/>
</textElement>
<text><![CDATA[Service ID]]></text>
</staticText>
</jr:columnHeader>
<jr:detailCell height="30" rowSpan="1">
<textField isBlankWhenNull="true">
<reportElement positionType="Float" stretchType="RelativeToTallestObject" x="0" y="0" width="95" height="30" isPrintWhenDetailOverflows="true" uuid="4dce2c60-c99f-4752-9697-492e8e2d9930"/>
<box>
<topPen lineWidth="0.3" lineStyle="Solid" lineColor="#000000"/>
<leftPen lineWidth="0.3" lineStyle="Solid" lineColor="#000000"/>
<bottomPen lineWidth="0.3" lineStyle="Solid" lineColor="#000000"/>
<rightPen lineWidth="0.3" lineStyle="Solid" lineColor="#000000"/>
</box>
<textElement textAlignment="Center" verticalAlignment="Middle"/>
<textFieldExpression><![CDATA[$F{ORDERSERVICEID}]]></textFieldExpression>
</textField>
</jr:detailCell>
</jr:column>
<jr:column width="92" uuid="bb1703e2-5b7e-4bef-9772-e40ee123a9bd">
<jr:columnHeader height="30" rowSpan="1">
<staticText>
<reportElement mode="Opaque" x="0" y="0" width="92" height="30" backcolor="#A6FFB5" uuid="56038351-cd7e-4c6d-9158-4d071e26faf8"/>
<box>
<topPen lineWidth="0.3" lineStyle="Solid" lineColor="#000000"/>
<leftPen lineWidth="0.3" lineStyle="Solid" lineColor="#000000"/>
<bottomPen lineWidth="0.3" lineStyle="Solid" lineColor="#000000"/>
<rightPen lineWidth="0.3" lineStyle="Solid" lineColor="#000000"/>
</box>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="11" isBold="true"/>
</textElement>
<text><![CDATA[Order Number]]></text>
</staticText>
</jr:columnHeader>
<jr:detailCell height="30" rowSpan="1">
<textField>
<reportElement positionType="Float" stretchType="RelativeToTallestObject" x="0" y="0" width="92" height="30" uuid="f1d27619-7b71-407d-a449-f3bfa1906c93"/>
<box>
<topPen lineWidth="0.3"/>
<leftPen lineWidth="0.3"/>
<bottomPen lineWidth="0.3"/>
<rightPen lineWidth="0.3"/>
</box>
<textElement textAlignment="Center" verticalAlignment="Middle"/>
<textFieldExpression><![CDATA[$F{ROSNUMBER}]]></textFieldExpression>
</textField>
</jr:detailCell>
</jr:column>
<jr:column width="95" uuid="2703ba82-935b-496b-a4af-223f33a4a23c">
<jr:tableHeader height="1" rowSpan="1"/>
<jr:tableFooter height="1" rowSpan="1"/>
<jr:columnHeader height="30" rowSpan="1">
<staticText>
<reportElement mode="Opaque" x="0" y="0" width="95" height="30" backcolor="#A6FFB5" uuid="f1fe79d1-2cea-42b1-88cb-1bc4e70ef6e1"/>
<box>
<topPen lineWidth="0.3" lineStyle="Solid" lineColor="#000000"/>
<leftPen lineWidth="0.3" lineStyle="Solid" lineColor="#000000"/>
<bottomPen lineWidth="0.3" lineStyle="Solid" lineColor="#000000"/>
<rightPen lineWidth="0.3" lineStyle="Solid" lineColor="#000000"/>
</box>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="11" isBold="true"/>
</textElement>
<text><![CDATA[Action Type]]></text>
</staticText>
</jr:columnHeader>
<jr:columnFooter height="0" rowSpan="1"/>
<jr:detailCell height="30" rowSpan="1">
<textField isBlankWhenNull="true">
<reportElement positionType="Float" stretchType="RelativeToTallestObject" x="0" y="0" width="95" height="30" isPrintWhenDetailOverflows="true" uuid="d512d971-c04f-4ecf-8a11-22b3fcbdffc0"/>
<box>
<topPen lineWidth="0.3" lineStyle="Solid" lineColor="#000000"/>
<leftPen lineWidth="0.3" lineStyle="Solid" lineColor="#000000"/>
<bottomPen lineWidth="0.3" lineStyle="Solid" lineColor="#000000"/>
<rightPen lineWidth="0.3" lineStyle="Solid" lineColor="#000000"/>
</box>
<textElement textAlignment="Center" verticalAlignment="Middle"/>
<textFieldExpression><![CDATA[$F{ACTIONTYPE}]]></textFieldExpression>
</textField>
</jr:detailCell>
</jr:column>
<jr:column width="80" uuid="479436d0-de8d-4cd6-9b8d-cc8f42eef53d">
<jr:columnHeader height="30" rowSpan="1">
<staticText>
<reportElement mode="Opaque" x="0" y="0" width="80" height="30" backcolor="#A6FFB5" uuid="9d46cd49-e847-4967-b69b-daa03cb3ed2f"/>
<box>
<topPen lineWidth="0.3" lineStyle="Solid" lineColor="#000000"/>
<leftPen lineWidth="0.3" lineStyle="Solid" lineColor="#000000"/>
<bottomPen lineWidth="0.3" lineStyle="Solid" lineColor="#000000"/>
<rightPen lineWidth="0.3" lineStyle="Solid" lineColor="#000000"/>
</box>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="11" isBold="true"/>
</textElement>
<text><![CDATA[Invoice From]]></text>
</staticText>
</jr:columnHeader>
<jr:detailCell height="30" rowSpan="1">
<textField isBlankWhenNull="true">
<reportElement positionType="Float" stretchType="RelativeToTallestObject" x="0" y="0" width="80" height="30" uuid="9b755792-0ce6-4144-985a-cf2f50e97c4b"/>
<box>
<topPen lineWidth="0.3" lineStyle="Solid" lineColor="#000000"/>
<leftPen lineWidth="0.3" lineStyle="Solid" lineColor="#000000"/>
<bottomPen lineWidth="0.3" lineStyle="Solid" lineColor="#000000"/>
<rightPen lineWidth="0.3" lineStyle="Solid" lineColor="#000000"/>
</box>
<textElement textAlignment="Center" verticalAlignment="Middle"/>
<textFieldExpression><![CDATA[$F{INVOICEFROM}]]></textFieldExpression>
</textField>
</jr:detailCell>
</jr:column>
<jr:column width="71" uuid="3b39699e-eeda-408c-a2af-d45125fe57ed">
<jr:columnHeader height="30" rowSpan="1">
<staticText>
<reportElement mode="Opaque" x="0" y="0" width="71" height="30" backcolor="#A6FFB5" uuid="5426229a-2a89-4335-aa9f-b42b51707041"/>
<box>
<topPen lineWidth="0.3" lineStyle="Solid" lineColor="#000000"/>
<leftPen lineWidth="0.3" lineStyle="Solid" lineColor="#000000"/>
<bottomPen lineWidth="0.3" lineStyle="Solid" lineColor="#000000"/>
<rightPen lineWidth="0.3" lineStyle="Solid" lineColor="#000000"/>
</box>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="11" isBold="true"/>
</textElement>
<text><![CDATA[Invoice To]]></text>
</staticText>
</jr:columnHeader>
<jr:detailCell height="30" rowSpan="1">
<textField isBlankWhenNull="true">
<reportElement positionType="Float" stretchType="RelativeToTallestObject" x="0" y="0" width="71" height="30" uuid="38071396-7786-4aec-ae98-64780811e474"/>
<box>
<topPen lineWidth="0.3" lineStyle="Solid" lineColor="#000000"/>
<leftPen lineWidth="0.3" lineStyle="Solid" lineColor="#000000"/>
<bottomPen lineWidth="0.3" lineStyle="Solid" lineColor="#000000"/>
<rightPen lineWidth="0.3" lineStyle="Solid" lineColor="#000000"/>
</box>
<textElement textAlignment="Center" verticalAlignment="Middle"/>
<textFieldExpression><![CDATA[$F{INVOICETO}]]></textFieldExpression>
</textField>
</jr:detailCell>
</jr:column>
<jr:column width="101" uuid="6c5336a5-d796-469d-b843-f1062bf7f7ca">
<jr:columnHeader height="30" rowSpan="1">
<staticText>
<reportElement mode="Opaque" x="0" y="0" width="101" height="30" backcolor="#A6FFB5" uuid="49d8ab5c-272e-428d-b4c2-466c13d9a2b7"/>
<box>
<topPen lineWidth="0.3" lineStyle="Solid" lineColor="#000000"/>
<leftPen lineWidth="0.3" lineStyle="Solid" lineColor="#000000"/>
<bottomPen lineWidth="0.3" lineStyle="Solid" lineColor="#000000"/>
<rightPen lineWidth="0.3" lineStyle="Solid" lineColor="#000000"/>
</box>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="11" isBold="true"/>
</textElement>
<text><![CDATA[Non-Recurring Charges]]></text>
</staticText>
</jr:columnHeader>
<jr:detailCell height="30" rowSpan="1">
<textField pattern="#,##0.###;(#,##0.###)" isBlankWhenNull="true">
<reportElement positionType="Float" stretchType="RelativeToTallestObject" x="0" y="0" width="101" height="30" uuid="a93bc30f-13bc-4eaf-9cec-92849cc69756"/>
<box>
<topPen lineWidth="0.3" lineStyle="Solid" lineColor="#000000"/>
<leftPen lineWidth="0.3" lineStyle="Solid" lineColor="#000000"/>
<bottomPen lineWidth="0.3" lineStyle="Solid" lineColor="#000000"/>
<rightPen lineWidth="0.3" lineStyle="Solid" lineColor="#000000"/>
</box>
<textElement textAlignment="Center" verticalAlignment="Middle"/>
<textFieldExpression><![CDATA[$F{NRC}]]></textFieldExpression>
</textField>
</jr:detailCell>
</jr:column>
<jr:column width="99" uuid="f2b13180-33c5-405d-883f-402c53c8cf20">
<jr:columnHeader height="30" rowSpan="1">
<staticText>
<reportElement mode="Opaque" x="0" y="0" width="99" height="30" backcolor="#A6FFB5" uuid="4cc22936-e12f-4bca-bb22-453d021d61c1"/>
<box>
<topPen lineWidth="0.3" lineStyle="Solid" lineColor="#000000"/>
<leftPen lineWidth="0.3" lineStyle="Solid" lineColor="#000000"/>
<bottomPen lineWidth="0.3" lineStyle="Solid" lineColor="#000000"/>
<rightPen lineWidth="0.3" lineStyle="Solid" lineColor="#000000"/>
</box>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="11" isBold="true"/>
</textElement>
<text><![CDATA[Recurring Charges]]></text>
</staticText>
</jr:columnHeader>
<jr:detailCell height="30" rowSpan="1">
<textField pattern="#,##0.###;(#,##0.###)" isBlankWhenNull="true">
<reportElement positionType="Float" stretchType="RelativeToTallestObject" x="0" y="0" width="99" height="30" uuid="b5639d81-207e-432c-b3e0-793bf7dd533e"/>
<box>
<topPen lineWidth="0.3" lineStyle="Solid" lineColor="#000000"/>
<leftPen lineWidth="0.3" lineStyle="Solid" lineColor="#000000"/>
<bottomPen lineWidth="0.3" lineStyle="Solid" lineColor="#000000"/>
<rightPen lineWidth="0.3" lineStyle="Solid" lineColor="#000000"/>
</box>
<textElement textAlignment="Center" verticalAlignment="Middle"/>
<textFieldExpression><![CDATA[$F{MRC}]]></textFieldExpression>
</textField>
</jr:detailCell>
</jr:column>
<jr:column width="90" uuid="d2a8e5ef-097b-4e8c-b0bd-84f8f2a272bd">
<jr:columnHeader height="30" rowSpan="1">
<staticText>
<reportElement mode="Opaque" x="0" y="0" width="90" height="30" backcolor="#A6FFB5" uuid="b2f75a95-5ac4-415b-b64b-05bcf3c77bef"/>
<box>
<topPen lineWidth="0.3" lineStyle="Solid" lineColor="#000000"/>
<leftPen lineWidth="0.3" lineStyle="Solid" lineColor="#000000"/>
<bottomPen lineWidth="0.3" lineStyle="Solid" lineColor="#000000"/>
<rightPen lineWidth="0.3" lineStyle="Solid" lineColor="#000000"/>
</box>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="11" isBold="true"/>
</textElement>
<text><![CDATA[Amount SAR]]></text>
</staticText>
</jr:columnHeader>
<jr:detailCell height="30" rowSpan="1">
<textField pattern="#,##0.###;(#,##0.###)" isBlankWhenNull="true">
<reportElement positionType="Float" stretchType="RelativeToTallestObject" x="0" y="0" width="90" height="30" uuid="0b9a5ef9-9e8a-406f-ab70-95d32ff00a40"/>
<box>
<topPen lineWidth="0.3" lineStyle="Solid" lineColor="#000000"/>
<leftPen lineWidth="0.3" lineStyle="Solid" lineColor="#000000"/>
<bottomPen lineWidth="0.3" lineStyle="Solid" lineColor="#000000"/>
<rightPen lineWidth="0.3" lineStyle="Solid" lineColor="#000000"/>
</box>
<textElement textAlignment="Center" verticalAlignment="Middle"/>
<textFieldExpression><![CDATA[$F{TOTALAMOUNT}]]></textFieldExpression>
</textField>
</jr:detailCell>
</jr:column>
</jr:table>
</componentElement>
</frame>
</band>
</title>
<summary>
<band height="326">
<frame>
<reportElement positionType="Float" stretchType="RelativeToTallestObject" x="130" y="120" width="760" height="206" isPrintWhenDetailOverflows="true" forecolor="#000000" uuid="1c3a92e7-b648-4580-acae-afb17ad5d59e"/>
<box>
<topPen lineWidth="2.0" lineColor="#20E827"/>
<leftPen lineWidth="2.0" lineColor="#20E827"/>
<bottomPen lineWidth="2.0" lineColor="#20E827"/>
<rightPen lineWidth="2.0" lineColor="#20E827"/>
</box>
<componentElement>
<reportElement positionType="Float" stretchType="RelativeToTallestObject" isPrintRepeatedValues="false" mode="Opaque" x="-89" y="-19" width="407" height="60" isPrintWhenDetailOverflows="true" uuid="1866fba3-4869-4d93-af0f-36422d16eccf">
<property name="net.sf.jasperreports.export.headertoolbar.table.name" value=""/>
<property name="local_mesure_unitwidth" value="pixel"/>
<property name="com.jaspersoft.studio.unit.width" value="px"/>
</reportElement>
<jr:table xmlns:jr="http://jasperreports.sourceforge.net/jasperreports/components" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports/components http://jasperreports.sourceforge.net/xsd/components.xsd">
<datasetRun subDataset="InvoiceDetailDS" uuid="4f1d98f2-fe87-477a-90b3-7524f0cab260">
<datasetParameter name="headerId">
<datasetParameterExpression><![CDATA[$F{HEADERID}]]></datasetParameterExpression>
</datasetParameter>
<connectionExpression><![CDATA[$P{REPORT_CONNECTION}]]></connectionExpression>
</datasetRun>
<jr:column width="93" uuid="7c67a26e-a635-4ddb-8406-4a2f9b225c87">
<jr:tableHeader height="1" rowSpan="1"/>
<jr:columnHeader height="30" rowSpan="1">
<staticText>
<reportElement mode="Opaque" x="0" y="0" width="93" height="30" backcolor="#A6FFB5" uuid="635a9e6c-697a-4637-b674-69aa8c753ed8"/>
<box>
<topPen lineWidth="0.3" lineStyle="Solid" lineColor="#000000"/>
<leftPen lineWidth="0.3" lineStyle="Solid" lineColor="#000000"/>
<bottomPen lineWidth="0.3" lineStyle="Solid" lineColor="#000000"/>
<rightPen lineWidth="0.3" lineStyle="Solid" lineColor="#000000"/>
</box>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="11" isBold="true"/>
</textElement>
<text><![CDATA[Old SRF Number]]></text>
</staticText>
</jr:columnHeader>
<jr:detailCell height="30" rowSpan="1">
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement positionType="Float" stretchType="RelativeToTallestObject" x="0" y="0" width="93" height="30" isPrintWhenDetailOverflows="true" uuid="ef0042fa-17e5-4f0a-b1d1-d091bf1723db"/>
<box>
<topPen lineWidth="0.3" lineStyle="Solid" lineColor="#000000"/>
<leftPen lineWidth="0.3" lineStyle="Solid" lineColor="#000000"/>
<bottomPen lineWidth="0.3" lineStyle="Solid" lineColor="#000000"/>
<rightPen lineWidth="0.3" lineStyle="Solid" lineColor="#000000"/>
</box>
<textElement textAlignment="Center" verticalAlignment="Middle"/>
<textFieldExpression><![CDATA[$F{OLDSRFNUMBER}]]></textFieldExpression>
</textField>
</jr:detailCell>
</jr:column>
<jr:column width="191" uuid="1410c880-6b1d-44c3-95a3-9bddc86bb688">
<jr:tableHeader height="1" rowSpan="1"/>
<jr:tableFooter height="1" rowSpan="1"/>
<jr:columnHeader height="30" rowSpan="1">
<staticText>
<reportElement mode="Opaque" x="0" y="0" width="191" height="30" backcolor="#A6FFB5" uuid="5001b005-2471-484a-9656-1886d2462ca1"/>
<box>
<topPen lineWidth="0.3" lineStyle="Solid" lineColor="#000000"/>
<leftPen lineWidth="0.3" lineStyle="Solid" lineColor="#000000"/>
<bottomPen lineWidth="0.3" lineStyle="Solid" lineColor="#000000"/>
<rightPen lineWidth="0.3" lineStyle="Solid" lineColor="#000000"/>
</box>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="11" isBold="true"/>
</textElement>
<text><![CDATA[Old Service Description]]></text>
</staticText>
</jr:columnHeader>
<jr:columnFooter height="0" rowSpan="1"/>
<jr:detailCell height="30" rowSpan="1">
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement positionType="Float" stretchType="RelativeToTallestObject" x="0" y="0" width="191" height="30" isPrintWhenDetailOverflows="true" uuid="e51f0035-cad9-4cc8-baef-06d208073ef5"/>
<box>
<topPen lineWidth="0.3" lineStyle="Solid" lineColor="#000000"/>
<leftPen lineWidth="0.3" lineStyle="Solid" lineColor="#000000"/>
<bottomPen lineWidth="0.3" lineStyle="Solid" lineColor="#000000"/>
<rightPen lineWidth="0.3" lineStyle="Solid" lineColor="#000000"/>
</box>
<textElement textAlignment="Center" verticalAlignment="Middle"/>
<textFieldExpression><![CDATA[$F{OLDSERVICE}]]></textFieldExpression>
</textField>
</jr:detailCell>
</jr:column>
<jr:column width="100" uuid="07118eff-f7e7-4577-a4da-8c58e40ae256">
<jr:columnHeader height="30" rowSpan="1">
<staticText>
<reportElement mode="Opaque" x="0" y="0" width="100" height="30" backcolor="#A6FFB5" uuid="6d4ed900-1965-402a-adaf-731c484c93ee"/>
<box>
<topPen lineWidth="0.3" lineStyle="Solid" lineColor="#000000"/>
<leftPen lineWidth="0.3" lineStyle="Solid" lineColor="#000000"/>
<bottomPen lineWidth="0.3" lineStyle="Solid" lineColor="#000000"/>
<rightPen lineWidth="0.3" lineStyle="Solid" lineColor="#000000"/>
</box>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="11" isBold="true"/>
</textElement>
<text><![CDATA[New SRF Number]]></text>
</staticText>
</jr:columnHeader>
<jr:detailCell height="30" rowSpan="1">
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement positionType="Float" stretchType="RelativeToTallestObject" x="0" y="0" width="100" height="30" uuid="14c2da73-ebca-44a5-b6b5-ddaa50f4c360"/>
<box>
<topPen lineWidth="0.3"/>
<leftPen lineWidth="0.3"/>
<bottomPen lineWidth="0.3"/>
<rightPen lineWidth="0.3"/>
</box>
<textElement textAlignment="Center" verticalAlignment="Middle"/>
<textFieldExpression><![CDATA[$F{SRFNUMBER}]]></textFieldExpression>
</textField>
</jr:detailCell>
</jr:column>
<jr:column width="332" uuid="587c3be8-0a7a-447e-b522-63b507e03f3e">
<jr:columnHeader height="30" rowSpan="1">
<staticText>
<reportElement mode="Opaque" x="0" y="0" width="332" height="30" backcolor="#A6FFB5" uuid="d571175e-3038-47b7-b9b8-a17e3ba7c271"/>
<box>
<topPen lineWidth="0.3" lineStyle="Solid" lineColor="#000000"/>
<leftPen lineWidth="0.3" lineStyle="Solid" lineColor="#000000"/>
<bottomPen lineWidth="0.3" lineStyle="Solid" lineColor="#000000"/>
<rightPen lineWidth="0.3" lineStyle="Solid" lineColor="#000000"/>
</box>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="11" isBold="true"/>
</textElement>
<text><![CDATA[New Service Description]]></text>
</staticText>
</jr:columnHeader>
<jr:detailCell height="30" rowSpan="1">
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement positionType="Float" stretchType="RelativeToTallestObject" x="0" y="0" width="332" height="30" isPrintWhenDetailOverflows="true" uuid="a3e861ee-40be-4c0c-bcc6-3fce102aa07c"/>
<box>
<topPen lineWidth="0.3" lineStyle="Solid" lineColor="#000000"/>
<leftPen lineWidth="0.3" lineStyle="Solid" lineColor="#000000"/>
<bottomPen lineWidth="0.3" lineStyle="Solid" lineColor="#000000"/>
<rightPen lineWidth="0.3" lineStyle="Solid" lineColor="#000000"/>
</box>
<textElement textAlignment="Left" verticalAlignment="Middle">
<paragraph leftIndent="5"/>
</textElement>
<textFieldExpression><![CDATA[$F{DESCRIPTION}]]></textFieldExpression>
</textField>
</jr:detailCell>
</jr:column>
</jr:table>
</componentElement>
</frame>
</band>
This is how the two subreports are included in the main report:
<subreport>
<reportElement positionType="Float" x="12" y="647" width="796" height="30" isRemoveLineWhenBlank="true" uuid="01ec6c49-7d39-4bea-836e-69715b24090c">
<property name="local_mesure_unitwidth" value="pixel"/>
<property name="com.jaspersoft.studio.unit.width" value="px"/>
</reportElement>
<subreportParameter name="INVOICE_NO">
<subreportParameterExpression><![CDATA[$P{INVOICE_NO}]]></subreportParameterExpression>
</subreportParameter>
<connectionExpression><![CDATA[$P{REPORT_CONNECTION}]]></connectionExpression>
<subreportExpression><![CDATA["InvoiceServiceDetails.jasper"]]></subreportExpression>
</subreport>
<subreport>
<reportElement positionType="Float" x="11" y="677" width="797" height="28" isRemoveLineWhenBlank="true" uuid="aef8cb38-ed55-4893-aca0-96d852a2f5e7"/>
<subreportParameter name="INVOICE_NO">
<subreportParameterExpression><![CDATA[$P{INVOICE_NO}]]></subreportParameterExpression>
</subreportParameter>
<connectionExpression><![CDATA[$P{REPORT_CONNECTION}]]></connectionExpression>
<subreportExpression><![CDATA["InvoiceServiceSummaryDetails.jasper"]]></subreportExpression>
</subreport>
How can I solve this ?
Edit
After trying to change some pages properties , the fill report give me out of memory exception, after searching i used virtualizer but not solved.
SourceFileName = SourceFileName.replaceAll("//", "/");
JRVirtualizer virtualizer = new JRSwapFileVirtualizer(1000, new JRSwapFile(reportsDirString.replaceAll("//", "/"), 2048, 1024), true);
JRVirtualizationHelper.setThreadVirtualizer(virtualizer);
// .replaceAll("\\\\", "\\\\")
parameters.put(JRParameter.REPORT_VIRTUALIZER, virtualizer);
As mentioned by #philipobrien above placing a sub-report in the Detail band is usually incorrect unless you intentionally want a new report per row returned by your data source.
I would recommend using the GroupFooter section which allows for multiple bands. These bands are filled in the order in which they are appear in the JRXML.
The following sample shows how you can use the GroupFooter section with two bands. As far as I can remember the GroupFooter bands will auto expand their height so there is no need to specifically set the height unless of course you want a minimum height.
Please note that I have removed the GroupHeader section from the below sample. In this scenario there was no need for this section. Also note the dummy expression used to ensure the group displays.
<group name="DUMMY_GROUP">
<groupExpression><![CDATA[0 == 0]]></groupExpression>
<groupFooter>
<band>
<subreport>
<reportElement positionType="Float" x="12" y="647" width="796" height="30" isRemoveLineWhenBlank="true" uuid="01ec6c49-7d39-4bea-836e-69715b24090c">
<property name="local_mesure_unitwidth" value="pixel"/>
<property name="com.jaspersoft.studio.unit.width" value="px"/>
</reportElement>
<subreportParameter name="INVOICE_NO">
<subreportParameterExpression><![CDATA[$P{INVOICE_NO}]]></subreportParameterExpression>
</subreportParameter>
<connectionExpression><![CDATA[$P{REPORT_CONNECTION}]]></connectionExpression>
<subreportExpression><![CDATA["InvoiceServiceDetails.jasper"]]></subreportExpression>
</subreport>
</band>
<band>
<subreport>
<reportElement positionType="Float" x="11" y="677" width="797" height="28" isRemoveLineWhenBlank="true" uuid="aef8cb38-ed55-4893-aca0-96d852a2f5e7"/>
<subreportParameter name="INVOICE_NO">
<subreportParameterExpression><![CDATA[$P{INVOICE_NO}]]></subreportParameterExpression>
</subreportParameter>
<connectionExpression><![CDATA[$P{REPORT_CONNECTION}]]></connectionExpression>
<subreportExpression><![CDATA["InvoiceServiceSummaryDetails.jasper"]]></subreportExpression>
</subreport>
</band>
</groupFooter>
</group>
Sub-reports should rarely be placed in the Detail band, although there are occasionally valid reasons to do so.
The reason for this is that the sub-reports will be reproduced once for each row of data returned by your main query e.g. if you have 1 row returned you will get 1 copy of each subreport, if you have 100 rows returned you will get 100 of each sub-report. If your sub-reports also have 100 rows each you are returning 10k rows for every sub-report and are very likely to hit an out of memory exception error.
Try moving your sub-reports to either a Header/Footer band or to the Summary band and then run the report.
I use traditional Chinese ,and set the Stretch with overflow.
I find the Jasper report lose some characters like above picture when it would create a new line.
my jrxml text :
<textField isStretchWithOverflow="true" pattern="" isBlankWhenNull="true">
<reportElement positionType="Float" stretchType="RelativeToBandHeight" x="352" y="0" width="140" height="30" isPrintWhenDetailOverflows="true" uuid="9855b06a-dfca-4a88-8830-efb1590c2d4e"/>
<box topPadding="1" leftPadding="4" bottomPadding="5" rightPadding="4">
<topPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/>
<leftPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/>
<bottomPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/>
<rightPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/>
</box>
<textElement verticalAlignment="Middle">
<font fontName="標楷體" pdfFontName="MHei-Medium" pdfEncoding="UniCNS-UCS2-H" isPdfEmbedded="true"/>
<paragraph lineSpacing="Single" lineSpacingSize="1.1"/>
</textElement>
<textFieldExpression><![CDATA[$F{varyReason}]]></textFieldExpression>
</textField>
Do I lose some setting???
How i can remove the space between detail and last page footer in JasperReports?
I need to remove the white space between them
I use this code for lastpagefooter
<lastPageFooter>
<band height="187">
<staticText>
<reportElement x="125" y="0" width="68" height="20" uuid="d7bc9c8a-c20b-4f79-8515-639609ead0cc"/>
<box>
<topPen lineWidth="1.0"/>
<leftPen lineWidth="1.0"/>
<bottomPen lineWidth="1.0"/>
<rightPen lineWidth="1.0"/>
</box>
<textElement textAlignment="Right" verticalAlignment="Middle">
<font size="14"/>
</textElement>
<text><![CDATA[المجموع : ]]></text>
</staticText>
<textField>
<reportElement x="35" y="0" width="90" height="20" uuid="4b93f507-3e79-4ba7-99ce-d65b64a1a78b"/>
<box>
<topPen lineWidth="1.0"/>
<leftPen lineWidth="1.0"/>
<bottomPen lineWidth="1.0"/>
<rightPen lineWidth="1.0"/>
</box>
<textElement textAlignment="Right" verticalAlignment="Middle">
<font size="14"/>
</textElement>
<textFieldExpression><![CDATA[$P{Totals}]]></textFieldExpression>
</textField>
<textField evaluationTime="Report">
<reportElement x="23" y="167" width="40" height="20" uuid="c0c0de0b-7bb5-4133-bf5e-dfe51f91dac4"/>
<box rightPadding="2"/>
<textElement textAlignment="Right"/>
</band>
</lastPageFooter>
http://www.gulfup.com/?lV8MpF
This is the file
I just change the propriety of report Ignore pagination to true
<jasperReport ... isIgnorePagination="true" ...>
The problem in this case that i can't use breakI want to break to a new page when the number of the rows
finally, I use group footer and i add the total in it
I have a detail band in my jasper report, but this band does not fit the contents of the field to which you sent the most text, then this container detail band and fields he owns.
I have placed all the fields in the detail band the following properties:
Position Type = Float
Stretch Type = Relative to Tallest Object
Stretch With Overflow = check
For band detail I have placed the following property:
Split Type = Stretch
I may be doing wrong, or should I place additional?
<detail>
<band height="10">
<textField isBlankWhenNull="true">
<reportElement positionType="Float" stretchType="RelativeToTallestObject" x="42" y="0" width="57" height="10" uuid="fe546361-32de-4ac2-861d-b84f704a429c"/>
<box>
<pen lineWidth="0.0"/>
<topPen lineWidth="0.0"/>
<leftPen lineWidth="0.0"/>
<bottomPen lineWidth="0.0"/>
<rightPen lineWidth="0.0"/>
</box>
<textElement verticalAlignment="Middle">
<font size="7"/>
<paragraph leftIndent="4"/>
</textElement>
<textFieldExpression><![CDATA[$F{codigo}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement positionType="Float" stretchType="RelativeToTallestObject" x="99" y="0" width="142" height="10" uuid="fe546361-32de-4ac2-861d-b84f704a429c"/>
<box>
<pen lineWidth="0.0"/>
<topPen lineWidth="0.0"/>
<leftPen lineWidth="0.0"/>
<bottomPen lineWidth="0.0"/>
<rightPen lineWidth="0.0"/>
</box>
<textElement verticalAlignment="Middle">
<font size="7"/>
<paragraph leftIndent="4"/>
</textElement>
<textFieldExpression><![CDATA[$F{descripcion}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement positionType="Float" stretchType="RelativeToTallestObject" x="241" y="0" width="42" height="10" uuid="fe546361-32de-4ac2-861d-b84f704a429c"/>
<box>
<pen lineWidth="0.0"/>
<topPen lineWidth="0.0"/>
<leftPen lineWidth="0.0"/>
<bottomPen lineWidth="0.0"/>
<rightPen lineWidth="0.0"/>
</box>
<textElement verticalAlignment="Middle">
<font size="7"/>
<paragraph leftIndent="4"/>
</textElement>
<textFieldExpression><![CDATA[$F{lote}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement positionType="Float" stretchType="RelativeToTallestObject" x="283" y="0" width="29" height="10" uuid="fe546361-32de-4ac2-861d-b84f704a429c"/>
<box>
<pen lineWidth="0.0"/>
<topPen lineWidth="0.0"/>
<leftPen lineWidth="0.0"/>
<bottomPen lineWidth="0.0"/>
<rightPen lineWidth="0.0"/>
</box>
<textElement verticalAlignment="Middle">
<font size="7"/>
<paragraph leftIndent="4"/>
</textElement>
<textFieldExpression><![CDATA[$F{unidad}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement positionType="Float" stretchType="RelativeToTallestObject" x="312" y="0" width="57" height="10" uuid="fe546361-32de-4ac2-861d-b84f704a429c"/>
<box>
<pen lineWidth="0.0"/>
<topPen lineWidth="0.0"/>
<leftPen lineWidth="0.0"/>
<bottomPen lineWidth="0.0"/>
<rightPen lineWidth="0.0"/>
</box>
<textElement textAlignment="Right" verticalAlignment="Middle">
<font size="7"/>
<paragraph rightIndent="3"/>
</textElement>
<textFieldExpression><![CDATA[$F{cantidad}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement positionType="Float" stretchType="RelativeToTallestObject" x="369" y="0" width="85" height="10" uuid="fe546361-32de-4ac2-861d-b84f704a429c"/>
<box>
<pen lineWidth="0.0"/>
<topPen lineWidth="0.0"/>
<leftPen lineWidth="0.0"/>
<bottomPen lineWidth="0.0"/>
<rightPen lineWidth="0.0"/>
</box>
<textElement textAlignment="Right" verticalAlignment="Middle">
<font size="7"/>
<paragraph rightIndent="3"/>
</textElement>
<textFieldExpression><![CDATA[$F{precioUnitario}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement positionType="Float" stretchType="RelativeToTallestObject" x="454" y="0" width="99" height="10" uuid="fe546361-32de-4ac2-861d-b84f704a429c"/>
<box>
<pen lineWidth="0.0"/>
<topPen lineWidth="0.0"/>
<leftPen lineWidth="0.0"/>
<bottomPen lineWidth="0.0"/>
<rightPen lineWidth="0.0"/>
</box>
<textElement textAlignment="Right" verticalAlignment="Middle">
<font size="7"/>
<paragraph rightIndent="3"/>
</textElement>
<textFieldExpression><![CDATA[$F{valorTotal}]]></textFieldExpression>
</textField>
</band>
</detail>
I am working with jasper report-4.5.0.I want to hide a field in jasper based on the flag value.Below is tha code which i am using in columnHeader band.
<staticText>
<reportElement x="365" y="0" width="100" height="20"/>
<box>
<topPen lineWidth="0.25"/>
<leftPen lineWidth="0.25"/>
<bottomPen lineWidth="0.25"/>
<rightPen lineWidth="0.25"/>
</box>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font isBold="true"/>
</textElement>
<text><![CDATA[TotalCharge]]></text>
</staticText>
and below code i am using in detail band.
<textField>
<reportElement x="365" y="0" width="100" height="20">
<printWhenExpression><![CDATA[!$P{dataType}]]></printWhenExpression>
</reportElement>
<box>
<leftPen lineWidth="0.25"/>
<bottomPen lineWidth="0.25"/>
<rightPen lineWidth="0.25"/>
</box>
<textElement textAlignment="Right" verticalAlignment="Middle">
<font size="8"/>
</textElement>
<textFieldExpression><![CDATA[$F{chargeTotal}]]></textFieldExpression>
</textField>
i am declaring the parameter in jrxml as
<parameter name="dataType" class="java.lang.Boolean"/>
the value to this parameter is coming from java class.If it is the false value i dont want to display this chargeTotal column.What i am doing wrong in my code.I am not getting.Any one can point me where i am doing wrong its urgent to me.
The code snippets you provided for the textfield look correct, but if you are wanting to hide the column header also you need to also add a printWhenExpression for it.
<staticText>
<reportElement x="365" y="0" width="100" height="20">
<printWhenExpression><![CDATA[$P{dataType}]]></printWhenExpression>
</reportElement>
<box>
<topPen lineWidth="0.25"/>
<leftPen lineWidth="0.25"/>
<bottomPen lineWidth="0.25"/>
<rightPen lineWidth="0.25"/>
</box>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font isBold="true"/>
</textElement>
<text><![CDATA[TotalCharge]]></text>
</staticText>
Edit: Actually, you have the conditional value backwards. If you want to show the column when dataType is true, your printWhenExpression needs to look like:
<printWhenExpression><![CDATA[$P{dataType}]]></printWhenExpression>