我有一个包含三个子报告的主报告,名为“vehicleListSubReport.jrxml”,“locoSubreport.jrxml”和“crewSubreport.jrxml”他们的数据源是“vehicleReport”,“locoReport”和“crewReport”字段分别是JRDataSource类型的所有对象。
我遇到了一些问题,但我觉得他们可能只有一个根本原因,因此我在同一个问题上询问这些问题。首先,代码:
<?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>
第一个问题:crewSubreport下面有其他报告元素,包括其他两个子报告。如果此子报告中有多个记录,则会在其下方的元素之上呈现,包括其他子报告。
第二个问题:crewSubreport下面的数据文本字段正在渲染(尽管子报表呈现在它们之上),但是,静态文本框的标签为“Train Summary”,“Number Vehicles:”,“Tonnes Hauled” :“,”总长度:“,”Locos:“和”Tonnes Gross:“没有渲染,我还无法确定原因。
第三个问题:与第一个问题类似,locoSubreport正在渲染到vehicleListSubreport占用的空间。
如何解决这些问题?
编辑:发布以下内容以说明我目前为止唯一的答案:
在内存使用情况和CPU使用率图表中,左边的小峰是运行我设计的报告。之后的图表的其余部分是当我运行答案中设计的报告时发生的情况。它继续这样,直到垃圾收集器似乎放弃并杀死线程。生成此报告是此时程序正在执行的唯一操作。使用VisualVM强制JVM执行完整的垃圾回收不会回收任何内存。在我看来,当使用positionType =“Float”时,Jasper Reports中存在问题,我需要一个不会触发此问题的解决方案。
答案 0 :(得分:1)
尝试此代码(所有belove第一个子报告都在一个框架中,因此将它们全部移动可能会减少cpu密集度):
<?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>
答案 1 :(得分:0)
试试这段代码。
<?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>