I am using japer 3.7.6 in my project.Jasper works good locally in my computer.When the same project is hosted in linux server there appears this issue.For some reports jasper is working but in some reports it shows following error :
In Firefox :
In Chrome:
My jasper report code is like this:
<?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="shareDividentReport_np" pageWidth="595" pageHeight="842" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" isSummaryNewPage="true">
<property name="com.jaspersoft.studio.data.defaultdataadapter" value="One Empty Record"/>
<property name="com.jaspersoft.studio.report.description" value=""/>
<property name="ireport.zoom" value="1.652892561983471"/>
<property name="ireport.x" value="0"/>
<property name="ireport.y" value="0"/>
<parameter name="address" class="java.lang.String"/>
<parameter name="institutionName" class="java.lang.String"/>
<parameter name="scheme" class="java.lang.String"/>
<parameter name="trxnDate" class="java.lang.String"/>
<queryString>
<![CDATA[]]>
</queryString>
<field name="custName" class="java.lang.String">
<fieldDescription><![CDATA[custName]]></fieldDescription>
</field>
<field name="sNo" class="java.lang.Integer"/>
<field name="address" class="java.lang.String">
<fieldDescription><![CDATA[address]]></fieldDescription>
</field>
<field name="accNo" class="java.lang.String"/>
<field name="amount" class="java.math.BigDecimal"/>
<field name="remarks" class="java.lang.String"/>
<background>
<band splitType="Stretch"/>
</background>
<title>
<band height="61" splitType="Stretch">
<textField>
<reportElement x="337" y="19" width="215" height="20"/>
<textElement textAlignment="Right" verticalAlignment="Middle">
<font fontName="Arial"/>
</textElement>
<textFieldExpression class="java.lang.String"><![CDATA[$P{address}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="305" y="-1" width="247" height="20"/>
<textElement textAlignment="Right" verticalAlignment="Middle">
<font fontName="Arial" isBold="true"/>
</textElement>
<textFieldExpression class="java.lang.String"><![CDATA[$P{institutionName}]]></textFieldExpression>
</textField>
<staticText>
<reportElement x="3" y="2" width="142" height="22"/>
<textElement verticalAlignment="Middle">
<font fontName="Arial" isBold="true"/>
</textElement>
<text><![CDATA[Fund Distribution Report]]></text>
</staticText>
<staticText>
<reportElement x="400" y="41" width="81" height="14"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font fontName="Arial" size="8" isBold="true"/>
</textElement>
<text><![CDATA[Transaction Date :]]></text>
</staticText>
<staticText>
<reportElement x="3" y="41" width="73" height="14"/>
<textElement verticalAlignment="Middle">
<font fontName="Arial" size="8" isBold="true"/>
</textElement>
<text><![CDATA[Scheme Name :]]></text>
</staticText>
<textField>
<reportElement x="77" y="41" width="124" height="14"/>
<textElement verticalAlignment="Middle">
<font fontName="Arial" size="8"/>
</textElement>
<textFieldExpression class="java.lang.String"><![CDATA[$P{scheme}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="481" y="41" width="70" height="14"/>
<textElement verticalAlignment="Middle">
<font fontName="Arial" size="8"/>
</textElement>
<textFieldExpression class="java.lang.String"><![CDATA[$P{trxnDate}]]></textFieldExpression>
</textField>
</band>
</title>
<columnHeader>
<band height="17" splitType="Stretch">
<staticText>
<reportElement x="3" y="1" width="22" height="14"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font fontName="Arial" size="8"/>
</textElement>
<text><![CDATA[#]]></text>
</staticText>
<line>
<reportElement x="1" y="0" width="554" height="1"/>
<graphicElement>
<pen lineWidth="0.5"/>
</graphicElement>
</line>
<line>
<reportElement x="0" y="0" width="1" height="16"/>
<graphicElement>
<pen lineWidth="0.5"/>
</graphicElement>
</line>
<line>
<reportElement x="1" y="16" width="554" height="1"/>
<graphicElement>
<pen lineWidth="0.5"/>
</graphicElement>
</line>
<line>
<reportElement x="25" y="0" width="1" height="16"/>
<graphicElement>
<pen lineWidth="0.5"/>
</graphicElement>
</line>
<line>
<reportElement x="131" y="1" width="1" height="16"/>
</line>
<staticText>
<reportElement x="28" y="1" width="106" height="14"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font fontName="Arial" size="8"/>
</textElement>
<text><![CDATA[Name]]></text>
</staticText>
<line>
<reportElement x="201" y="1" width="1" height="16"/>
<graphicElement>
<pen lineWidth="0.5"/>
</graphicElement>
</line>
<staticText>
<reportElement x="204" y="1" width="58" height="14"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font fontName="Arial" size="8"/>
</textElement>
<text><![CDATA[Acc No]]></text>
</staticText>
<line>
<reportElement x="261" y="1" width="1" height="16"/>
</line>
<line>
<reportElement x="368" y="1" width="1" height="16"/>
</line>
<line>
<reportElement x="554" y="1" width="1" height="16"/>
</line>
<staticText>
<reportElement x="134" y="1" width="68" height="14"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font fontName="Arial" size="8"/>
</textElement>
<text><![CDATA[Address]]></text>
</staticText>
<staticText>
<reportElement x="262" y="0" width="107" height="17">
<property name="com.jaspersoft.studio.spreadsheet.connectionID" value="1e3ff973-33f4-46e2-8c61-70a570ebcd40"/>
</reportElement>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font fontName="Arial" size="8"/>
</textElement>
<text><![CDATA[Amount]]></text>
</staticText>
<staticText>
<reportElement x="370" y="0" width="184" height="17">
<property name="com.jaspersoft.studio.spreadsheet.connectionID" value="5f9168c6-3ec7-40d1-92ec-fd6608f42808"/>
</reportElement>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font fontName="Arial" size="8"/>
</textElement>
<text><![CDATA[Remarks]]></text>
</staticText>
</band>
</columnHeader>
<detail>
<band height="17" splitType="Stretch">
<line>
<reportElement x="0" y="-1" width="1" height="16" isPrintWhenDetailOverflows="true"/>
</line>
<line>
<reportElement positionType="Float" x="25" y="0" width="1" height="16" isPrintWhenDetailOverflows="true"/>
</line>
<line>
<reportElement positionType="Float" stretchType="RelativeToBandHeight" x="131" y="-1" width="1" height="16" isPrintWhenDetailOverflows="true"/>
</line>
<line>
<reportElement positionType="Float" stretchType="RelativeToBandHeight" x="201" y="0" width="1" height="16" isPrintWhenDetailOverflows="true"/>
</line>
<line>
<reportElement positionType="Float" stretchType="RelativeToBandHeight" x="261" y="0" width="1" height="16" isPrintWhenDetailOverflows="true"/>
</line>
<line>
<reportElement positionType="Float" stretchType="RelativeToBandHeight" x="368" y="0" width="1" height="16" isPrintWhenDetailOverflows="true"/>
</line>
<line>
<reportElement positionType="Float" stretchType="RelativeToBandHeight" x="554" y="-1" width="1" height="16" isPrintWhenDetailOverflows="true"/>
</line>
<line>
<reportElement x="0" y="15" width="554" height="1"/>
</line>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement positionType="Float" stretchType="RelativeToBandHeight" x="30" y="-1" width="100" height="16">
<property name="com.jaspersoft.studio.spreadsheet.connectionID" value="737f7de1-b4b4-49bd-8d44-4fa181039ac1"/>
</reportElement>
<textElement verticalAlignment="Middle">
<font fontName="Arial" size="8"/>
</textElement>
<textFieldExpression class="java.lang.String"><![CDATA[$F{custName}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement x="0" y="-1" width="25" height="16">
<property name="com.jaspersoft.studio.spreadsheet.connectionID" value="d6382c06-3ada-460a-9cd4-eb3c7a6404b9"/>
<printWhenExpression><![CDATA[$F{sNo}>0]]></printWhenExpression>
</reportElement>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font fontName="Arial" size="8"/>
</textElement>
<textFieldExpression class="java.lang.Integer"><![CDATA[$F{sNo}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement x="135" y="-1" width="66" height="16">
<property name="com.jaspersoft.studio.spreadsheet.connectionID" value="18069ac2-9301-4317-b20a-447a97937054"/>
</reportElement>
<textElement verticalAlignment="Middle">
<font fontName="Arial" size="8"/>
</textElement>
<textFieldExpression class="java.lang.String"><![CDATA[$F{address}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement x="202" y="-1" width="56" height="16">
<property name="com.jaspersoft.studio.spreadsheet.connectionID" value="fb1cc6a9-727b-4827-847a-48952b87e8ba"/>
</reportElement>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font fontName="Arial" size="8"/>
</textElement>
<textFieldExpression class="java.lang.String"><![CDATA[$F{accNo}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" pattern="#,##0.00" isBlankWhenNull="true">
<reportElement x="262" y="-1" width="101" height="16">
<property name="com.jaspersoft.studio.spreadsheet.connectionID" value="8a107053-079b-4a12-83ed-5ec9e16a7613"/>
</reportElement>
<textElement textAlignment="Right" verticalAlignment="Middle">
<font fontName="Arial" size="8"/>
</textElement>
<textFieldExpression class="java.math.BigDecimal"><![CDATA[$F{amount}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" pattern="#,##0.00" isBlankWhenNull="true">
<reportElement x="373" y="-1" width="181" height="16">
<property name="com.jaspersoft.studio.spreadsheet.connectionID" value="421fa618-29d6-4861-b625-ffa1e0b8d73a"/>
</reportElement>
<textElement verticalAlignment="Middle">
<font fontName="Arial" size="8"/>
</textElement>
<textFieldExpression class="java.lang.String"><![CDATA[$F{remarks}]]></textFieldExpression>
</textField>
</band>
</detail>
</jasperReport>
Similarly code to print is like this:
JasperPrint jasperPrint;
try {
jasperPrint = JasperFillManager.fillReport(reportPath, params,
new net.sf.jasperreports.engine.data.JRBeanCollectionDataSource(lstFundDistReport));
HttpServletResponse httpServletResponse = (HttpServletResponse) FacesContext.getCurrentInstance()
.getExternalContext().getResponse();
httpServletResponse.addHeader("Content-disposition", "inline; filename=FundDistReport.pdf");
ServletOutputStream servletOutputStream = httpServletResponse.getOutputStream();
JasperExportManager.exportReportToPdfStream(jasperPrint, servletOutputStream);
FacesContext.getCurrentInstance().responseComplete();
servletOutputStream.close();
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
I have used same code to print different reports in my application.I repeat in local computer every reports are working fine.But same application hosted in Linux server gives such unusual error. Some reports are exported to pdf but majorly this issue appears for others reports.
Related
im trying to use subreports in jaspersoft studio but in the preview the subreport area is always empty, i tried a lot of things but no one is a solution, what am I doing wrong ?
here is my code
<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="Blank_A4" pageWidth="595" pageHeight="842" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="4eb55d03-56c6-4337-9b1b-e2f10a2d06d4">
<property name="com.jaspersoft.studio.data.defaultdataadapter" value="New Data Adapter"/>
<style name="Style1" forecolor="#C2C2C2"/>
<parameter name="REPORT_ID" class="java.lang.Integer">
<defaultValueExpression><![CDATA[0]]></defaultValueExpression>
</parameter>
<parameter name="CREATED_AT" class="java.sql.Date"/>
<parameter name="AVERAGE_SELL_VALUE" class="java.lang.String"/>
<parameter name="MIN_SELL_VALUE" class="java.lang.String"/>
<parameter name="MAX_SELL_VALUE" class="java.lang.String"/>
<parameter name="AVERAGE_RETAKE_VALUE" class="java.lang.String"/>
<parameter name="MIN_RETAKE_VALUE" class="java.lang.String"/>
<parameter name="MAX_RETAKE_VALUE" class="java.lang.String"/>
<parameter name="BRAND" class="java.lang.String"/>
<parameter name="MODEL" class="java.lang.String"/>
<parameter name="YEAR" class="java.lang.String"/>
<parameter name="VERSION" class="java.lang.String"/>
<parameter name="KM" class="java.lang.String"/>
<parameter name="CYLINDER_CAPACITY" class="java.lang.String"/>
<parameter name="FUEL_TYPE" class="java.lang.String"/>
<parameter name="TRANSMISION" class="java.lang.String"/>
<parameter name="TRACTION" class="java.lang.String"/>
<parameter name="COLOR" class="java.lang.String"/>
<parameter name="PRICE_ADJUST" class="java.lang.String"/>
<parameter name="KM_ADJUST" class="java.lang.String"/>
<parameter name="AVERAGE_VALUE" class="java.lang.String"/>
<queryString language="JSON">
<![CDATA[report_url]]>
</queryString>
<background>
<band splitType="Stretch"/>
</background>
<pageHeader>
<band height="73" splitType="Stretch">
<textField>
<reportElement x="475" y="5" width="135" height="30" forecolor="#888888" uuid="e2639b23-eddb-4d9a-a25e-f0f153aa991b"/>
<textFieldExpression><![CDATA[$P{REPORT_ID}]]></textFieldExpression>
</textField>
<image>
<reportElement x="5" y="5" width="110" height="40" uuid="e2cc72cc-5ada-47c0-a442-74b0bdc14af6"/>
<imageExpression><![CDATA["/home/jaimo/Descargas/Group 1.svg"]]></imageExpression>
</image>
<line>
<reportElement x="125" y="23" width="1" height="15" forecolor="#888888" uuid="0bfa9970-6235-4cad-b1e3-16ca2899131c">
<property name="com.jaspersoft.studio.unit.x" value="px"/>
<property name="com.jaspersoft.studio.unit.width" value="px"/>
<property name="com.jaspersoft.studio.unit.height" value="px"/>
</reportElement>
</line>
<textField>
<reportElement x="475" y="20" width="101" height="30" forecolor="#888888" uuid="45a9e1de-56fa-49eb-95e2-85c2c1c06dc1">
<property name="com.jaspersoft.studio.unit.y" value="px"/>
</reportElement>
<textElement>
<font size="11"/>
</textElement>
<textFieldExpression><![CDATA[$P{CREATED_AT}]]></textFieldExpression>
</textField>
<staticText>
<reportElement x="135" y="15" width="178" height="30" forecolor="#888888" uuid="9ce24531-f175-4d0d-9759-e9535850818d"/>
<textElement verticalAlignment="Middle">
<font size="12"/>
</textElement>
<text><![CDATA[Informe de tasación]]></text>
</staticText>
<staticText>
<reportElement x="316" y="5" width="141" height="30" forecolor="#14344A" uuid="a6e2f389-858b-448a-844f-ed88681760fe"/>
<textElement textAlignment="Right">
<font size="12" isBold="true"/>
</textElement>
<text><![CDATA[Id Informe:]]></text>
</staticText>
<staticText>
<reportElement x="315" y="20" width="141" height="30" forecolor="#14344A" uuid="a62ca2cd-33e9-47d2-885f-b9fede598ff4">
<property name="com.jaspersoft.studio.unit.y" value="px"/>
</reportElement>
<textElement textAlignment="Right">
<font size="12" isBold="true"/>
</textElement>
<text><![CDATA[fecha de emisión:]]></text>
</staticText>
</band>
</pageHeader>
<columnHeader>
<band height="580">
<rectangle radius="10">
<reportElement x="5" y="55" width="260" height="340" forecolor="#5F6C75" uuid="a58c5d5c-b271-47e4-aa61-8c08a244322b"/>
</rectangle>
<rectangle radius="10">
<reportElement x="286" y="55" width="272" height="160" uuid="170a4d89-8ed9-491f-b862-1b9c708e651f"/>
</rectangle>
<rectangle radius="10">
<reportElement x="286" y="235" width="272" height="160" uuid="d1b5568e-f4be-4cfa-a8cc-6d761b69cbaf"/>
</rectangle>
<textField>
<reportElement x="308" y="125" width="149" height="40" forecolor="#373737" uuid="90c5e1eb-1aa2-49bd-a8f7-574d7a11d694"/>
<textElement verticalAlignment="Middle">
<font size="24" isBold="true"/>
</textElement>
<textFieldExpression><![CDATA["$" +$P{AVERAGE_SELL_VALUE}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="308" y="165" width="219" height="30" forecolor="#5F6C75" uuid="d9a02936-a161-4e50-81dd-bf1e84db717a">
<property name="com.jaspersoft.studio.unit.y" value="px"/>
</reportElement>
<textElement>
<font size="12"/>
</textElement>
<textFieldExpression><![CDATA["Rango: $" + $P{MIN_SELL_VALUE} + " / $" + $P{MAX_SELL_VALUE}]]></textFieldExpression>
</textField>
<staticText>
<reportElement x="25" y="65" width="100" height="30" forecolor="#373737" uuid="45ac0bb9-dfa0-43d0-a28f-0f08225492f6"/>
<textElement verticalAlignment="Middle">
<font size="12" isBold="true"/>
</textElement>
<text><![CDATA[Marca:]]></text>
</staticText>
<staticText>
<reportElement x="24" y="95" width="100" height="30" forecolor="#373737" uuid="0f81a7ce-35c7-4cf5-b46f-ce01e2e61cc7"/>
<textElement verticalAlignment="Middle">
<font size="12" isBold="true"/>
</textElement>
<text><![CDATA[Modelo:]]></text>
</staticText>
<staticText>
<reportElement x="24" y="125" width="100" height="30" forecolor="#373737" uuid="a84b857a-04af-492a-9140-7f734b4b341b"/>
<textElement verticalAlignment="Middle">
<font size="12" isBold="true"/>
</textElement>
<text><![CDATA[Año:]]></text>
</staticText>
<staticText>
<reportElement x="24" y="155" width="100" height="30" forecolor="#373737" uuid="1498a093-14cc-4dfd-9590-d805b492ed95"/>
<textElement verticalAlignment="Middle">
<font size="12" isBold="true"/>
</textElement>
<text><![CDATA[Versión:]]></text>
</staticText>
<staticText>
<reportElement x="24" y="185" width="100" height="30" forecolor="#373737" uuid="96a49dab-037c-44bf-8447-e1789ecc4c0a"/>
<textElement verticalAlignment="Middle">
<font size="12" isBold="true"/>
</textElement>
<text><![CDATA[KM:]]></text>
</staticText>
<staticText>
<reportElement x="24" y="215" width="100" height="30" forecolor="#373737" uuid="0e5d5220-2bcc-4c6a-9ab2-35e1b0599a2b"/>
<textElement verticalAlignment="Middle">
<font size="12" isBold="true"/>
</textElement>
<text><![CDATA[Cilindrada:]]></text>
</staticText>
<staticText>
<reportElement x="24" y="245" width="100" height="30" forecolor="#373737" uuid="33ac256b-af52-4f8b-ad65-10db6f634839"/>
<textElement verticalAlignment="Middle">
<font size="12" isBold="true"/>
</textElement>
<text><![CDATA[Combustible:]]></text>
</staticText>
<staticText>
<reportElement x="24" y="275" width="100" height="30" forecolor="#373737" uuid="a2ce1334-6202-4377-89dd-b1e0baae6260"/>
<textElement verticalAlignment="Middle">
<font size="12" isBold="true"/>
</textElement>
<text><![CDATA[Transmisión:]]></text>
</staticText>
<staticText>
<reportElement x="24" y="305" width="100" height="30" forecolor="#373737" uuid="b696d922-ba43-4567-869c-de9cb3c6c9a4"/>
<textElement verticalAlignment="Middle">
<font size="12" isBold="true"/>
</textElement>
<text><![CDATA[Tracción:]]></text>
</staticText>
<staticText>
<reportElement x="24" y="335" width="100" height="30" forecolor="#373737" uuid="a49c4cce-9f76-4360-ac4b-dcab33467bca"/>
<textElement verticalAlignment="Middle">
<font size="12" isBold="true"/>
</textElement>
<text><![CDATA[Color:]]></text>
</staticText>
<textField>
<reportElement x="124" y="66" width="130" height="30" forecolor="#5F6C75" uuid="eb22f28d-68cc-47ce-a208-8bcae9792fa9"/>
<textElement verticalAlignment="Middle">
<font size="12"/>
</textElement>
<textFieldExpression><![CDATA[$P{BRAND}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="124" y="95" width="130" height="30" forecolor="#5F6C75" uuid="b4480708-0492-49ee-8ff3-d5789b5dbaa8"/>
<textElement verticalAlignment="Middle">
<font size="12"/>
</textElement>
<textFieldExpression><![CDATA[$P{MODEL}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="124" y="125" width="130" height="30" forecolor="#5F6C75" uuid="cf88497c-1d1a-4ea2-8bdd-e6e2209c60b9"/>
<textElement verticalAlignment="Middle">
<font size="12"/>
</textElement>
<textFieldExpression><![CDATA[$P{YEAR}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="124" y="155" width="130" height="30" forecolor="#5F6C75" uuid="1a88da33-0b39-40de-a348-ca95b83a56c3"/>
<textElement verticalAlignment="Middle">
<font size="12"/>
</textElement>
<textFieldExpression><![CDATA[$P{VERSION}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="124" y="185" width="130" height="30" forecolor="#5F6C75" uuid="688eace4-c2fe-4259-88a9-7d7e1af8d04c"/>
<textElement verticalAlignment="Middle">
<font size="12"/>
</textElement>
<textFieldExpression><![CDATA[$P{KM} + "(*)"]]></textFieldExpression>
</textField>
<textField>
<reportElement x="125" y="215" width="129" height="30" forecolor="#5F6C75" uuid="7249875a-c675-4d38-b4aa-c20fd1d5eaaa"/>
<textElement verticalAlignment="Middle">
<font size="12"/>
</textElement>
<textFieldExpression><![CDATA[$P{CYLINDER_CAPACITY}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="124" y="245" width="130" height="30" forecolor="#5F6C75" uuid="33531f34-34c8-4f2b-92f3-f5ba68111cae"/>
<textElement verticalAlignment="Middle">
<font size="12"/>
</textElement>
<textFieldExpression><![CDATA[$P{FUEL_TYPE}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="124" y="275" width="130" height="30" forecolor="#5F6C75" uuid="36733743-1493-4817-bccc-89354c405821"/>
<textElement verticalAlignment="Middle">
<font size="12"/>
</textElement>
<textFieldExpression><![CDATA[$P{TRANSMISION}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="124" y="305" width="130" height="30" forecolor="#5F6C75" uuid="d484ecbc-e947-44e6-9a51-55f985f6663c"/>
<textElement verticalAlignment="Middle">
<font size="12"/>
</textElement>
<textFieldExpression><![CDATA[$P{TRACTION}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="124" y="335" width="130" height="30" forecolor="#5F6C75" uuid="80aa9276-a814-484a-8604-dc0a6057aab8"/>
<textElement verticalAlignment="Middle">
<font size="12"/>
</textElement>
<textFieldExpression><![CDATA[$P{COLOR}]]></textFieldExpression>
</textField>
<staticText>
<reportElement x="25" y="360" width="230" height="30" forecolor="#5F6C75" uuid="3e0ddb85-12f4-4398-b318-eb6aedf1cc7f">
<property name="com.jaspersoft.studio.unit.y" value="px"/>
</reportElement>
<textElement verticalAlignment="Middle">
<font size="12"/>
</textElement>
<text><![CDATA[(*) Promedio de km según antigüedad del vehiculo]]></text>
</staticText>
<staticText>
<reportElement x="305" y="245" width="240" height="20" forecolor="#14344A" uuid="fbddbb33-251d-4cbb-94c3-e324504b44a5"/>
<textElement verticalAlignment="Middle">
<font size="11" isBold="true"/>
</textElement>
<text><![CDATA[Valor en recepción en parte de pago]]></text>
</staticText>
<staticText>
<reportElement x="305" y="265" width="240" height="40" forecolor="#888888" uuid="775a79e7-7d53-44d4-a885-d66f25181fa0"/>
<textElement verticalAlignment="Middle"/>
<text><![CDATA[Precio promedio, máximo y mínimo al entregar el vehículo como parte de pago de otro vehículo.]]></text>
</staticText>
<staticText>
<reportElement x="308" y="65" width="237" height="30" forecolor="#14344A" uuid="efdf8857-7032-482d-8c46-bd2768ae1120"/>
<textElement verticalAlignment="Middle">
<font size="11" isBold="true"/>
</textElement>
<text><![CDATA[Valor estimado de venta]]></text>
</staticText>
<textField>
<reportElement x="305" y="305" width="222" height="40" forecolor="#373737" uuid="da02e43b-7bea-42ca-9885-739414847863"/>
<textElement verticalAlignment="Middle">
<font size="24" isBold="true"/>
</textElement>
<textFieldExpression><![CDATA["$" +$P{AVERAGE_RETAKE_VALUE}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="305" y="345" width="219" height="30" forecolor="#5F6C75" uuid="07c566a7-bd8c-46d2-b1b8-6ad1839ddfa7">
<property name="com.jaspersoft.studio.unit.y" value="px"/>
</reportElement>
<textElement>
<font size="12"/>
</textElement>
<textFieldExpression><![CDATA["Rango: $" + $P{MIN_RETAKE_VALUE} + " / $" + $P{MAX_RETAKE_VALUE}]]></textFieldExpression>
</textField>
<staticText>
<reportElement x="306" y="85" width="240" height="40" forecolor="#888888" uuid="4b05c58f-9941-4649-9b0d-98facaae4260"/>
<textElement textAlignment="Left" verticalAlignment="Middle"/>
<text><![CDATA[Precio promedio, máximo y mínimo de venta del vehículo.]]></text>
</staticText>
<image>
<reportElement x="15" y="10" width="30" height="30" uuid="f82c5f90-dada-4f88-a2c2-849bbc925556"/>
<imageExpression><![CDATA["/home/jaimo/Descargas/jasper_icons/single_car_icon.svg"]]></imageExpression>
</image>
<staticText>
<reportElement x="56" y="5" width="199" height="40" forecolor="#14344A" uuid="87f30195-0739-4c08-a782-6cf92a464de7"/>
<textElement verticalAlignment="Middle">
<font size="18"/>
</textElement>
<text><![CDATA[Datos del vehículo]]></text>
</staticText>
<subreport>
<reportElement x="0" y="430" width="558" height="120" uuid="7b860fe8-8737-46c2-8fc5-9747720f3abd"/>
<connectionExpression><![CDATA[$P{REPORT_CONNECTION}]]></connectionExpression>
<subreportExpression><![CDATA["subreport.jasper"]]></subreportExpression>
</subreport>
</band>
</columnHeader>
<pageFooter>
<band height="121" splitType="Stretch">
<image>
<reportElement x="-20" y="0" width="450" height="121" uuid="618a75d4-e981-47c5-b316-266e3b91666c"/>
<imageExpression><![CDATA["/home/jaimo/Descargas/miscelaneas.svg"]]></imageExpression>
</image>
<textField>
<reportElement x="470" y="45" width="100" height="30" uuid="b9eeb12e-542b-4da0-a6ce-64e071382a81"/>
<textFieldExpression><![CDATA[$V{PAGE_NUMBER}]]></textFieldExpression>
</textField>
</band>
</pageFooter>
</jasperReport>
and here is subreport expression
<subreport>
<reportElement x="0" y="430" width="558" height="120" uuid="7b860fe8-8737-46c2-8fc5-9747720f3abd"/>
<connectionExpression><![CDATA[$P{REPORT_CONNECTION}]]></connectionExpression>
<subreportExpression><![CDATA["subreport.jasper"]]></subreportExpression>
</subreport>
Here are some screen shots to demonstrate the problem:
First, here is the design with no list element:
And here is the result of that report (note that there are two pages):
Now if I add the list element, here is the design:
Here is the jrxml for the summary band:
<summary>
<band height="554">
<printWhenExpression><![CDATA[!$F{drawingRevision}.getPartsList().isEmpty() || !$F{drawingRevision}.getProcesses().isEmpty() || !$F{drawingRevision}.getParameters().isEmpty()]]></printWhenExpression>
<staticText>
<reportElement positionType="Float" x="80" y="30" width="100" height="20" uuid="3210d220-35e0-4984-a00d-be4ad58feca4"/>
<text><![CDATA[Static Text]]></text>
</staticText>
<rectangle radius="5">
<reportElement x="0" y="0" width="284" height="16" backcolor="#E1E3FC" uuid="88870baf-afe8-4c0a-9b5f-fe88eb0f4dd3"/>
<graphicElement>
<pen lineWidth="0.0"/>
</graphicElement>
</rectangle>
<staticText>
<reportElement x="5" y="0" width="113" height="16" uuid="9231dea5-26f2-40a8-8b45-2ce560e0f2ba"/>
<textElement>
<font size="12"/>
</textElement>
<text><![CDATA[Design Parameters]]></text>
</staticText>
<componentElement>
<reportElement x="0" y="16" width="284" height="13" uuid="12a8a577-6c77-4849-84c6-362544413192">
<property name="net.sf.jasperreports.export.headertoolbar.table.name" value="Parameters"/>
</reportElement>
<jr:list xmlns:jr="http://jasperreports.sourceforge.net/jasperreports/components" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports/components http://jasperreports.sourceforge.net/xsd/components.xsd" printOrder="Vertical">
<datasetRun subDataset="DrawingRevisionParameters" uuid="5ff517f3-e25b-4ed5-8589-33076f52c2c2">
<dataSourceExpression><![CDATA[new net.sf.jasperreports.engine.data.JRBeanCollectionDataSource($F{drawingRevision}.getParameters())]]></dataSourceExpression>
</datasetRun>
<jr:listContents height="13" width="284">
<textField pattern="#,##0.####">
<reportElement x="0" y="0" width="50" height="12" uuid="9239498a-9b30-495f-a571-b505fceba75a"/>
<textElement textAlignment="Right">
<font size="9"/>
</textElement>
<textFieldExpression><![CDATA[$F{parameter}.getParameterValue()]]></textFieldExpression>
</textField>
<textField>
<reportElement x="54" y="0" width="72" height="12" uuid="f2c8d327-e8b4-4f5b-af0c-dad19c0fc4bb"/>
<textElement>
<font size="9"/>
</textElement>
<textFieldExpression><![CDATA[$F{parameter}.getParameterUnit().getUnitAbbr()]]></textFieldExpression>
</textField>
<textField>
<reportElement x="132" y="0" width="150" height="12" uuid="0e48fb28-af4b-4fac-8069-63bc1f880d80"/>
<textElement markup="rtf">
<font size="9"/>
</textElement>
<textFieldExpression><![CDATA[$F{parameter}.getSpecification().getSpecificationName()]]></textFieldExpression>
</textField>
</jr:listContents>
</jr:list>
</componentElement>
</band>
</summary>
And finally here is the result of that report.
Note that the floating "Static Text" label moved down appropriately, but not nearly enough to add an extra page to the report. However, you'll see that there are now 3 pages to the report anyway.
The only thing that changed was adding the list element. How can I make it so that it doesn't add the extra page? Or what am I not understanding with regard to lists? I could probably also pass the data into a sub-report so that the data is presented in the detail band of the sub-report, but I would much prefer to use a list if I could, since it seems much simpler to me. I am using version 6.6.0. Thanks!
Here is the full jrxml as requested (uuids removed to save on characters):
<?xml version="1.0" encoding="UTF-8"?>
<!-- Created with Jaspersoft Studio version 6.6.0.final using JasperReports Library version 6.6.0 -->
<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="Drawing" pageWidth="792" pageHeight="612" orientation="Landscape" columnWidth="752" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" isSummaryWithPageHeaderAndFooter="true" whenResourceMissingType="Error">
<property name="com.jaspersoft.studio.data.defaultdataadapter" value="One Empty Record"/>
<property name="com.jaspersoft.studio.unit." value="pixel"/>
<property name="com.jaspersoft.studio.unit.pageHeight" value="pixel"/>
<property name="com.jaspersoft.studio.unit.pageWidth" value="pixel"/>
<property name="com.jaspersoft.studio.unit.topMargin" value="pixel"/>
<property name="com.jaspersoft.studio.unit.bottomMargin" value="pixel"/>
<property name="com.jaspersoft.studio.unit.leftMargin" value="pixel"/>
<property name="com.jaspersoft.studio.unit.rightMargin" value="pixel"/>
<property name="com.jaspersoft.studio.unit.columnWidth" value="pixel"/>
<property name="com.jaspersoft.studio.unit.columnSpacing" value="pixel"/>
<subDataset name="DrawingRevisionNotes">
<queryString>
<![CDATA[]]>
</queryString>
<field name="orderNum" class="java.lang.Integer">
<fieldDescription><![CDATA[orderNum]]></fieldDescription>
</field>
<field name="drawingNote" class="com.engineering.domain.drawings.DrawingNote">
<fieldDescription><![CDATA[drawingNote]]></fieldDescription>
</field>
</subDataset>
<subDataset name="DrawingApprovals">
<property name="com.jaspersoft.studio.data.defaultdataadapter" value="One Empty Record"/>
<queryString>
<![CDATA[]]>
</queryString>
<field name="revisionID" class="java.lang.String">
<fieldDescription><![CDATA[revisionID]]></fieldDescription>
</field>
<field name="drafter" class="java.lang.String">
<fieldDescription><![CDATA[drafter]]></fieldDescription>
</field>
<field name="approver" class="java.lang.String">
<fieldDescription><![CDATA[approver]]></fieldDescription>
</field>
<field name="approvalDate" class="java.lang.String">
<fieldDescription><![CDATA[approvalDate]]></fieldDescription>
</field>
</subDataset>
<subDataset name="DrawingRevisionParameters">
<queryString>
<![CDATA[]]>
</queryString>
<field name="drawingParameterID" class="java.lang.Integer">
<fieldDescription><![CDATA[drawingParameterID]]></fieldDescription>
</field>
<field name="parameter" class="com.engineering.domain.drawings.DrawingParameter">
<fieldDescription><![CDATA[parameter]]></fieldDescription>
</field>
<field name="orderNum" class="java.lang.Integer">
<fieldDescription><![CDATA[orderNum]]></fieldDescription>
</field>
</subDataset>
<parameter name="SUBREPORT_DIR" class="java.lang.String" isForPrompting="false">
<defaultValueExpression><![CDATA["static/"]]></defaultValueExpression>
</parameter>
<queryString>
<![CDATA[]]>
</queryString>
<field name="draftCount" class="java.lang.Integer">
<fieldDescription><![CDATA[draftCount]]></fieldDescription>
</field>
<field name="releaseType" class="com.engineering.domain.drawings.DrawingReleaseType">
<fieldDescription><![CDATA[releaseType]]></fieldDescription>
</field>
<field name="releaser" class="com.humanresources.domain.Employee">
<fieldDescription><![CDATA[releaser]]></fieldDescription>
</field>
<field name="releaseTimeStamp" class="java.time.LocalDateTime">
<fieldDescription><![CDATA[releaseTimeStamp]]></fieldDescription>
</field>
<field name="company" class="com.companies.domain.Company">
<fieldDescription><![CDATA[company]]></fieldDescription>
</field>
<field name="unitSystem" class="com.utilities.domain.units.UnitSystem">
<fieldDescription><![CDATA[unitSystem]]></fieldDescription>
</field>
<field name="drawingReleaseID" class="java.lang.Integer">
<fieldDescription><![CDATA[drawingReleaseID]]></fieldDescription>
</field>
<field name="fullDescription" class="java.lang.Boolean">
<fieldDescription><![CDATA[fullDescription]]></fieldDescription>
</field>
<field name="drawingRevision" class="com.engineering.domain.drawings.DrawingRevision">
<fieldDescription><![CDATA[drawingRevision]]></fieldDescription>
</field>
<background>
<band height="554" splitType="Stretch">
<rectangle radius="5">
<reportElement mode="Transparent" x="0" y="0" width="752" height="553"/>
</rectangle>
<frame>
<reportElement x="485" y="443" width="267" height="110">
<property name="ShowOutOfBoundContent" value="false"/>
</reportElement>
<rectangle radius="5">
<reportElement mode="Transparent" x="0" y="0" width="267" height="110"/>
<graphicElement>
<pen lineWidth="1.0"/>
</graphicElement>
</rectangle>
<subreport>
<reportElement x="0" y="0" width="180" height="34"/>
<subreportExpression><![CDATA[$P{SUBREPORT_DIR}+"HeaderSmall.jasper"]]></subreportExpression>
</subreport>
<line>
<reportElement x="0" y="35" width="180" height="1"/>
<graphicElement>
<pen lineWidth="0.5"/>
</graphicElement>
</line>
<staticText>
<reportElement x="39" y="36" width="21" height="7"/>
<textElement>
<font size="5"/>
</textElement>
<text><![CDATA[Title]]></text>
</staticText>
<textField>
<reportElement x="44" y="40" width="136" height="47"/>
<textElement verticalAlignment="Middle">
<font isBold="true"/>
</textElement>
<textFieldExpression><![CDATA[$F{drawingRevision}.getTitle()]]></textFieldExpression>
</textField>
<staticText>
<reportElement x="39" y="90" width="21" height="7"/>
<textElement>
<font size="5"/>
</textElement>
<text><![CDATA[Drawing]]></text>
</staticText>
<textField>
<reportElement x="44" y="94" width="136" height="16"/>
<textElement textAlignment="Center">
<font size="12" isBold="true"/>
</textElement>
<textFieldExpression><![CDATA[String.format("%06d",$F{drawingRevision}.getDrawing().getDrawingID())+" Rev "+$F{drawingRevision}.getRevision().getRevisionID()]]></textFieldExpression>
</textField>
<line>
<reportElement x="38" y="36" width="1" height="74"/>
<graphicElement>
<pen lineWidth="0.5"/>
</graphicElement>
</line>
<line>
<reportElement x="180" y="0" width="1" height="110"/>
<graphicElement>
<pen lineWidth="0.5"/>
</graphicElement>
</line>
<line>
<reportElement x="39" y="89" width="141" height="1"/>
<graphicElement>
<pen lineWidth="0.5"/>
</graphicElement>
</line>
<frame>
<reportElement x="0" y="36" width="37" height="74"/>
<staticText>
<reportElement x="2" y="2" width="33" height="7"/>
<textElement textAlignment="Center">
<font size="5" isItalic="true" isUnderline="true"/>
</textElement>
<text><![CDATA[Tolerances]]></text>
</staticText>
<textField>
<reportElement x="2" y="9" width="33" height="20"/>
<textElement textAlignment="Center">
<font size="5" isItalic="true"/>
</textElement>
<textFieldExpression><![CDATA[$F{unitSystem}.getUnitTolerance().getUnit().getUnitNamePlural()+"\nUnless\nNoted"]]></textFieldExpression>
</textField>
<textField>
<reportElement x="2" y="29" width="33" height="33"/>
<textElement textAlignment="Center">
<font size="5" isItalic="true"/>
</textElement>
<textFieldExpression><![CDATA[($F{unitSystem}.getUnitTolerance().getTolerance3Place()!=null ? "X.XXX ±"+$F{unitSystem}.getUnitTolerance().getTolerance3Place()+"\n" : "")+
($F{unitSystem}.getUnitTolerance().getTolerance2Place()!=null ? "X.XX ±"+$F{unitSystem}.getUnitTolerance().getTolerance2Place()+"\n" : "")+
($F{unitSystem}.getUnitTolerance().getTolerance1Place()!=null ? "X.X ±"+$F{unitSystem}.getUnitTolerance().getTolerance1Place()+"\n" : "")+
($F{unitSystem}.getUnitTolerance().getFractional()!=null ? "Frac. ±"+$F{unitSystem}.getUnitTolerance().getFractional()+"\n" : "")+
"Ang. ±30'"]]></textFieldExpression>
</textField>
</frame>
<frame>
<reportElement x="180" y="0" width="87" height="109"/>
<componentElement>
<reportElement x="3" y="14" width="81" height="9">
<property name="net.sf.jasperreports.export.headertoolbar.table.name" value="Approvals"/>
<printWhenExpression><![CDATA[$F{drawingRevision}.getRevision().getRevisionType().getRevisionTypeID()==1]]></printWhenExpression>
</reportElement>
<jr:list xmlns:jr="http://jasperreports.sourceforge.net/jasperreports/components" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports/components http://jasperreports.sourceforge.net/xsd/components.xsd" printOrder="Vertical">
<datasetRun subDataset="DrawingApprovals">
<dataSourceExpression><![CDATA[new net.sf.jasperreports.engine.data.JRBeanCollectionDataSource($F{drawingRevision}.getApprovals())]]></dataSourceExpression>
</datasetRun>
<jr:listContents height="9" width="81">
<textField>
<reportElement x="0" y="0" width="17" height="9"/>
<textElement textAlignment="Center">
<font size="7"/>
</textElement>
<textFieldExpression><![CDATA[$F{revisionID}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="17" y="0" width="17" height="9"/>
<textElement textAlignment="Center">
<font size="7"/>
</textElement>
<textFieldExpression><![CDATA[$F{drafter}]]></textFieldExpression>
</textField>
<textField isBlankWhenNull="true">
<reportElement x="34" y="0" width="17" height="9"/>
<textElement textAlignment="Center">
<font size="7"/>
</textElement>
<textFieldExpression><![CDATA[$F{approver}]]></textFieldExpression>
</textField>
<textField isBlankWhenNull="true">
<reportElement x="51" y="0" width="30" height="9"/>
<textElement textAlignment="Center">
<font size="7"/>
</textElement>
<textFieldExpression><![CDATA[$F{approvalDate}]]></textFieldExpression>
</textField>
</jr:listContents>
</jr:list>
</componentElement>
<staticText>
<reportElement x="3" y="3" width="17" height="11">
<printWhenExpression><![CDATA[$F{drawingRevision}.getRevision().getRevisionType().getRevisionTypeID()==1]]></printWhenExpression>
</reportElement>
<textElement>
<font size="8"/>
</textElement>
<text><![CDATA[REV]]></text>
</staticText>
<staticText>
<reportElement x="20" y="3" width="17" height="11">
<printWhenExpression><![CDATA[$F{drawingRevision}.getRevision().getRevisionType().getRevisionTypeID()==1]]></printWhenExpression>
</reportElement>
<textElement textAlignment="Center">
<font size="8"/>
</textElement>
<text><![CDATA[BY]]></text>
</staticText>
<staticText>
<reportElement x="37" y="3" width="17" height="11">
<printWhenExpression><![CDATA[$F{drawingRevision}.getRevision().getRevisionType().getRevisionTypeID()==1]]></printWhenExpression>
</reportElement>
<textElement textAlignment="Center">
<font size="8"/>
</textElement>
<text><![CDATA[APV]]></text>
</staticText>
<staticText>
<reportElement x="54" y="3" width="30" height="11">
<printWhenExpression><![CDATA[$F{drawingRevision}.getRevision().getRevisionType().getRevisionTypeID()==1]]></printWhenExpression>
</reportElement>
<textElement textAlignment="Center">
<font size="8"/>
</textElement>
<text><![CDATA[DATE]]></text>
</staticText>
<textField isStretchWithOverflow="true">
<reportElement x="3" y="14" width="81" height="0">
<printWhenExpression><![CDATA[$F{drawingRevision}.getRevision().getRevisionType().getRevisionTypeID()!=1]]></printWhenExpression>
</reportElement>
<textFieldExpression><![CDATA["PRELIMINARY REVISION "+$F{drawingRevision}.getRevision().getRevisionID()]]></textFieldExpression>
</textField>
<line>
<reportElement positionType="Float" x="3" y="17" width="82" height="1">
<printWhenExpression><![CDATA[$F{drawingRevision}.getRevision().getRevisionType().getRevisionTypeID()!=1]]></printWhenExpression>
</reportElement>
<graphicElement>
<pen lineWidth="0.5"/>
</graphicElement>
</line>
<textField isStretchWithOverflow="true">
<reportElement positionType="Float" x="3" y="20" width="82" height="0">
<printWhenExpression><![CDATA[$F{drawingRevision}.getRevision().getRevisionType().getRevisionTypeID()!=1]]></printWhenExpression>
</reportElement>
<textElement>
<font size="7"/>
</textElement>
<textFieldExpression><![CDATA["REV BY APV DATE\n - "+$F{drawingRevision}.getDrafter().getInitials()]]></textFieldExpression>
</textField>
</frame>
</frame>
</band>
</background>
<detail>
<band height="554" splitType="Stretch">
<image scaleImage="RetainShape">
<reportElement x="5" y="5" width="742" height="548"/>
<imageExpression><![CDATA["\\\\SERVER\\Data\\Design Files\\Drawings\\ERP Draft Images\\"+String.format("%05d",$F{drawingRevision}.getDrawing().getDrawingID())+$F{drawingRevision}.getRevision().getRevisionID()+($F{draftCount}>1 ? "p"+$F{draftCount} : "")+".jpg"]]></imageExpression>
</image>
<componentElement>
<reportElement x="4" y="420" width="400" height="30">
<property name="net.sf.jasperreports.export.headertoolbar.table.name" value="Notes"/>
</reportElement>
<jr:list xmlns:jr="http://jasperreports.sourceforge.net/jasperreports/components" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports/components http://jasperreports.sourceforge.net/xsd/components.xsd" printOrder="Vertical">
<datasetRun subDataset="DrawingRevisionNotes">
<dataSourceExpression><![CDATA[new net.sf.jasperreports.engine.data.JRBeanCollectionDataSource($F{drawingRevision}.getNotes())]]></dataSourceExpression>
</datasetRun>
<jr:listContents height="30" width="400">
<staticText>
<reportElement x="0" y="0" width="48" height="14"/>
<text><![CDATA[NOTES]]></text>
</staticText>
<textField>
<reportElement x="0" y="14" width="15" height="14"/>
<textFieldExpression><![CDATA[$F{orderNum}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true">
<reportElement x="16" y="14" width="384" height="14"/>
<textFieldExpression><![CDATA[$F{drawingNote}.getNoteText()]]></textFieldExpression>
</textField>
</jr:listContents>
</jr:list>
</componentElement>
<frame>
<reportElement x="485" y="405" width="267" height="38">
<printWhenExpression><![CDATA[$F{drawingRevision}.getMaterial()!=null]]></printWhenExpression>
</reportElement>
<rectangle radius="5">
<reportElement x="0" y="0" width="267" height="38"/>
</rectangle>
<staticText>
<reportElement x="4" y="0" width="100" height="13"/>
<text><![CDATA[Material]]></text>
</staticText>
<line>
<reportElement x="4" y="12" width="259" height="1"/>
</line>
<staticText>
<reportElement x="138" y="0" width="61" height="13"/>
<text><![CDATA[Coating]]></text>
</staticText>
<staticText>
<reportElement x="199" y="0" width="64" height="13"/>
<text><![CDATA[Notes]]></text>
</staticText>
<textField>
<reportElement x="4" y="13" width="134" height="24"/>
<textElement>
<font size="8"/>
</textElement>
<textFieldExpression><![CDATA[$F{drawingRevision}.getMaterial().getMaterialRaw().getShortDescriptionNoCondition() + ( $F{drawingRevision}.getMaterial().getMaterialRaw().getMaterialCondition() == null || $F{drawingRevision}.getMaterial().getMaterialRaw().getMaterialCondition().getConditionDescription() == null || $F{drawingRevision}.getMaterial().getMaterialRaw().getMaterialCondition().getConditionDescription().trim() == "" ? "" : ", "+$F{drawingRevision}.getMaterial().getMaterialRaw().getMaterialCondition().getConditionDescription() )]]></textFieldExpression>
</textField>
<textField isBlankWhenNull="true">
<reportElement x="138" y="13" width="61" height="24"/>
<textElement>
<font size="8"/>
</textElement>
<textFieldExpression><![CDATA[$F{drawingRevision}.getMaterial().getMaterialCoating()==null ? "" : $F{drawingRevision}.getMaterial().getMaterialCoating().getCoatingDescription()]]></textFieldExpression>
</textField>
<textField isBlankWhenNull="true">
<reportElement x="199" y="13" width="64" height="24"/>
<textElement>
<font size="6"/>
</textElement>
<textFieldExpression><![CDATA[$F{drawingRevision}.getMaterial().getMaterialNotes()]]></textFieldExpression>
</textField>
</frame>
</band>
</detail>
<pageFooter>
<band height="12" splitType="Stretch">
<textField isStretchWithOverflow="true">
<reportElement x="0" y="0" width="418" height="12"/>
<textElement>
<font size="7"/>
</textElement>
<textFieldExpression><![CDATA[$F{releaseTimeStamp}+" Release ID: "+$F{drawingReleaseID}+" "+$F{company}.getCompanyName()]]></textFieldExpression>
</textField>
<staticText>
<reportElement x="430" y="0" width="257" height="12"/>
<textElement>
<font size="8"/>
</textElement>
<text><![CDATA[This proprietary drawing shall not be shared without written permission.]]></text>
</staticText>
<textField>
<reportElement x="687" y="0" width="50" height="12"/>
<textElement textAlignment="Right">
<font size="7"/>
</textElement>
<textFieldExpression><![CDATA["Page "+$V{PAGE_NUMBER}+" of"]]></textFieldExpression>
</textField>
<textField evaluationTime="Report">
<reportElement x="737" y="0" width="15" height="12"/>
<textElement>
<font size="7"/>
</textElement>
<textFieldExpression><![CDATA[" " + $V{PAGE_NUMBER}]]></textFieldExpression>
</textField>
</band>
</pageFooter>
<summary>
<band height="554">
<printWhenExpression><![CDATA[!$F{drawingRevision}.getPartsList().isEmpty() || !$F{drawingRevision}.getProcesses().isEmpty() || !$F{drawingRevision}.getParameters().isEmpty()]]></printWhenExpression>
<frame>
<reportElement x="467" y="1" width="284" height="318">
<printWhenExpression><![CDATA[!$F{drawingRevision}.getParameters().isEmpty()]]></printWhenExpression>
</reportElement>
<box>
<pen lineWidth="0.25"/>
</box>
<rectangle radius="5">
<reportElement x="0" y="0" width="284" height="16" backcolor="#E1E3FC"/>
<graphicElement>
<pen lineWidth="0.0"/>
</graphicElement>
</rectangle>
<staticText>
<reportElement x="5" y="0" width="113" height="16"/>
<textElement>
<font size="12"/>
</textElement>
<text><![CDATA[Design Parameters]]></text>
</staticText>
<componentElement>
<reportElement x="0" y="16" width="284" height="13">
<property name="net.sf.jasperreports.export.headertoolbar.table.name" value="Parameters"/>
</reportElement>
<jr:list xmlns:jr="http://jasperreports.sourceforge.net/jasperreports/components" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports/components http://jasperreports.sourceforge.net/xsd/components.xsd" printOrder="Vertical">
<datasetRun subDataset="DrawingRevisionParameters">
<dataSourceExpression><![CDATA[new net.sf.jasperreports.engine.data.JRBeanCollectionDataSource($F{drawingRevision}.getParameters())]]></dataSourceExpression>
</datasetRun>
<jr:listContents height="13" width="284">
<textField pattern="#,##0.####">
<reportElement x="0" y="0" width="50" height="12"/>
<textElement textAlignment="Right">
<font size="9"/>
</textElement>
<textFieldExpression><![CDATA[$F{parameter}.getParameterValue()]]></textFieldExpression>
</textField>
<textField>
<reportElement x="54" y="0" width="72" height="12"/>
<textElement>
<font size="9"/>
</textElement>
<textFieldExpression><![CDATA[$F{parameter}.getParameterUnit().getUnitAbbr()]]></textFieldExpression>
</textField>
<textField>
<reportElement x="132" y="0" width="150" height="12"/>
<textElement markup="rtf">
<font size="9"/>
</textElement>
<textFieldExpression><![CDATA[$F{parameter}.getSpecification().getSpecificationName()]]></textFieldExpression>
</textField>
</jr:listContents>
</jr:list>
</componentElement>
</frame>
<staticText>
<reportElement positionType="Float" x="560" y="319" width="100" height="30"/>
<text><![CDATA[Static Text]]></text>
</staticText>
</band>
</summary>
</jasperReport>
I've encountered this before and the fixes I did was.
Check the size of the detail band and make sure that the list of values generated can all fit into the same page. Reduce the size of the detail band to see the difference.
Another is hide bands that are not in use or empty. For example try hiding the Summary band by setting it's Print When Expression to Boolean.FALSE.
You can also go to Report Properties > Check off Ignore Pagination Property
The objective of my study is to print a table that I have on SQL Server, the data connecting is done, the interface and the printing are done too.
The problem occurs when I print the PDf of the report because I want to print a number of rows per page but it only prints me one row of the table per page, so if my table has 205 rows, it prints 205 pages, haha, kinda weird.
This is my first time using JasperReports. Here is my jrxml file.
<?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="listadoCensosDiarios" language="groovy" printOrder="Horizontal" pageWidth="2400" pageHeight="1000" orientation="Landscape" columnWidth="2360" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="d8233986-9ca6-4eb9-852a-0c0bf896d505">
<parameter name="ruta" class="java.lang.String"/>
<field name="CodigoCama" class="java.lang.String"/>
<field name="Documento" class="java.lang.String"/>
<field name="Nombre" class="java.lang.String"/>
<field name="Edad" class="java.lang.String"/>
<field name="Empresa" class="java.lang.String"/>
<field name="Especialista" class="java.lang.String"/>
<field name="Diagnostico" class="java.lang.String"/>
<field name="FechaIngreso" class="java.lang.String"/>
<field name="Dias" class="java.lang.String"/>
<field name="Dieta" class="java.lang.String"/>
<field name="Observaciones" class="java.lang.String"/>
<field name="Registrado" class="java.lang.String"/>
<field name="FechaRegistro" class="java.lang.String"/>
<variable name="totalPaginas" class="java.lang.Integer" resetType="Page" incrementType="Report" calculation="Count"/>
<title>
<band height="58" splitType="Stretch">
<rectangle>
<reportElement uuid="df0fa9dd-b7f1-4800-b1bf-f40de1bc7263" x="64" y="1" width="1801" height="50" backcolor="#E0E0E0"/>
</rectangle>
<staticText>
<reportElement uuid="f773ff3c-e683-41f4-8f16-7d8c66d54562" mode="Opaque" x="64" y="2" width="1801" height="48" backcolor="#E0E0E0"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="20" isBold="true"/>
</textElement>
<text><![CDATA[CENSO DIARIO]]></text>
</staticText>
<rectangle>
<reportElement uuid="07b7d0a3-0b20-4649-a1b2-0045ca40372e" x="1" y="1" width="63" height="50" backcolor="#E0E0E0"/>
</rectangle>
<rectangle>
<reportElement uuid="e076ba71-8906-4238-a19d-f75077425de6" x="1865" y="1" width="134" height="50" backcolor="#E2DEDE"/>
</rectangle>
<image hAlign="Center" vAlign="Middle">
<reportElement uuid="e0c8b5d2-3f68-4895-adea-e98d58a2ea3e" x="1" y="2" width="63" height="47"/>
<imageExpression><![CDATA[$P{ruta}+"//img//LOGO1.png"]]></imageExpression>
</image>
<image hAlign="Center" vAlign="Middle">
<reportElement uuid="ce929fc5-57d6-4e20-b30c-9893f34edf61" x="1901" y="3" width="58" height="46"/>
<imageExpression><![CDATA[$P{ruta}+"//img//100calidad.jpg"]]></imageExpression>
</image>
</band>
</title>
<pageHeader>
<band height="24" splitType="Stretch">
<rectangle>
<reportElement uuid="b28a6cd6-7bb8-4332-a443-795537750291" x="0" y="8" width="1629" height="16" backcolor="#D3ECC7"/>
</rectangle>
<rectangle>
<reportElement uuid="da28e036-684a-4921-a42a-4afab1ff613a" x="1629" y="8" width="370" height="16" backcolor="#D3ECC7"/>
</rectangle>
<staticText>
<reportElement uuid="4ec9e82c-884b-49ea-9d84-41ef79374f2d" mode="Opaque" x="1632" y="10" width="360" height="14" backcolor="#D3ECC7"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="11" isBold="true"/>
</textElement>
<text><![CDATA[Información del Empleado]]></text>
</staticText>
</band>
</pageHeader>
<columnHeader>
<band height="23" splitType="Stretch">
<rectangle>
<reportElement uuid="0ed0631b-b8b3-4544-984a-6a8b152405a4" x="145" y="1" width="169" height="22" backcolor="#E0E0E0"/>
</rectangle>
<rectangle>
<reportElement uuid="5d9afa11-5f66-4c24-a689-790b6bbbfee8" x="0" y="1" width="52" height="22" backcolor="#E0E0E0"/>
</rectangle>
<staticText>
<reportElement uuid="d3cbfe71-89c2-40f4-83be-c388d60d1f57" mode="Transparent" x="10" y="0" width="39" height="22" backcolor="#E0E0E0"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="9" isBold="true"/>
</textElement>
<text><![CDATA[Cama]]></text>
</staticText>
<rectangle>
<reportElement uuid="6e7ec76b-c44c-4ae1-8b14-868e9f596876" x="314" y="1" width="35" height="22" backcolor="#E0E0E0"/>
</rectangle>
<staticText>
<reportElement uuid="afc00f8f-d646-48be-b883-11beb5e4e5b3" x="318" y="1" width="25" height="22"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="9" isBold="true"/>
</textElement>
<text><![CDATA[Edad]]></text>
</staticText>
<rectangle>
<reportElement uuid="065d81fe-b21e-4982-9843-c874f499a969" x="349" y="1" width="150" height="22" backcolor="#E0E0E0"/>
</rectangle>
<staticText>
<reportElement uuid="1215c9ac-9bc5-428d-9456-4c9c0ce81129" x="351" y="1" width="145" height="22"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="9" isBold="true"/>
</textElement>
<text><![CDATA[Empresa]]></text>
</staticText>
<rectangle>
<reportElement uuid="9066f537-b0d4-4a43-b544-14704b4fc207" x="499" y="1" width="150" height="22" backcolor="#E0E0E0"/>
</rectangle>
<staticText>
<reportElement uuid="6ba919d0-8dc8-421e-890d-4d9e9bcdf639" x="501" y="1" width="146" height="22"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="9" isBold="true"/>
</textElement>
<text><![CDATA[Especialista]]></text>
</staticText>
<rectangle>
<reportElement uuid="efeb1184-587c-43ce-bca3-3e6b25f10ea6" x="649" y="1" width="206" height="22" backcolor="#E0E0E0"/>
</rectangle>
<staticText>
<reportElement uuid="bc197cfe-a855-4da3-b25e-2d602e16e5c5" x="670" y="1" width="164" height="22"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="9" isBold="true"/>
</textElement>
<text><![CDATA[Diagnostico]]></text>
</staticText>
<rectangle>
<reportElement uuid="b9dadc2e-8f0d-481d-a82d-f6f47263ef18" x="855" y="1" width="209" height="22" backcolor="#E0E0E0"/>
</rectangle>
<staticText>
<reportElement uuid="7c51754f-552c-445e-b7f4-668375f96f3b" x="868" y="1" width="183" height="22"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="9" isBold="true"/>
</textElement>
<text><![CDATA[Fecha Ingreso Paciente]]></text>
</staticText>
<rectangle>
<reportElement uuid="efe37924-5b8b-46bb-b7ab-c35ec15f16f7" x="1173" y="1" width="156" height="22" backcolor="#E0E0E0"/>
</rectangle>
<staticText>
<reportElement uuid="4360b926-3429-4bcf-bf76-28c6ed3af80f" x="1219" y="1" width="65" height="22"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="9" isBold="true"/>
</textElement>
<text><![CDATA[Dieta]]></text>
</staticText>
<rectangle>
<reportElement uuid="53b0b7be-341c-4d88-9d06-e9ce66f2ba38" x="1329" y="1" width="300" height="22" backcolor="#E0E0E0"/>
</rectangle>
<staticText>
<reportElement uuid="739a0a28-415c-4f19-97e7-0eb4d1967f0c" x="1346" y="1" width="269" height="22"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="9" isBold="true"/>
</textElement>
<text><![CDATA[Observaciones]]></text>
</staticText>
<rectangle>
<reportElement uuid="5c0eb8ea-abbb-430f-8faf-bdc507ccdc43" x="1064" y="1" width="109" height="22" backcolor="#E0E0E0"/>
</rectangle>
<staticText>
<reportElement uuid="f620ed1e-a0a1-448f-a9cd-13b0824dda53" x="1064" y="1" width="98" height="22"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="9" isBold="true"/>
</textElement>
<text><![CDATA[Dias Estancia]]></text>
</staticText>
<rectangle>
<reportElement uuid="f0ac1173-7313-46cb-bf0c-072abc746810" x="1629" y="1" width="250" height="22" backcolor="#E0E0E0"/>
</rectangle>
<staticText>
<reportElement uuid="f0650ba4-1a18-4ff8-b514-928fad9c0e47" x="1629" y="1" width="250" height="22"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="9" isBold="true"/>
</textElement>
<text><![CDATA[Registrado Por]]></text>
</staticText>
<rectangle>
<reportElement uuid="ea2a4a77-fe25-4b62-8730-b04158cc4f43" x="1879" y="1" width="120" height="22" backcolor="#E0E0E0"/>
</rectangle>
<staticText>
<reportElement uuid="051cd84a-f45a-43ae-8e50-476a1723acdd" x="1879" y="1" width="120" height="22"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="9" isBold="true"/>
</textElement>
<text><![CDATA[Fecha Registro]]></text>
</staticText>
<rectangle>
<reportElement uuid="146c7aa0-b3cd-496d-a9c7-49b74c37bd64" x="52" y="1" width="93" height="22" backcolor="#E0E0E0"/>
</rectangle>
<staticText>
<reportElement uuid="f657cfd7-da85-4e30-86ec-720183dbd38b" mode="Transparent" x="52" y="1" width="93" height="22" backcolor="#E0E0E0"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="9" isBold="true"/>
</textElement>
<text><![CDATA[Documento]]></text>
</staticText>
<staticText>
<reportElement uuid="64287559-c995-45ba-b97f-dbfbecf62eab" mode="Transparent" x="145" y="2" width="169" height="21" backcolor="#E0E0E0"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="8" isBold="true"/>
</textElement>
<text><![CDATA[Nombre(s) y Apellidos]]></text>
</staticText>
</band>
</columnHeader>
<detail>
<band height="626" splitType="Stretch">
<rectangle>
<reportElement uuid="ce513dc9-595a-4018-9b60-4184a87400cf" x="52" y="0" width="93" height="59"/>
</rectangle>
<rectangle>
<reportElement uuid="633a32fe-76d0-478c-a2e8-ef73630b698d" x="0" y="0" width="52" height="59"/>
</rectangle>
<textField isBlankWhenNull="true">
<reportElement uuid="d1b97bd4-4e00-4aae-a0eb-d9532314933f" x="3" y="0" width="46" height="59"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="8"/>
</textElement>
<textFieldExpression><![CDATA[$F{CodigoCama}]]></textFieldExpression>
</textField>
<rectangle>
<reportElement uuid="58f022c4-755c-4341-9de7-152dbb01092b" x="145" y="0" width="169" height="59"/>
</rectangle>
<rectangle>
<reportElement uuid="9236e426-7562-40b9-8c87-02a31d29dacf" x="314" y="0" width="35" height="59"/>
</rectangle>
<textField isBlankWhenNull="true">
<reportElement uuid="d77071b7-c1cc-40e8-ab57-92ad08278390" x="316" y="0" width="29" height="59"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="8"/>
</textElement>
<textFieldExpression><![CDATA[$F{Edad}]]></textFieldExpression>
</textField>
<rectangle>
<reportElement uuid="76fa21b9-c41d-46bc-8c50-dee329b8c61c" x="349" y="0" width="150" height="59"/>
</rectangle>
<textField isBlankWhenNull="true">
<reportElement uuid="81c4e8ba-6de5-471d-b8ca-3e9984105a99" x="354" y="0" width="140" height="59"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="8"/>
</textElement>
<textFieldExpression><![CDATA[$F{Empresa}]]></textFieldExpression>
</textField>
<rectangle>
<reportElement uuid="836b0a1d-4268-4668-a63e-4df1b4834662" x="499" y="0" width="150" height="59"/>
</rectangle>
<textField isBlankWhenNull="true">
<reportElement uuid="e0ee8d88-5ef1-4e7e-b534-c5cef786c942" x="505" y="0" width="140" height="59"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="8"/>
</textElement>
<textFieldExpression><![CDATA[$F{Especialista}]]></textFieldExpression>
</textField>
<rectangle>
<reportElement uuid="49535787-c02d-4d34-9b83-ed192e0fb086" x="855" y="0" width="209" height="59"/>
</rectangle>
<textField isBlankWhenNull="true">
<reportElement uuid="0a4641d9-76f8-4081-ba53-7d68e9934176" x="865" y="0" width="190" height="59"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="8"/>
</textElement>
<textFieldExpression><![CDATA[$F{FechaIngreso}]]></textFieldExpression>
</textField>
<rectangle>
<reportElement uuid="e4187b85-1c21-4041-8e0e-2c1a6f02cb72" x="1173" y="0" width="156" height="59"/>
</rectangle>
<textField isBlankWhenNull="true">
<reportElement uuid="7883fd8a-e3f2-4930-8ec0-37fdb76f4fa4" x="1184" y="0" width="132" height="59"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="8"/>
</textElement>
<textFieldExpression><![CDATA[$F{Dieta}]]></textFieldExpression>
</textField>
<rectangle>
<reportElement uuid="1a80ef21-1caa-46c2-a1ff-69a810997625" x="1329" y="0" width="300" height="59"/>
</rectangle>
<textField isBlankWhenNull="true">
<reportElement uuid="cb697e3d-c8e0-4c98-a588-1eb92008d1f5" x="1345" y="0" width="269" height="59"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="8"/>
</textElement>
<textFieldExpression><![CDATA[$F{Observaciones}]]></textFieldExpression>
</textField>
<rectangle>
<reportElement uuid="6e960357-27ac-4411-b0ab-1dc6c2bc101b" x="1064" y="0" width="109" height="59"/>
</rectangle>
<rectangle>
<reportElement uuid="3eca5ca2-a90b-4c1c-96d4-2ff47b699044" x="1879" y="0" width="120" height="59"/>
</rectangle>
<textField isBlankWhenNull="true">
<reportElement uuid="548dcabc-6708-4a4b-902a-7fd7cc30f26c" x="1897" y="0" width="93" height="59"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="8"/>
</textElement>
<textFieldExpression><![CDATA[$F{FechaRegistro}]]></textFieldExpression>
</textField>
<textField isBlankWhenNull="true">
<reportElement uuid="2cc8851f-d3b4-44cf-a97c-4ad7544765b5" x="59" y="0" width="79" height="59"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="8"/>
</textElement>
<textFieldExpression><![CDATA[$F{Documento}]]></textFieldExpression>
</textField>
<rectangle>
<reportElement uuid="641978c2-69fc-45f3-a96c-25a53aa138b5" x="1629" y="0" width="250" height="59"/>
</rectangle>
<textField isBlankWhenNull="true">
<reportElement uuid="66b12f81-615c-4bb7-8c18-3ce2f0e877d6" x="1635" y="0" width="236" height="59"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="8"/>
</textElement>
<textFieldExpression><![CDATA[$F{Registrado}]]></textFieldExpression>
</textField>
<textField isBlankWhenNull="true">
<reportElement uuid="0a4641d9-76f8-4081-ba53-7d68e9934176" x="1069" y="1" width="98" height="59"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="8"/>
</textElement>
<textFieldExpression><![CDATA[$F{Dias}]]></textFieldExpression>
</textField>
<textField isBlankWhenNull="true">
<reportElement uuid="8e458e73-d0fb-4707-b4b8-dd34642725af" x="151" y="1" width="155" height="59"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="8"/>
</textElement>
<textFieldExpression><![CDATA[$F{Nombre}]]></textFieldExpression>
</textField>
<rectangle>
<reportElement uuid="e021e007-7a56-4ebe-a617-ab39f21dbb32" x="649" y="0" width="206" height="59"/>
</rectangle>
<textField isBlankWhenNull="true">
<reportElement uuid="61d0b9e9-f314-44a3-8aa4-ead1d3e726b6" x="659" y="0" width="185" height="58"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="8"/>
</textElement>
<textFieldExpression><![CDATA[$F{Diagnostico}]]></textFieldExpression>
</textField>
</band>
</detail>
<pageFooter>
<band height="140" splitType="Stretch"/>
</pageFooter>
</jasperReport>
I tried with a page break but I got the same result.
Your detail band is too tall. Set its height to match the tallest element in the band, that is 59 pixels.
I have a master report that contains three sub-reports, named "vehicleListSubReport.jrxml", "locoSubreport.jrxml", and "crewSubreport.jrxml" Their datasources are the fields "vehicleReport", "locoReport" and "crewReport" respectively, which are all objects of type JRDataSource.
I am having a few problems, but I feel that they may have a single root cause, hence why I am asking about them all in the same question. Firstly, the code:
<?xml version="1.0" encoding="UTF-8"?>
<!-- Created with Jaspersoft Studio version last-->
<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="X2010" language="groovy" pageWidth="595" pageHeight="842" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="25640552-4299-40b4-8655-a64e83b16458">
<property name="com.jaspersoft.studio.unit." value="pixel"/>
<property name="com.jaspersoft.studio.unit.pageHeight" value="pixel"/>
<property name="com.jaspersoft.studio.unit.pageWidth" value="pixel"/>
<property name="com.jaspersoft.studio.unit.topMargin" value="pixel"/>
<property name="com.jaspersoft.studio.unit.bottomMargin" value="pixel"/>
<property name="com.jaspersoft.studio.unit.leftMargin" value="pixel"/>
<property name="com.jaspersoft.studio.unit.rightMargin" value="pixel"/>
<property name="com.jaspersoft.studio.unit.columnWidth" value="pixel"/>
<property name="com.jaspersoft.studio.unit.columnSpacing" value="pixel"/>
<style name="Title" fontName="Times New Roman" fontSize="50" isBold="true" pdfFontName="Times-Bold"/>
<style name="SubTitle" forecolor="#736343" fontName="Arial" fontSize="18"/>
<style name="Column header" forecolor="#666666" fontName="Arial" fontSize="12" isBold="true"/>
<style name="Detail" fontName="Arial" fontSize="12"/>
<style name="Row" mode="Transparent">
<conditionalStyle>
<conditionExpression><![CDATA[$V{REPORT_COUNT}%2 == 0]]></conditionExpression>
<style backcolor="#E6DAC3"/>
</conditionalStyle>
</style>
<queryString>
<![CDATA[]]>
</queryString>
<field name="trainNumber" class="java.lang.String"/>
<field name="crewReport" class="net.sf.jasperreports.engine.JRDataSource"/>
<field name="trainType" class="java.lang.String"/>
<field name="origin" class="java.lang.String"/>
<field name="dangerousGoods" class="java.lang.Boolean">
<fieldDescription><![CDATA[]]></fieldDescription>
</field>
<field name="outOfGauge" class="java.lang.Boolean"/>
<field name="trainDate" class="java.util.Date"/>
<field name="approvedLength" class="java.lang.Integer"/>
<field name="destination" class="java.lang.String"/>
<field name="specialLoad" class="java.lang.Boolean"/>
<field name="submittedBy" class="java.lang.String"/>
<field name="phone" class="java.lang.String"/>
<field name="submittedAtDateTime" class="java.util.Date"/>
<field name="fax" class="java.lang.String"/>
<field name="numberOfVehicles" class="java.lang.Integer"/>
<field name="tonnesHauled" class="java.lang.String"/>
<field name="tonnesGross" class="java.lang.String"/>
<field name="totalLength" class="java.lang.Double"/>
<field name="locoReport" class="net.sf.jasperreports.engine.JRDataSource"/>
<field name="vehicleReport" class="net.sf.jasperreports.engine.JRDataSource"/>
<field name="railOperatorName" class="java.lang.String"/>
<field name="submitter" class="java.lang.String"/>
<field name="consistLocation" class="java.lang.String"/>
<group name="Group1">
<groupExpression><![CDATA[(int)($V{REPORT_COUNT}/15)]]></groupExpression>
<groupFooter>
<band height="50" splitType="Stretch">
<printWhenExpression><![CDATA[$F{vehicleReport} != null]]></printWhenExpression>
</band>
</groupFooter>
</group>
<group name="Group2">
<groupExpression><![CDATA[(int)($V{REPORT_COUNT}/5)]]></groupExpression>
<groupFooter>
<band height="107" splitType="Stretch"/>
</groupFooter>
</group>
<background>
<band splitType="Stretch"/>
</background>
<title>
<band height="65" splitType="Stretch">
<staticText>
<reportElement style="Title" x="80" y="0" width="472" height="62" uuid="b89a83c9-c1a2-4ab6-85a2-88ba23795dd3"/>
<textElement verticalAlignment="Middle">
<font pdfFontName="Times-Roman"/>
</textElement>
<text><![CDATA[X20.10 Report]]></text>
</staticText>
</band>
</title>
<pageHeader>
<band splitType="Stretch"/>
</pageHeader>
<columnHeader>
<band height="5" splitType="Stretch">
<line>
<reportElement positionType="FixRelativeToBottom" x="1" y="1" width="552" height="2" uuid="f93f01ef-7224-41b8-a330-380bec4336d6"/>
<graphicElement>
<pen lineWidth="0.5" lineColor="#999999"/>
</graphicElement>
</line>
</band>
</columnHeader>
<detail>
<band height="400" splitType="Stretch">
<staticText>
<reportElement x="0" y="120" width="90" height="20" uuid="20c60332-1cff-4218-bfce-57cec3e447dd"/>
<textElement>
<font isBold="true"/>
</textElement>
<text><![CDATA[Train Number:]]></text>
</staticText>
<subreport runToBottom="true">
<reportElement isPrintRepeatedValues="false" x="-20" y="220" width="595" height="45" uuid="4f24664e-5df0-4326-9b95-9939f93c48d4"/>
<dataSourceExpression><![CDATA[$F{crewReport}]]></dataSourceExpression>
<subreportExpression><![CDATA["crewSubreport.jasper"]]></subreportExpression>
</subreport>
<textField>
<reportElement x="90" y="120" width="90" height="20" uuid="110c9328-d33c-4c0a-86e5-7f4ebe669b4f"/>
<textFieldExpression><![CDATA[$F{trainNumber}]]></textFieldExpression>
</textField>
<staticText>
<reportElement x="0" y="90" width="554" height="30" uuid="efaedffc-7d27-40f0-acc1-71797d91472c"/>
<box>
<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 textAlignment="Center">
<font size="18"/>
</textElement>
<text><![CDATA[Train Details]]></text>
</staticText>
<staticText>
<reportElement x="0" y="140" width="90" height="20" uuid="91493735-ab12-4068-9583-9edbbac7ca35"/>
<textElement>
<font isBold="true"/>
</textElement>
<text><![CDATA[Train Type:]]></text>
</staticText>
<staticText>
<reportElement x="0" y="160" width="90" height="20" uuid="a3e483b0-59c4-494c-ad36-1ea30eb4c5f5"/>
<textElement>
<font isBold="true"/>
</textElement>
<text><![CDATA[Origin]]></text>
</staticText>
<staticText>
<reportElement x="0" y="180" width="90" height="20" uuid="f5f23f73-3bdb-4b12-b9ec-d1946d1d249c"/>
<textElement>
<font isBold="true"/>
</textElement>
<text><![CDATA[Dangerous Goods:]]></text>
</staticText>
<staticText>
<reportElement x="0" y="200" width="90" height="20" uuid="49aebc16-13db-4842-bb0f-23eac8f693a4"/>
<textElement>
<font isBold="true"/>
</textElement>
<text><![CDATA[Out of Gauge:]]></text>
</staticText>
<textField>
<reportElement x="90" y="140" width="90" height="20" uuid="ff7d87fc-1087-4edf-b1ed-454ff8ae94f8"/>
<textFieldExpression><![CDATA[$F{trainType}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="90" y="160" width="90" height="20" uuid="7f109b0f-f4f4-48af-9a13-909b766dbd3c"/>
<textFieldExpression><![CDATA[$F{origin}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="90" y="180" width="90" height="20" uuid="67f7fd28-1cee-402d-8a35-523058ab5061"/>
<textFieldExpression><![CDATA[$F{dangerousGoods} ? "Yes" : "No"]]></textFieldExpression>
</textField>
<textField>
<reportElement x="90" y="200" width="90" height="20" uuid="82586e0e-b6a7-43cf-9b1f-a12612396909"/>
<textFieldExpression><![CDATA[$F{outOfGauge} ? "Yes" : "No"]]></textFieldExpression>
</textField>
<staticText>
<reportElement x="280" y="120" width="100" height="20" uuid="94651700-a070-400e-a206-fd09170cf797"/>
<textElement>
<font isBold="true"/>
</textElement>
<text><![CDATA[Train Date:]]></text>
</staticText>
<textField pattern="dd/MM/yyyy">
<reportElement x="380" y="120" width="100" height="20" uuid="2ea29a18-1d85-4a23-b9f6-17459ceafe0d"/>
<textFieldExpression><![CDATA[$F{trainDate}]]></textFieldExpression>
</textField>
<staticText>
<reportElement x="280" y="140" width="100" height="20" uuid="3ffe5495-6b91-424b-b652-c48c72b39a8f"/>
<textElement>
<font isBold="true"/>
</textElement>
<text><![CDATA[Approved Length:]]></text>
</staticText>
<staticText>
<reportElement x="280" y="160" width="100" height="20" uuid="68bcc4c2-d6c0-426b-979c-c70bbd1c550c"/>
<textElement>
<font isBold="true"/>
</textElement>
<text><![CDATA[Destination:]]></text>
</staticText>
<staticText>
<reportElement x="280" y="180" width="100" height="20" uuid="83e83257-d581-4fdd-8955-ef281357aaae"/>
<textElement>
<font isBold="true"/>
</textElement>
<text><![CDATA[Special Load:]]></text>
</staticText>
<textField>
<reportElement x="380" y="140" width="100" height="20" uuid="0f1b2cf0-73a3-4106-904a-8a28b7717909"/>
<textFieldExpression><![CDATA[$F{approvedLength}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="380" y="160" width="100" height="20" uuid="7a006853-a10a-4759-889f-b9848a59d79b"/>
<textFieldExpression><![CDATA[$F{destination}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="380" y="180" width="100" height="20" uuid="521136d0-a51f-4ca1-bdce-6d0ed1cd5c76"/>
<textFieldExpression><![CDATA[$F{specialLoad} ? "Yes" : "No"]]></textFieldExpression>
</textField>
<textField>
<reportElement x="90" y="50" width="90" height="20" uuid="36b52f46-6f49-4c75-88d0-27a221bc62ec"/>
<textFieldExpression><![CDATA[$F{submittedBy}]]></textFieldExpression>
</textField>
<staticText>
<reportElement x="0" y="50" width="90" height="20" uuid="2cad93ef-d94f-4479-93e7-7a232023dace"/>
<textElement>
<font isBold="true"/>
</textElement>
<text><![CDATA[Submitted By:]]></text>
</staticText>
<staticText>
<reportElement x="0" y="70" width="90" height="20" uuid="90474202-ce8b-4657-bad1-71edc8557335"/>
<text><![CDATA[Phone:]]></text>
</staticText>
<textField>
<reportElement x="90" y="70" width="90" height="20" uuid="20d6f136-62e4-4332-9098-3355896ff4af"/>
<textFieldExpression><![CDATA[$F{phone}]]></textFieldExpression>
</textField>
<textField pattern="dd/MM/yyyy HH:mm">
<reportElement x="380" y="50" width="174" height="20" uuid="540bcba3-93ee-4877-b5a8-6f58db7c7398"/>
<textFieldExpression><![CDATA[$F{submittedAtDateTime}]]></textFieldExpression>
</textField>
<staticText>
<reportElement x="280" y="50" width="100" height="20" uuid="957ce926-9636-4625-b91f-78ecd3b8a200"/>
<textElement>
<font isBold="true"/>
</textElement>
<text><![CDATA[Submitted At:]]></text>
</staticText>
<staticText>
<reportElement x="280" y="70" width="100" height="20" uuid="d8cf6e8b-9664-4012-b51d-6cdea49faf22"/>
<text><![CDATA[Fax:]]></text>
</staticText>
<textField>
<reportElement x="380" y="70" width="174" height="20" uuid="cc95ebda-f955-4eaf-9314-45e4a56c4fde"/>
<textFieldExpression><![CDATA[$F{fax}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="0" y="0" width="554" height="50" uuid="f7c297a9-e14e-44de-8769-5d483cfe4863"/>
<textElement textAlignment="Center">
<font size="14" isBold="true"/>
</textElement>
<textFieldExpression><![CDATA["Consist for " + $F{railOperatorName} + " submitted by " + $F{submitter} + "\nConsist Location: " + $F{consistLocation}]]></textFieldExpression>
</textField>
<subreport runToBottom="true">
<reportElement stretchType="RelativeToTallestObject" isPrintRepeatedValues="false" x="50" y="330" width="130" height="20" uuid="4f470a33-ef93-425d-951e-e53642df7771"/>
<dataSourceExpression><![CDATA[$F{locoReport}]]></dataSourceExpression>
<subreportExpression><![CDATA["locoSubreport.jasper"]]></subreportExpression>
</subreport>
<textField pattern="#0.00#;(#0.00#-)">
<reportElement isPrintRepeatedValues="false" x="460" y="310" width="80" height="20" uuid="f182c7db-f00f-4107-bc33-93b30faf11a9"/>
<textFieldExpression><![CDATA[$F{totalLength}]]></textFieldExpression>
</textField>
<textField pattern="#0.00#;(#0.00#-)">
<reportElement isPrintRepeatedValues="false" x="280" y="310" width="80" height="20" uuid="c5f34099-ac0e-4634-9398-a96f93c052f6"/>
<textFieldExpression><![CDATA[$F{tonnesHauled}]]></textFieldExpression>
</textField>
<staticText>
<reportElement isPrintRepeatedValues="false" x="190" y="330" width="80" height="20" uuid="824478e7-fc00-4d16-8a39-6355baf4bc61"/>
<textElement>
<font isBold="true"/>
</textElement>
<text><![CDATA[Tonnes Gross:]]></text>
</staticText>
<staticText>
<reportElement isPrintRepeatedValues="false" x="190" y="310" width="80" height="20" uuid="e0bc266a-56f2-4246-bea6-f31c4718046d"/>
<textElement>
<font isBold="true"/>
</textElement>
<text><![CDATA[Tonnes Hauled:]]></text>
</staticText>
<textField pattern="#0.00#;(#0.00#-)">
<reportElement isPrintRepeatedValues="false" x="280" y="330" width="80" height="20" uuid="74e9ef61-e6e0-45fa-9966-9950c2f5a1e0"/>
<textFieldExpression><![CDATA[$F{tonnesGross}]]></textFieldExpression>
</textField>
<textField>
<reportElement isPrintRepeatedValues="false" x="100" y="310" width="80" height="20" uuid="86833b59-3fe2-4c50-8d8e-18d80e082f75"/>
<textFieldExpression><![CDATA[$F{numberOfVehicles}]]></textFieldExpression>
</textField>
<staticText>
<reportElement isPrintRepeatedValues="false" x="0" y="330" width="40" height="20" uuid="c08f0b3c-0ddf-4cbb-b377-1f48b80fa383"/>
<textElement>
<font isBold="true"/>
</textElement>
<text><![CDATA[Locos:]]></text>
</staticText>
<staticText>
<reportElement isPrintRepeatedValues="false" x="0" y="310" width="90" height="20" uuid="6a4a5d4b-5762-45d2-b54f-2167af8da5f8"/>
<textElement>
<font isBold="true"/>
</textElement>
<text><![CDATA[Number Vehicles:]]></text>
</staticText>
<staticText>
<reportElement isPrintRepeatedValues="false" x="1" y="270" width="551" height="35" uuid="53e5c946-8e6d-44fa-8715-f193d224b489"/>
<box>
<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 textAlignment="Center">
<font size="18"/>
</textElement>
<text><![CDATA[Train Summary]]></text>
</staticText>
<staticText>
<reportElement isPrintRepeatedValues="false" x="370" y="310" width="80" height="20" uuid="31012f66-602d-4892-82f4-d1187915046e"/>
<textElement>
<font isBold="true"/>
</textElement>
<text><![CDATA[Total Length:]]></text>
</staticText>
<subreport runToBottom="true">
<reportElement stretchType="RelativeToTallestObject" isPrintRepeatedValues="false" x="-20" y="360" width="595" height="20" printWhenGroupChanges="Group1" uuid="8e2dbcb5-3c3f-4bb5-a606-39f6f2e8656a"/>
<dataSourceExpression><![CDATA[$F{vehicleReport}]]></dataSourceExpression>
<subreportExpression><![CDATA["vehicleListSubreport.jasper"]]></subreportExpression>
</subreport>
</band>
</detail>
<columnFooter>
<band height="6" splitType="Stretch">
<line>
<reportElement positionType="FixRelativeToBottom" x="0" y="0" width="554" height="2" uuid="447d20b2-f65e-42ee-b2a8-69632882c668"/>
<graphicElement>
<pen lineWidth="0.5" lineColor="#999999"/>
</graphicElement>
</line>
</band>
</columnFooter>
<pageFooter>
<band height="25" splitType="Stretch">
<frame>
<reportElement mode="Opaque" x="-21" y="1" width="597" height="24" forecolor="#D0B48E" backcolor="#F2EBDF" uuid="24b6cb4b-7cad-4abd-a159-cc5cc11896db"/>
<textField evaluationTime="Report">
<reportElement style="Column header" x="533" y="0" width="40" height="20" forecolor="#736343" uuid="5463547b-d0a6-440d-baa9-9b1dcce760bf"/>
<textElement verticalAlignment="Middle">
<font size="10" isBold="false"/>
</textElement>
<textFieldExpression><![CDATA[" " + $V{PAGE_NUMBER}]]></textFieldExpression>
</textField>
<textField>
<reportElement style="Column header" x="453" y="0" width="80" height="20" forecolor="#736343" uuid="17310c63-a8e1-4f36-aad6-1b37346d27f6"/>
<textElement textAlignment="Right" verticalAlignment="Middle">
<font size="10" isBold="false"/>
</textElement>
<textFieldExpression><![CDATA["Page "+$V{PAGE_NUMBER}+" of"]]></textFieldExpression>
</textField>
<textField pattern="EEEEE dd MMMMM yyyy">
<reportElement style="Column header" x="22" y="1" width="197" height="20" forecolor="#736343" uuid="340aeee4-0582-45c2-9fbf-f1250cba3f8a"/>
<textElement verticalAlignment="Middle">
<font size="10" isBold="false"/>
</textElement>
<textFieldExpression><![CDATA[new java.util.Date()]]></textFieldExpression>
</textField>
</frame>
</band>
</pageFooter>
<summary>
<band splitType="Stretch"/>
</summary>
</jasperReport>
First problem: The crewSubreport has other report elements below it, including the other two sub-reports. If there are multiple records in this sub-report, it renders on top of the elements below it, including the other sub-reports.
Second problem: The data text fields below the crewSubreport are rendering (although with the subreport rendering on top of them), however, the static text boxes with the labels "Train Summary", "Number Vehicles:", "Tonnes Hauled:", "Total Length:", "Locos:", and "Tonnes Gross:" are not rendering, and I not yet able to determine why.
Third problem: Similar to the first problem, the locoSubreport is rendering into the space occupied by the vehicleListSubreport.
How do I fix these issues?
EDIT: Posting the following to illustrate the issues I'm having with the only answer so far:
In the memory usage and CPU usage graphs, the small peaks on the left are me running the report I designed. The rest of the graph after that is what happens when I run the report designed in the answer. It continues like this until the garbage collector seems to give up and kills the thread. Generating this report is the only thing the program is doing at this time. Using the VisualVM to force the JVM to perform a full garbage collection does not reclaim any memory. It would appear to me that there is a problem in Jasper Reports when using positionType="Float", and I need a solution that does not trigger this problem.
Try this code (everything belove first sub report is in a frame so it might be less cpu intensive to move them all together):
<?xml version="1.0" encoding="UTF-8"?>
<!-- Created with Jaspersoft Studio version last-->
<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="X2010" language="groovy" pageWidth="595" pageHeight="842" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="25640552-4299-40b4-8655-a64e83b16458">
<property name="com.jaspersoft.studio.unit." value="pixel"/>
<property name="com.jaspersoft.studio.unit.pageHeight" value="pixel"/>
<property name="com.jaspersoft.studio.unit.pageWidth" value="pixel"/>
<property name="com.jaspersoft.studio.unit.topMargin" value="pixel"/>
<property name="com.jaspersoft.studio.unit.bottomMargin" value="pixel"/>
<property name="com.jaspersoft.studio.unit.leftMargin" value="pixel"/>
<property name="com.jaspersoft.studio.unit.rightMargin" value="pixel"/>
<property name="com.jaspersoft.studio.unit.columnWidth" value="pixel"/>
<property name="com.jaspersoft.studio.unit.columnSpacing" value="pixel"/>
<style name="Title" fontName="Times New Roman" fontSize="50" isBold="true" pdfFontName="Times-Bold"/>
<style name="SubTitle" forecolor="#736343" fontName="Arial" fontSize="18"/>
<style name="Column header" forecolor="#666666" fontName="Arial" fontSize="12" isBold="true"/>
<style name="Detail" fontName="Arial" fontSize="12"/>
<style name="Row" mode="Transparent">
<conditionalStyle>
<conditionExpression><![CDATA[$V{REPORT_COUNT}%2 == 0]]></conditionExpression>
<style backcolor="#E6DAC3"/>
</conditionalStyle>
</style>
<queryString>
<![CDATA[]]>
</queryString>
<field name="trainNumber" class="java.lang.String"/>
<field name="crewReport" class="net.sf.jasperreports.engine.JRDataSource"/>
<field name="trainType" class="java.lang.String"/>
<field name="origin" class="java.lang.String"/>
<field name="dangerousGoods" class="java.lang.Boolean">
<fieldDescription><![CDATA[]]></fieldDescription>
</field>
<field name="outOfGauge" class="java.lang.Boolean"/>
<field name="trainDate" class="java.util.Date"/>
<field name="approvedLength" class="java.lang.Integer"/>
<field name="destination" class="java.lang.String"/>
<field name="specialLoad" class="java.lang.Boolean"/>
<field name="submittedBy" class="java.lang.String"/>
<field name="phone" class="java.lang.String"/>
<field name="submittedAtDateTime" class="java.util.Date"/>
<field name="fax" class="java.lang.String"/>
<field name="numberOfVehicles" class="java.lang.Integer"/>
<field name="tonnesHauled" class="java.lang.String"/>
<field name="tonnesGross" class="java.lang.String"/>
<field name="totalLength" class="java.lang.Double"/>
<field name="locoReport" class="net.sf.jasperreports.engine.JRDataSource"/>
<field name="vehicleReport" class="net.sf.jasperreports.engine.JRDataSource"/>
<field name="railOperatorName" class="java.lang.String"/>
<field name="submitter" class="java.lang.String"/>
<field name="consistLocation" class="java.lang.String"/>
<group name="Group1">
<groupExpression><![CDATA[(int)($V{REPORT_COUNT}/15)]]></groupExpression>
<groupFooter>
<band height="50" splitType="Stretch">
<printWhenExpression><![CDATA[$F{vehicleReport} != null]]></printWhenExpression>
</band>
</groupFooter>
</group>
<group name="Group2">
<groupExpression><![CDATA[(int)($V{REPORT_COUNT}/5)]]></groupExpression>
<groupFooter>
<band height="107" splitType="Stretch"/>
</groupFooter>
</group>
<background>
<band splitType="Stretch"/>
</background>
<title>
<band height="65" splitType="Stretch">
<staticText>
<reportElement style="Title" x="80" y="0" width="472" height="62" uuid="b89a83c9-c1a2-4ab6-85a2-88ba23795dd3"/>
<textElement verticalAlignment="Middle">
<font pdfFontName="Times-Roman"/>
</textElement>
<text><![CDATA[X20.10 Report]]></text>
</staticText>
</band>
</title>
<pageHeader>
<band splitType="Stretch"/>
</pageHeader>
<columnHeader>
<band height="5" splitType="Stretch">
<line>
<reportElement positionType="FixRelativeToBottom" x="1" y="1" width="552" height="2" uuid="f93f01ef-7224-41b8-a330-380bec4336d6"/>
<graphicElement>
<pen lineWidth="0.5" lineColor="#999999"/>
</graphicElement>
</line>
</band>
</columnHeader>
<detail>
<band height="400" splitType="Stretch">
<property name="local_mesure_unitheight" value="pixel"/>
<property name="com.jaspersoft.studio.unit.height" value="px"/>
<staticText>
<reportElement x="0" y="120" width="90" height="20" uuid="20c60332-1cff-4218-bfce-57cec3e447dd"/>
<textElement>
<font isBold="true"/>
</textElement>
<text><![CDATA[Train Number:]]></text>
</staticText>
<subreport runToBottom="true">
<reportElement isPrintRepeatedValues="false" x="-20" y="220" width="595" height="45" uuid="4f24664e-5df0-4326-9b95-9939f93c48d4"/>
<dataSourceExpression><![CDATA[$F{crewReport}]]></dataSourceExpression>
<subreportExpression><![CDATA["crewSubreport.jasper"]]></subreportExpression>
</subreport>
<textField>
<reportElement x="90" y="120" width="90" height="20" uuid="110c9328-d33c-4c0a-86e5-7f4ebe669b4f"/>
<textFieldExpression><![CDATA[$F{trainNumber}]]></textFieldExpression>
</textField>
<staticText>
<reportElement x="0" y="90" width="554" height="30" uuid="efaedffc-7d27-40f0-acc1-71797d91472c"/>
<box>
<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 textAlignment="Center">
<font size="18"/>
</textElement>
<text><![CDATA[Train Details]]></text>
</staticText>
<staticText>
<reportElement x="0" y="140" width="90" height="20" uuid="91493735-ab12-4068-9583-9edbbac7ca35"/>
<textElement>
<font isBold="true"/>
</textElement>
<text><![CDATA[Train Type:]]></text>
</staticText>
<staticText>
<reportElement x="0" y="160" width="90" height="20" uuid="a3e483b0-59c4-494c-ad36-1ea30eb4c5f5"/>
<textElement>
<font isBold="true"/>
</textElement>
<text><![CDATA[Origin]]></text>
</staticText>
<staticText>
<reportElement x="0" y="180" width="90" height="20" uuid="f5f23f73-3bdb-4b12-b9ec-d1946d1d249c"/>
<textElement>
<font isBold="true"/>
</textElement>
<text><![CDATA[Dangerous Goods:]]></text>
</staticText>
<staticText>
<reportElement x="0" y="200" width="90" height="20" uuid="49aebc16-13db-4842-bb0f-23eac8f693a4"/>
<textElement>
<font isBold="true"/>
</textElement>
<text><![CDATA[Out of Gauge:]]></text>
</staticText>
<textField>
<reportElement x="90" y="140" width="90" height="20" uuid="ff7d87fc-1087-4edf-b1ed-454ff8ae94f8"/>
<textFieldExpression><![CDATA[$F{trainType}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="90" y="160" width="90" height="20" uuid="7f109b0f-f4f4-48af-9a13-909b766dbd3c"/>
<textFieldExpression><![CDATA[$F{origin}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="90" y="180" width="90" height="20" uuid="67f7fd28-1cee-402d-8a35-523058ab5061"/>
<textFieldExpression><![CDATA[$F{dangerousGoods} ? "Yes" : "No"]]></textFieldExpression>
</textField>
<textField>
<reportElement x="90" y="200" width="90" height="20" uuid="82586e0e-b6a7-43cf-9b1f-a12612396909"/>
<textFieldExpression><![CDATA[$F{outOfGauge} ? "Yes" : "No"]]></textFieldExpression>
</textField>
<staticText>
<reportElement x="280" y="120" width="100" height="20" uuid="94651700-a070-400e-a206-fd09170cf797"/>
<textElement>
<font isBold="true"/>
</textElement>
<text><![CDATA[Train Date:]]></text>
</staticText>
<textField pattern="dd/MM/yyyy">
<reportElement x="380" y="120" width="100" height="20" uuid="2ea29a18-1d85-4a23-b9f6-17459ceafe0d"/>
<textFieldExpression><![CDATA[$F{trainDate}]]></textFieldExpression>
</textField>
<staticText>
<reportElement x="280" y="140" width="100" height="20" uuid="3ffe5495-6b91-424b-b652-c48c72b39a8f"/>
<textElement>
<font isBold="true"/>
</textElement>
<text><![CDATA[Approved Length:]]></text>
</staticText>
<staticText>
<reportElement x="280" y="160" width="100" height="20" uuid="68bcc4c2-d6c0-426b-979c-c70bbd1c550c"/>
<textElement>
<font isBold="true"/>
</textElement>
<text><![CDATA[Destination:]]></text>
</staticText>
<staticText>
<reportElement x="280" y="180" width="100" height="20" uuid="83e83257-d581-4fdd-8955-ef281357aaae"/>
<textElement>
<font isBold="true"/>
</textElement>
<text><![CDATA[Special Load:]]></text>
</staticText>
<textField>
<reportElement x="380" y="140" width="100" height="20" uuid="0f1b2cf0-73a3-4106-904a-8a28b7717909"/>
<textFieldExpression><![CDATA[$F{approvedLength}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="380" y="160" width="100" height="20" uuid="7a006853-a10a-4759-889f-b9848a59d79b"/>
<textFieldExpression><![CDATA[$F{destination}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="380" y="180" width="100" height="20" uuid="521136d0-a51f-4ca1-bdce-6d0ed1cd5c76"/>
<textFieldExpression><![CDATA[$F{specialLoad} ? "Yes" : "No"]]></textFieldExpression>
</textField>
<textField>
<reportElement x="90" y="50" width="90" height="20" uuid="36b52f46-6f49-4c75-88d0-27a221bc62ec"/>
<textFieldExpression><![CDATA[$F{submittedBy}]]></textFieldExpression>
</textField>
<staticText>
<reportElement x="0" y="50" width="90" height="20" uuid="2cad93ef-d94f-4479-93e7-7a232023dace"/>
<textElement>
<font isBold="true"/>
</textElement>
<text><![CDATA[Submitted By:]]></text>
</staticText>
<staticText>
<reportElement x="0" y="70" width="90" height="20" uuid="90474202-ce8b-4657-bad1-71edc8557335"/>
<text><![CDATA[Phone:]]></text>
</staticText>
<textField>
<reportElement x="90" y="70" width="90" height="20" uuid="20d6f136-62e4-4332-9098-3355896ff4af"/>
<textFieldExpression><![CDATA[$F{phone}]]></textFieldExpression>
</textField>
<textField pattern="dd/MM/yyyy HH:mm">
<reportElement x="380" y="50" width="174" height="20" uuid="540bcba3-93ee-4877-b5a8-6f58db7c7398"/>
<textFieldExpression><![CDATA[$F{submittedAtDateTime}]]></textFieldExpression>
</textField>
<staticText>
<reportElement x="280" y="50" width="100" height="20" uuid="957ce926-9636-4625-b91f-78ecd3b8a200"/>
<textElement>
<font isBold="true"/>
</textElement>
<text><![CDATA[Submitted At:]]></text>
</staticText>
<staticText>
<reportElement x="280" y="70" width="100" height="20" uuid="d8cf6e8b-9664-4012-b51d-6cdea49faf22"/>
<text><![CDATA[Fax:]]></text>
</staticText>
<textField>
<reportElement x="380" y="70" width="174" height="20" uuid="cc95ebda-f955-4eaf-9314-45e4a56c4fde"/>
<textFieldExpression><![CDATA[$F{fax}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="0" y="0" width="554" height="50" uuid="f7c297a9-e14e-44de-8769-5d483cfe4863"/>
<textElement textAlignment="Center">
<font size="14" isBold="true"/>
</textElement>
<textFieldExpression><![CDATA["Consist for " + $F{railOperatorName} + " submitted by " + $F{submitter} + "\nConsist Location: " + $F{consistLocation}]]></textFieldExpression>
</textField>
<frame>
<reportElement positionType="Float" x="-20" y="270" width="596" height="110" uuid="18015311-a28e-4eee-9051-45b1790d24f7">
<property name="local_mesure_unitx" value="pixel"/>
<property name="com.jaspersoft.studio.unit.x" value="px"/>
<property name="local_mesure_unity" value="pixel"/>
<property name="com.jaspersoft.studio.unit.y" value="px"/>
<property name="local_mesure_unitheight" value="pixel"/>
<property name="com.jaspersoft.studio.unit.height" value="px"/>
</reportElement>
<subreport runToBottom="true">
<reportElement stretchType="RelativeToTallestObject" isPrintRepeatedValues="false" x="50" y="60" width="130" height="20" uuid="4f470a33-ef93-425d-951e-e53642df7771">
<property name="local_mesure_unity" value="pixel"/>
<property name="com.jaspersoft.studio.unit.y" value="px"/>
</reportElement>
<dataSourceExpression><![CDATA[$F{locoReport}]]></dataSourceExpression>
<subreportExpression><![CDATA["locoSubreport.jasper"]]></subreportExpression>
</subreport>
<textField pattern="#0.00#;(#0.00#-)">
<reportElement isPrintRepeatedValues="false" x="460" y="40" width="80" height="20" uuid="f182c7db-f00f-4107-bc33-93b30faf11a9">
<property name="local_mesure_unity" value="pixel"/>
<property name="com.jaspersoft.studio.unit.y" value="px"/>
</reportElement>
<textFieldExpression><![CDATA[$F{totalLength}]]></textFieldExpression>
</textField>
<textField pattern="#0.00#;(#0.00#-)">
<reportElement isPrintRepeatedValues="false" x="280" y="40" width="80" height="20" uuid="c5f34099-ac0e-4634-9398-a96f93c052f6">
<property name="local_mesure_unity" value="pixel"/>
<property name="com.jaspersoft.studio.unit.y" value="px"/>
</reportElement>
<textFieldExpression><![CDATA[$F{tonnesHauled}]]></textFieldExpression>
</textField>
<staticText>
<reportElement isPrintRepeatedValues="false" x="190" y="60" width="80" height="20" uuid="824478e7-fc00-4d16-8a39-6355baf4bc61">
<property name="local_mesure_unity" value="pixel"/>
<property name="com.jaspersoft.studio.unit.y" value="px"/>
</reportElement>
<textElement>
<font isBold="true"/>
</textElement>
<text><![CDATA[Tonnes Gross:]]></text>
</staticText>
<staticText>
<reportElement isPrintRepeatedValues="false" x="190" y="40" width="80" height="20" uuid="e0bc266a-56f2-4246-bea6-f31c4718046d">
<property name="local_mesure_unity" value="pixel"/>
<property name="com.jaspersoft.studio.unit.y" value="px"/>
</reportElement>
<textElement>
<font isBold="true"/>
</textElement>
<text><![CDATA[Tonnes Hauled:]]></text>
</staticText>
<textField pattern="#0.00#;(#0.00#-)">
<reportElement isPrintRepeatedValues="false" x="280" y="60" width="80" height="20" uuid="74e9ef61-e6e0-45fa-9966-9950c2f5a1e0">
<property name="local_mesure_unity" value="pixel"/>
<property name="com.jaspersoft.studio.unit.y" value="px"/>
</reportElement>
<textFieldExpression><![CDATA[$F{tonnesGross}]]></textFieldExpression>
</textField>
<textField>
<reportElement isPrintRepeatedValues="false" x="100" y="40" width="80" height="20" uuid="86833b59-3fe2-4c50-8d8e-18d80e082f75">
<property name="local_mesure_unity" value="pixel"/>
<property name="com.jaspersoft.studio.unit.y" value="px"/>
</reportElement>
<textFieldExpression><![CDATA[$F{numberOfVehicles}]]></textFieldExpression>
</textField>
<staticText>
<reportElement isPrintRepeatedValues="false" x="0" y="60" width="40" height="20" uuid="c08f0b3c-0ddf-4cbb-b377-1f48b80fa383">
<property name="local_mesure_unity" value="pixel"/>
<property name="com.jaspersoft.studio.unit.y" value="px"/>
</reportElement>
<textElement>
<font isBold="true"/>
</textElement>
<text><![CDATA[Locos:]]></text>
</staticText>
<staticText>
<reportElement isPrintRepeatedValues="false" x="0" y="40" width="90" height="20" uuid="6a4a5d4b-5762-45d2-b54f-2167af8da5f8">
<property name="local_mesure_unity" value="pixel"/>
<property name="com.jaspersoft.studio.unit.y" value="px"/>
</reportElement>
<textElement>
<font isBold="true"/>
</textElement>
<text><![CDATA[Number Vehicles:]]></text>
</staticText>
<staticText>
<reportElement isPrintRepeatedValues="false" x="1" y="0" width="551" height="35" uuid="53e5c946-8e6d-44fa-8715-f193d224b489">
<property name="local_mesure_unity" value="pixel"/>
<property name="com.jaspersoft.studio.unit.y" value="px"/>
</reportElement>
<box>
<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 textAlignment="Center">
<font size="18"/>
</textElement>
<text><![CDATA[Train Summary]]></text>
</staticText>
<staticText>
<reportElement isPrintRepeatedValues="false" x="370" y="40" width="80" height="20" uuid="31012f66-602d-4892-82f4-d1187915046e">
<property name="local_mesure_unity" value="pixel"/>
<property name="com.jaspersoft.studio.unit.y" value="px"/>
</reportElement>
<textElement>
<font isBold="true"/>
</textElement>
<text><![CDATA[Total Length:]]></text>
</staticText>
<subreport runToBottom="true">
<reportElement positionType="Float" stretchType="RelativeToTallestObject" isPrintRepeatedValues="false" x="0" y="90" width="595" height="20" printWhenGroupChanges="Group1" uuid="8e2dbcb5-3c3f-4bb5-a606-39f6f2e8656a">
<property name="local_mesure_unity" value="pixel"/>
<property name="com.jaspersoft.studio.unit.y" value="px"/>
<property name="local_mesure_unitx" value="pixel"/>
<property name="com.jaspersoft.studio.unit.x" value="px"/>
</reportElement>
<dataSourceExpression><![CDATA[$F{vehicleReport}]]></dataSourceExpression>
<subreportExpression><![CDATA["vehicleListSubreport.jasper"]]></subreportExpression>
</subreport>
</frame>
</band>
</detail>
<columnFooter>
<band height="6" splitType="Stretch">
<line>
<reportElement positionType="FixRelativeToBottom" x="0" y="0" width="554" height="2" uuid="447d20b2-f65e-42ee-b2a8-69632882c668"/>
<graphicElement>
<pen lineWidth="0.5" lineColor="#999999"/>
</graphicElement>
</line>
</band>
</columnFooter>
<pageFooter>
<band height="25" splitType="Stretch">
<frame>
<reportElement mode="Opaque" x="-21" y="1" width="597" height="24" forecolor="#D0B48E" backcolor="#F2EBDF" uuid="24b6cb4b-7cad-4abd-a159-cc5cc11896db"/>
<textField evaluationTime="Report">
<reportElement style="Column header" x="533" y="0" width="40" height="20" forecolor="#736343" uuid="5463547b-d0a6-440d-baa9-9b1dcce760bf"/>
<textElement verticalAlignment="Middle">
<font size="10" isBold="false"/>
</textElement>
<textFieldExpression><![CDATA[" " + $V{PAGE_NUMBER}]]></textFieldExpression>
</textField>
<textField>
<reportElement style="Column header" x="453" y="0" width="80" height="20" forecolor="#736343" uuid="17310c63-a8e1-4f36-aad6-1b37346d27f6"/>
<textElement textAlignment="Right" verticalAlignment="Middle">
<font size="10" isBold="false"/>
</textElement>
<textFieldExpression><![CDATA["Page "+$V{PAGE_NUMBER}+" of"]]></textFieldExpression>
</textField>
<textField pattern="EEEEE dd MMMMM yyyy">
<reportElement style="Column header" x="22" y="1" width="197" height="20" forecolor="#736343" uuid="340aeee4-0582-45c2-9fbf-f1250cba3f8a"/>
<textElement verticalAlignment="Middle">
<font size="10" isBold="false"/>
</textElement>
<textFieldExpression><![CDATA[new java.util.Date()]]></textFieldExpression>
</textField>
</frame>
</band>
</pageFooter>
<summary>
<band splitType="Stretch"/>
</summary>
</jasperReport>
Try this code.
<?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="X2010" language="groovy" pageWidth="595" pageHeight="842" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="25640552-4299-40b4-8655-a64e83b16458">
<property name="com.jaspersoft.studio.unit." value="pixel"/>
<property name="com.jaspersoft.studio.unit.pageHeight" value="pixel"/>
<property name="com.jaspersoft.studio.unit.pageWidth" value="pixel"/>
<property name="com.jaspersoft.studio.unit.topMargin" value="pixel"/>
<property name="com.jaspersoft.studio.unit.bottomMargin" value="pixel"/>
<property name="com.jaspersoft.studio.unit.leftMargin" value="pixel"/>
<property name="com.jaspersoft.studio.unit.rightMargin" value="pixel"/>
<property name="com.jaspersoft.studio.unit.columnWidth" value="pixel"/>
<property name="com.jaspersoft.studio.unit.columnSpacing" value="pixel"/>
<style name="Title" fontName="Times New Roman" fontSize="50" isBold="true" pdfFontName="Times-Bold"/>
<style name="SubTitle" forecolor="#736343" fontName="Arial" fontSize="18"/>
<style name="Column header" forecolor="#666666" fontName="Arial" fontSize="12" isBold="true"/>
<style name="Detail" fontName="Arial" fontSize="12"/>
<style name="Row" mode="Transparent">
<conditionalStyle>
<conditionExpression><![CDATA[$V{REPORT_COUNT}%2 == 0]]></conditionExpression>
<style backcolor="#E6DAC3"/>
</conditionalStyle>
</style>
<queryString>
<![CDATA[]]>
</queryString>
<field name="trainNumber" class="java.lang.String"/>
<field name="crewReport" class="net.sf.jasperreports.engine.JRDataSource"/>
<field name="trainType" class="java.lang.String"/>
<field name="origin" class="java.lang.String"/>
<field name="dangerousGoods" class="java.lang.Boolean">
<fieldDescription><![CDATA[]]></fieldDescription>
</field>
<field name="outOfGauge" class="java.lang.Boolean"/>
<field name="trainDate" class="java.util.Date"/>
<field name="approvedLength" class="java.lang.Integer"/>
<field name="destination" class="java.lang.String"/>
<field name="specialLoad" class="java.lang.Boolean"/>
<field name="submittedBy" class="java.lang.String"/>
<field name="phone" class="java.lang.String"/>
<field name="submittedAtDateTime" class="java.util.Date"/>
<field name="fax" class="java.lang.String"/>
<field name="numberOfVehicles" class="java.lang.Integer"/>
<field name="tonnesHauled" class="java.lang.String"/>
<field name="tonnesGross" class="java.lang.String"/>
<field name="totalLength" class="java.lang.Double"/>
<field name="locoReport" class="net.sf.jasperreports.engine.JRDataSource"/>
<field name="vehicleReport" class="net.sf.jasperreports.engine.JRDataSource"/>
<field name="railOperatorName" class="java.lang.String"/>
<field name="submitter" class="java.lang.String"/>
<field name="consistLocation" class="java.lang.String"/>
<group name="Group1">
<groupExpression><![CDATA[(int)($V{REPORT_COUNT}/15)]]></groupExpression>
<groupFooter>
<band height="50" splitType="Stretch">
<printWhenExpression><![CDATA[$F{vehicleReport} != null]]></printWhenExpression>
</band>
</groupFooter>
</group>
<group name="Group2">
<groupExpression><![CDATA[(int)($V{REPORT_COUNT}/5)]]></groupExpression>
<groupFooter>
<band height="107" splitType="Stretch"/>
</groupFooter>
</group>
<background>
<band splitType="Stretch"/>
</background>
<title>
<band height="65" splitType="Stretch">
<staticText>
<reportElement style="Title" x="80" y="0" width="472" height="62" uuid="b89a83c9-c1a2-4ab6-85a2-88ba23795dd3"/>
<textElement verticalAlignment="Middle">
<font pdfFontName="Times-Roman"/>
</textElement>
<text><![CDATA[X20.10 Report]]></text>
</staticText>
</band>
</title>
<pageHeader>
<band splitType="Stretch"/>
</pageHeader>
<columnHeader>
<band height="5" splitType="Stretch">
<line>
<reportElement positionType="FixRelativeToBottom" x="1" y="1" width="552" height="2" uuid="f93f01ef-7224-41b8-a330-380bec4336d6"/>
<graphicElement>
<pen lineWidth="0.5" lineColor="#999999"/>
</graphicElement>
</line>
</band>
</columnHeader>
<detail>
<band height="400" splitType="Stretch">
<staticText>
<reportElement x="0" y="120" width="90" height="20" uuid="20c60332-1cff-4218-bfce-57cec3e447dd"/>
<textElement>
<font isBold="true"/>
</textElement>
<text><![CDATA[Train Number:]]></text>
</staticText>
<subreport runToBottom="true">
<reportElement isPrintRepeatedValues="false" x="-20" y="220" width="595" height="45" uuid="4f24664e-5df0-4326-9b95-9939f93c48d4"/>
<dataSourceExpression><![CDATA[$F{crewReport}]]></dataSourceExpression>
<subreportExpression><![CDATA["crewSubreport.jasper"]]></subreportExpression>
</subreport>
<textField>
<reportElement x="90" y="120" width="90" height="20" uuid="110c9328-d33c-4c0a-86e5-7f4ebe669b4f"/>
<textFieldExpression><![CDATA[$F{trainNumber}]]></textFieldExpression>
</textField>
<staticText>
<reportElement x="0" y="90" width="554" height="30" uuid="efaedffc-7d27-40f0-acc1-71797d91472c"/>
<box>
<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 textAlignment="Center">
<font size="18"/>
</textElement>
<text><![CDATA[Train Details]]></text>
</staticText>
<staticText>
<reportElement x="0" y="140" width="90" height="20" uuid="91493735-ab12-4068-9583-9edbbac7ca35"/>
<textElement>
<font isBold="true"/>
</textElement>
<text><![CDATA[Train Type:]]></text>
</staticText>
<staticText>
<reportElement x="0" y="160" width="90" height="20" uuid="a3e483b0-59c4-494c-ad36-1ea30eb4c5f5"/>
<textElement>
<font isBold="true"/>
</textElement>
<text><![CDATA[Origin]]></text>
</staticText>
<staticText>
<reportElement x="0" y="180" width="90" height="20" uuid="f5f23f73-3bdb-4b12-b9ec-d1946d1d249c"/>
<textElement>
<font isBold="true"/>
</textElement>
<text><![CDATA[Dangerous Goods:]]></text>
</staticText>
<staticText>
<reportElement x="0" y="200" width="90" height="20" uuid="49aebc16-13db-4842-bb0f-23eac8f693a4"/>
<textElement>
<font isBold="true"/>
</textElement>
<text><![CDATA[Out of Gauge:]]></text>
</staticText>
<textField>
<reportElement x="90" y="140" width="90" height="20" uuid="ff7d87fc-1087-4edf-b1ed-454ff8ae94f8"/>
<textFieldExpression><![CDATA[$F{trainType}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="90" y="160" width="90" height="20" uuid="7f109b0f-f4f4-48af-9a13-909b766dbd3c"/>
<textFieldExpression><![CDATA[$F{origin}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="90" y="180" width="90" height="20" uuid="67f7fd28-1cee-402d-8a35-523058ab5061"/>
<textFieldExpression><![CDATA[$F{dangerousGoods} ? "Yes" : "No"]]></textFieldExpression>
</textField>
<textField>
<reportElement x="90" y="200" width="90" height="20" uuid="82586e0e-b6a7-43cf-9b1f-a12612396909"/>
<textFieldExpression><![CDATA[$F{outOfGauge} ? "Yes" : "No"]]></textFieldExpression>
</textField>
<staticText>
<reportElement x="280" y="120" width="100" height="20" uuid="94651700-a070-400e-a206-fd09170cf797"/>
<textElement>
<font isBold="true"/>
</textElement>
<text><![CDATA[Train Date:]]></text>
</staticText>
<textField pattern="dd/MM/yyyy">
<reportElement x="380" y="120" width="100" height="20" uuid="2ea29a18-1d85-4a23-b9f6-17459ceafe0d"/>
<textFieldExpression><![CDATA[$F{trainDate}]]></textFieldExpression>
</textField>
<staticText>
<reportElement x="280" y="140" width="100" height="20" uuid="3ffe5495-6b91-424b-b652-c48c72b39a8f"/>
<textElement>
<font isBold="true"/>
</textElement>
<text><![CDATA[Approved Length:]]></text>
</staticText>
<staticText>
<reportElement x="280" y="160" width="100" height="20" uuid="68bcc4c2-d6c0-426b-979c-c70bbd1c550c"/>
<textElement>
<font isBold="true"/>
</textElement>
<text><![CDATA[Destination:]]></text>
</staticText>
<staticText>
<reportElement x="280" y="180" width="100" height="20" uuid="83e83257-d581-4fdd-8955-ef281357aaae"/>
<textElement>
<font isBold="true"/>
</textElement>
<text><![CDATA[Special Load:]]></text>
</staticText>
<textField>
<reportElement x="380" y="140" width="100" height="20" uuid="0f1b2cf0-73a3-4106-904a-8a28b7717909"/>
<textFieldExpression><![CDATA[$F{approvedLength}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="380" y="160" width="100" height="20" uuid="7a006853-a10a-4759-889f-b9848a59d79b"/>
<textFieldExpression><![CDATA[$F{destination}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="380" y="180" width="100" height="20" uuid="521136d0-a51f-4ca1-bdce-6d0ed1cd5c76"/>
<textFieldExpression><![CDATA[$F{specialLoad} ? "Yes" : "No"]]></textFieldExpression>
</textField>
<textField>
<reportElement x="90" y="50" width="90" height="20" uuid="36b52f46-6f49-4c75-88d0-27a221bc62ec"/>
<textFieldExpression><![CDATA[$F{submittedBy}]]></textFieldExpression>
</textField>
<staticText>
<reportElement x="0" y="50" width="90" height="20" uuid="2cad93ef-d94f-4479-93e7-7a232023dace"/>
<textElement>
<font isBold="true"/>
</textElement>
<text><![CDATA[Submitted By:]]></text>
</staticText>
<staticText>
<reportElement x="0" y="70" width="90" height="20" uuid="90474202-ce8b-4657-bad1-71edc8557335"/>
<text><![CDATA[Phone:]]></text>
</staticText>
<textField>
<reportElement x="90" y="70" width="90" height="20" uuid="20d6f136-62e4-4332-9098-3355896ff4af"/>
<textFieldExpression><![CDATA[$F{phone}]]></textFieldExpression>
</textField>
<textField pattern="dd/MM/yyyy HH:mm">
<reportElement x="380" y="50" width="174" height="20" uuid="540bcba3-93ee-4877-b5a8-6f58db7c7398"/>
<textFieldExpression><![CDATA[$F{submittedAtDateTime}]]></textFieldExpression>
</textField>
<staticText>
<reportElement x="280" y="50" width="100" height="20" uuid="957ce926-9636-4625-b91f-78ecd3b8a200"/>
<textElement>
<font isBold="true"/>
</textElement>
<text><![CDATA[Submitted At:]]></text>
</staticText>
<staticText>
<reportElement x="280" y="70" width="100" height="20" uuid="d8cf6e8b-9664-4012-b51d-6cdea49faf22"/>
<text><![CDATA[Fax:]]></text>
</staticText>
<textField>
<reportElement x="380" y="70" width="174" height="20" uuid="cc95ebda-f955-4eaf-9314-45e4a56c4fde"/>
<textFieldExpression><![CDATA[$F{fax}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="0" y="0" width="554" height="50" uuid="f7c297a9-e14e-44de-8769-5d483cfe4863"/>
<textElement textAlignment="Center">
<font size="14" isBold="true"/>
</textElement>
<textFieldExpression><![CDATA["Consist for " + $F{railOperatorName} + " submitted by " + $F{submitter} + "\nConsist Location: " + $F{consistLocation}]]></textFieldExpression>
</textField>
<subreport runToBottom="true">
<reportElement positionType="Float" stretchType="RelativeToTallestObject" isPrintRepeatedValues="false" x="50" y="330" width="130" height="20" uuid="4f470a33-ef93-425d-951e-e53642df7771"/>
<dataSourceExpression><![CDATA[$F{locoReport}]]></dataSourceExpression>
<subreportExpression><![CDATA["locoSubreport.jasper"]]></subreportExpression>
</subreport>
<textField pattern="#0.00#;(#0.00#-)">
<reportElement positionType="Float" isPrintRepeatedValues="false" x="460" y="310" width="80" height="20" uuid="f182c7db-f00f-4107-bc33-93b30faf11a9"/>
<textFieldExpression><![CDATA[$F{totalLength}]]></textFieldExpression>
</textField>
<textField pattern="#0.00#;(#0.00#-)">
<reportElement positionType="Float" isPrintRepeatedValues="false" x="280" y="310" width="80" height="20" uuid="c5f34099-ac0e-4634-9398-a96f93c052f6"/>
<textFieldExpression><![CDATA[$F{tonnesHauled}]]></textFieldExpression>
</textField>
<staticText>
<reportElement positionType="Float" isPrintRepeatedValues="false" x="190" y="330" width="80" height="20" uuid="824478e7-fc00-4d16-8a39-6355baf4bc61"/>
<textElement>
<font isBold="true"/>
</textElement>
<text><![CDATA[Tonnes Gross:]]></text>
</staticText>
<staticText>
<reportElement positionType="Float" isPrintRepeatedValues="false" x="190" y="310" width="80" height="20" uuid="e0bc266a-56f2-4246-bea6-f31c4718046d"/>
<textElement>
<font isBold="true"/>
</textElement>
<text><![CDATA[Tonnes Hauled:]]></text>
</staticText>
<textField pattern="#0.00#;(#0.00#-)">
<reportElement positionType="Float" isPrintRepeatedValues="false" x="280" y="330" width="80" height="20" uuid="74e9ef61-e6e0-45fa-9966-9950c2f5a1e0"/>
<textFieldExpression><![CDATA[$F{tonnesGross}]]></textFieldExpression>
</textField>
<textField>
<reportElement positionType="Float" isPrintRepeatedValues="false" x="100" y="310" width="80" height="20" uuid="86833b59-3fe2-4c50-8d8e-18d80e082f75"/>
<textFieldExpression><![CDATA[$F{numberOfVehicles}]]></textFieldExpression>
</textField>
<staticText>
<reportElement positionType="Float" isPrintRepeatedValues="false" x="0" y="330" width="40" height="20" uuid="c08f0b3c-0ddf-4cbb-b377-1f48b80fa383"/>
<textElement>
<font isBold="true"/>
</textElement>
<text><![CDATA[Locos:]]></text>
</staticText>
<staticText>
<reportElement positionType="Float" isPrintRepeatedValues="false" x="0" y="310" width="90" height="20" uuid="6a4a5d4b-5762-45d2-b54f-2167af8da5f8"/>
<textElement>
<font isBold="true"/>
</textElement>
<text><![CDATA[Number Vehicles:]]></text>
</staticText>
<staticText>
<reportElement positionType="Float" isPrintRepeatedValues="false" x="1" y="270" width="551" height="35" uuid="53e5c946-8e6d-44fa-8715-f193d224b489"/>
<box>
<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 textAlignment="Center">
<font size="18"/>
</textElement>
<text><![CDATA[Train Summary]]></text>
</staticText>
<staticText>
<reportElement positionType="Float" isPrintRepeatedValues="false" x="370" y="310" width="80" height="20" uuid="31012f66-602d-4892-82f4-d1187915046e"/>
<textElement>
<font isBold="true"/>
</textElement>
<text><![CDATA[Total Length:]]></text>
</staticText>
<subreport runToBottom="true">
<reportElement positionType="Float" stretchType="RelativeToTallestObject" isPrintRepeatedValues="false" x="-20" y="360" width="595" height="20" printWhenGroupChanges="Group1" uuid="8e2dbcb5-3c3f-4bb5-a606-39f6f2e8656a"/>
<dataSourceExpression><![CDATA[$F{vehicleReport}]]></dataSourceExpression>
<subreportExpression><![CDATA["vehicleListSubreport.jasper"]]></subreportExpression>
</subreport>
</band>
</detail>
<columnFooter>
<band height="6" splitType="Stretch">
<line>
<reportElement positionType="FixRelativeToBottom" x="0" y="0" width="554" height="2" uuid="447d20b2-f65e-42ee-b2a8-69632882c668"/>
<graphicElement>
<pen lineWidth="0.5" lineColor="#999999"/>
</graphicElement>
</line>
</band>
</columnFooter>
<pageFooter>
<band height="25" splitType="Stretch">
<frame>
<reportElement mode="Opaque" x="-21" y="1" width="597" height="24" forecolor="#D0B48E" backcolor="#F2EBDF" uuid="24b6cb4b-7cad-4abd-a159-cc5cc11896db"/>
<textField evaluationTime="Report">
<reportElement style="Column header" x="533" y="0" width="40" height="20" forecolor="#736343" uuid="5463547b-d0a6-440d-baa9-9b1dcce760bf"/>
<textElement verticalAlignment="Middle">
<font size="10" isBold="false"/>
</textElement>
<textFieldExpression><![CDATA[" " + $V{PAGE_NUMBER}]]></textFieldExpression>
</textField>
<textField>
<reportElement style="Column header" x="453" y="0" width="80" height="20" forecolor="#736343" uuid="17310c63-a8e1-4f36-aad6-1b37346d27f6"/>
<textElement textAlignment="Right" verticalAlignment="Middle">
<font size="10" isBold="false"/>
</textElement>
<textFieldExpression><![CDATA["Page "+$V{PAGE_NUMBER}+" of"]]></textFieldExpression>
</textField>
<textField pattern="EEEEE dd MMMMM yyyy">
<reportElement style="Column header" x="22" y="1" width="197" height="20" forecolor="#736343" uuid="340aeee4-0582-45c2-9fbf-f1250cba3f8a"/>
<textElement verticalAlignment="Middle">
<font size="10" isBold="false"/>
</textElement>
<textFieldExpression><![CDATA[new java.util.Date()]]></textFieldExpression>
</textField>
</frame>
</band>
</pageFooter>
<summary>
<band splitType="Stretch"/>
</summary>
</jasperReport>
I am using jasper report in my liferay custom portlet and i designed my report with ireport 4.7.1 but my problem is why there is vast diffrence in the reports generated with html and with pdf..there is lots of diffrence in rows of reports in html format and pdf format..how can i make both the html and pdf report generated from same jasper file as identical.?i mean with same look and feel..
following are my snippet of html and pdf report
HTML REPORT
PDF REPORT
following is my jrxml file from which i generate .jasper and then generating above two result.
<?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="Campaign_Advertise_DateRange_Report" language="groovy" pageWidth="595" pageHeight="842" whenNoDataType="AllSectionsNoDetail" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" isIgnorePagination="true">
<property name="ireport.zoom" value="0.9090909090909098"/>
<property name="ireport.x" value="0"/>
<property name="ireport.y" value="0"/>
<style name="table">
<box>
<pen lineWidth="1.0" lineColor="#000000"/>
</box>
</style>
<style name="table_TH" mode="Opaque" backcolor="#F0F8FF">
<box>
<pen lineWidth="0.5" lineColor="#000000"/>
</box>
</style>
<style name="table_CH" mode="Opaque" backcolor="#BFE1FF">
<box>
<pen lineWidth="0.5" lineColor="#000000"/>
</box>
</style>
<style name="table_TD" mode="Opaque" backcolor="#FFFFFF">
<box>
<pen lineWidth="0.5" lineColor="#000000"/>
</box>
</style>
<subDataset name="Table Dataset 1"/>
<field name="advertisename" class="java.lang.String"/>
<field name="camp_name" class="java.lang.String"/>
<field name="ad_location" class="java.lang.String"/>
<field name="clicked" class="java.lang.Integer"/>
<field name="impression" class="java.lang.Integer"/>
<field name="filter_start_date" class="java.util.Date"/>
<field name="filter_end_date" class="java.util.Date"/>
<variable name="CamapignTotal" class="java.lang.Integer" resetType="Group" resetGroup="Campaign Name" calculation="Sum">
<variableExpression><![CDATA[$F{impression}]]></variableExpression>
</variable>
<variable name="CampaignGrandTotal" class="java.lang.Integer" calculation="Sum">
<variableExpression><![CDATA[$F{impression}]]></variableExpression>
</variable>
<group name="Campaign Name">
<groupExpression><![CDATA[$F{camp_name}]]></groupExpression>
<groupFooter>
<band height="21">
<textField pattern="" isBlankWhenNull="true">
<reportElement style="table_TD" x="419" y="0" width="86" height="20"/>
<textElement textAlignment="Center" verticalAlignment="Middle" markup="none">
<font isBold="true"/>
</textElement>
<textFieldExpression><![CDATA[$V{CamapignTotal}]]></textFieldExpression>
</textField>
<staticText>
<reportElement style="table_TD" x="346" y="0" width="73" height="20"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font isBold="true"/>
</textElement>
<text><![CDATA[Group Total :]]></text>
</staticText>
</band>
</groupFooter>
</group>
<background>
<band splitType="Stretch"/>
</background>
<title>
<band height="114">
<staticText>
<reportElement x="136" y="24" width="283" height="67"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="32" isUnderline="true"/>
</textElement>
<text><![CDATA[Campaign Reports]]></text>
</staticText>
<staticText>
<reportElement x="0" y="2" width="30" height="20"/>
<textElement>
<font fontName="Times New Roman" isBold="true"/>
</textElement>
<text><![CDATA[Date : ]]></text>
</staticText>
<textField pattern="MM/dd/yyyy">
<reportElement x="30" y="2" width="100" height="20"/>
<textElement textAlignment="Justified">
<font fontName="Times New Roman" isUnderline="true"/>
</textElement>
<textFieldExpression><![CDATA[new java.util.Date()]]></textFieldExpression>
</textField>
<staticText>
<reportElement x="0" y="94" width="30" height="20"/>
<textElement textAlignment="Right">
<font isBold="true"/>
</textElement>
<text><![CDATA[From:]]></text>
</staticText>
<staticText>
<reportElement x="136" y="94" width="19" height="20"/>
<textElement textAlignment="Right">
<font isBold="true"/>
</textElement>
<text><![CDATA[To:]]></text>
</staticText>
<textField>
<reportElement x="30" y="94" width="96" height="20"/>
<textElement/>
<textFieldExpression><![CDATA[$F{filter_start_date}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="155" y="94" width="100" height="20"/>
<textElement/>
<textFieldExpression><![CDATA[$F{filter_end_date}]]></textFieldExpression>
</textField>
<staticText>
<reportElement x="419" y="94" width="131" height="20"/>
<textElement textAlignment="Right">
<font size="12" isBold="true"/>
</textElement>
<text><![CDATA[Advertise Display Reports]]></text>
</staticText>
<image>
<reportElement x="458" y="8" width="92" height="53"/>
<imageExpression><![CDATA["D:\\Liferay\\liferay-plugins-sdk-6.1.1-ce-ga2-20120731132656558\\liferay-plugins-sdk-6.1.1\\portlets\\eMenuAdvertise-portlet\\docroot\\img\\eMenuLogo.png"]]></imageExpression>
</image>
</band>
</title>
<pageHeader>
<band height="52">
<staticText>
<reportElement style="table_TD" mode="Transparent" x="0" y="31" width="100" height="20"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font fontName="Times New Roman" size="12" isBold="true"/>
</textElement>
<text><![CDATA[Advertise Name]]></text>
</staticText>
<staticText>
<reportElement style="table_TD" mode="Transparent" x="346" y="31" width="73" height="20"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font fontName="Times New Roman" size="12" isBold="true"/>
</textElement>
<text><![CDATA[Clicked]]></text>
</staticText>
<staticText>
<reportElement style="table_TD" mode="Transparent" x="250" y="31" width="96" height="20" isPrintInFirstWholeBand="true"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font fontName="Times New Roman" size="12" isBold="true"/>
</textElement>
<text><![CDATA[AD Location]]></text>
</staticText>
<staticText>
<reportElement style="table_TD" mode="Transparent" x="100" y="31" width="150" height="20"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font fontName="Times New Roman" size="12" isBold="true"/>
</textElement>
<text><![CDATA[Campaign Name]]></text>
</staticText>
<staticText>
<reportElement style="table_TD" mode="Transparent" x="419" y="31" width="86" height="20"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font fontName="Times New Roman" size="12" isBold="true"/>
</textElement>
<text><![CDATA[Impression]]></text>
</staticText>
</band>
</pageHeader>
<detail>
<band height="21" splitType="Immediate">
<textField>
<reportElement style="table_TD" mode="Transparent" x="0" y="-1" width="100" height="22"/>
<textElement textAlignment="Center" verticalAlignment="Middle" markup="html">
<font fontName="Times New Roman"/>
</textElement>
<textFieldExpression><![CDATA[$F{advertisename}]]></textFieldExpression>
</textField>
<textField>
<reportElement style="table_TD" mode="Transparent" x="250" y="-1" width="96" height="22" backcolor="#FFFFFF"/>
<textElement textAlignment="Center" verticalAlignment="Middle" markup="html">
<font fontName="Times New Roman"/>
</textElement>
<textFieldExpression><![CDATA[$F{ad_location}]]></textFieldExpression>
</textField>
<textField>
<reportElement style="table_TD" mode="Transparent" x="419" y="-1" width="86" height="22"/>
<textElement textAlignment="Center" verticalAlignment="Middle" markup="html">
<font fontName="Times New Roman"/>
</textElement>
<textFieldExpression><![CDATA[$F{impression}]]></textFieldExpression>
</textField>
<textField>
<reportElement style="table_TD" mode="Transparent" x="100" y="-1" width="150" height="22"/>
<textElement textAlignment="Center" verticalAlignment="Middle" markup="html">
<font fontName="Times New Roman"/>
</textElement>
<textFieldExpression><![CDATA[$F{camp_name}]]></textFieldExpression>
</textField>
<textField>
<reportElement style="table_TD" mode="Transparent" x="346" y="-1" width="73" height="22"/>
<textElement textAlignment="Center" verticalAlignment="Middle" markup="html">
<font fontName="Times New Roman"/>
</textElement>
<textFieldExpression><![CDATA[$F{clicked}]]></textFieldExpression>
</textField>
</band>
</detail>
<lastPageFooter>
<band height="50">
<staticText>
<reportElement style="table_TD" x="346" y="0" width="73" height="20"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font isBold="true"/>
</textElement>
<text><![CDATA[Grand Total :]]></text>
</staticText>
<textField isBlankWhenNull="false">
<reportElement style="table_TD" x="419" y="0" width="86" height="20"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font isBold="true"/>
</textElement>
<textFieldExpression><![CDATA[$V{CampaignGrandTotal}]]></textFieldExpression>
</textField>
</band>
</lastPageFooter>
</jasperReport>
Can any one help me out to make both reports look and feel same ?
The problem in your report seems to be the height of the elements in the Detail Band, they're 22 pixels, and the band is 21, also their top property is -1, i recommend you to make the band bigger (or your controls smaller) and set the Top property to 0, or any positive value.