<?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="shippers_Expo_page2" pageWidth="595" pageHeight="840" columnWidth="595" leftMargin="0" rightMargin="0" topMargin="0" bottomMargin="0">
	<property name="ireport.x" value="0"/>
	<property name="ireport.y" value="58"/>
	<property name="ireport.zoom" value="1.5"/>
	<parameter name="SUBREPORT_DIR" class="java.lang.String" isForPrompting="false">
		<defaultValueExpression><![CDATA["."]]></defaultValueExpression>
	</parameter>
	<parameter name="DespId" class="java.lang.String"/>
	<queryString>
		<![CDATA[SELECT
DISTINCT
     case when SORDER."COUNT_CODE__DLV" is null then ' 'else SORDER."COUNT_CODE__DLV" end AS SORDER_COUNT_CODE__DLV,
     case when TRANSPORTER."TRANSPORTER_TYPE" is null then ' 'else TRANSPORTER."TRANSPORTER_TYPE" end AS TRANSPORTER_TRANSPORTER_TYPE
FROM
     "TRANSPORTER" TRANSPORTER,
     "SORDER" SORDER,
     "DESPATCH" DESPATCH,
     WAVE_TASK_DET
WHERE
      TRANSPORTER."TRAN_CODE" = SORDER."TRAN_CODE"
     AND SORDER."SALE_ORDER" =  DESPATCH."SORD_NO"
    AND DESPATCH."DESP_ID" = WAVE_TASK_DET.REF_ID
     AND trim(DESPATCH."DESP_ID") = trim('$P!{DespId}')]]>
	</queryString>
	<field name="SORDER_COUNT_CODE__DLV" class="java.lang.String"/>
	<field name="TRANSPORTER_TRANSPORTER_TYPE" class="java.lang.String"/>
	<variable name="variable1" class="java.lang.Double">
		<variableExpression><![CDATA[new java.lang.Double($V{REPORT_COUNT}.intValue())]]></variableExpression>
		<initialValueExpression><![CDATA[new Double(2)]]></initialValueExpression>
	</variable>
	<variable name="variable2" class="java.lang.Double" incrementType="Page">
		<variableExpression><![CDATA[new java.lang.Double($V{PAGE_NUMBER}.intValue())]]></variableExpression>
		<initialValueExpression><![CDATA[new Double(2)]]></initialValueExpression>
	</variable>
	<background>
		<band splitType="Stretch"/>
	</background>
	<title>
		<band splitType="Stretch"/>
	</title>
	<pageHeader>
		<band height="175" splitType="Stretch">
			<line>
				<reportElement x="40" y="174" width="555" height="1">
					<printWhenExpression><![CDATA[new Boolean (false)]]></printWhenExpression>
				</reportElement>
			</line>
			<textField isBlankWhenNull="false">
				<reportElement x="84" y="107" width="123" height="10">
					<printWhenExpression><![CDATA[new Boolean(true)]]></printWhenExpression>
				</reportElement>
				<textElement textAlignment="Left" verticalAlignment="Bottom">
					<font size="6"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{SORDER_COUNT_CODE__DLV}]]></textFieldExpression>
			</textField>
			<textField isBlankWhenNull="false">
				<reportElement x="84" y="64" width="123" height="10">
					<printWhenExpression><![CDATA[new Boolean(true)]]></printWhenExpression>
				</reportElement>
				<textElement textAlignment="Center" verticalAlignment="Middle">
					<font size="5"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{TRANSPORTER_TRANSPORTER_TYPE}]]></textFieldExpression>
			</textField>
			<textField pattern="###0">
				<reportElement x="447" y="64" width="30" height="10"/>
				<textElement>
					<font size="7"/>
				</textElement>
				<textFieldExpression class="java.lang.Double"><![CDATA[$V{variable1}]]></textFieldExpression>
			</textField>
			<textField pattern="###0">
				<reportElement x="489" y="64" width="32" height="10"/>
				<textElement>
					<font size="7"/>
				</textElement>
				<textFieldExpression class="java.lang.Double"><![CDATA[$V{variable2}]]></textFieldExpression>
			</textField>
			<subreport>
				<reportElement x="19" y="174" width="529" height="0"/>
				<parametersMapExpression><![CDATA[$P{REPORT_PARAMETERS_MAP}]]></parametersMapExpression>
				<connectionExpression><![CDATA[$P{REPORT_CONNECTION}]]></connectionExpression>
				<subreportExpression class="java.io.InputStream"><![CDATA[new FileInputStream("/data/jboss-5.1.0.GA/server/default/deploy/ibase.ear/ibase.war/webitm/reports/jrxml/shippers_Expo_subrep_PG2.jasper")]]></subreportExpression>
			</subreport>
		</band>
	</pageHeader>
	<columnHeader>
		<band splitType="Stretch"/>
	</columnHeader>
	<detail>
		<band height="9" splitType="Stretch"/>
	</detail>
	<columnFooter>
		<band splitType="Stretch"/>
	</columnFooter>
	<pageFooter>
		<band height="175" splitType="Stretch">
			<subreport runToBottom="true">
				<reportElement isPrintRepeatedValues="false" x="19" y="162" width="553" height="0"/>
				<parametersMapExpression><![CDATA[$P{REPORT_PARAMETERS_MAP}]]></parametersMapExpression>
				<connectionExpression><![CDATA[$P{REPORT_CONNECTION}]]></connectionExpression>
				<subreportExpression class="java.io.InputStream"><![CDATA[new FileInputStream("/data/jboss-5.1.0.GA/server/default/deploy/ibase.ear/ibase.war/webitm/reports/jrxml/shippers_Expo_subreport1_tot.jasper")]]></subreportExpression>
			</subreport>
		</band>
	</pageFooter>
	<summary>
		<band height="1" splitType="Stretch"/>
	</summary>
</jasperReport>
