<?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="BOL1_subreport1"  pageWidth="572" pageHeight="752" columnWidth="555" leftMargin="0" rightMargin="0" topMargin="0" bottomMargin="0">
	<property name="ireport.zoom" value="1.0000000000000062"/>
	<property name="ireport.x" value="0"/>
	<property name="ireport.y" value="0"/>
	<parameter name="DESP_DESP_ID" class="java.lang.String"/>
	<queryString>
		<![CDATA[SELECT
		CASE WHEN O.CUST_PORD IS NULL THEN ' ' ELSE O.CUST_PORD END AS CUST_PORD,
		CASE WHEN DD.NO_ART IS NULL THEN 0 ELSE DD.NO_ART END AS NO_ART,
		CASE WHEN DD.NETT_WEIGHT  IS NULL THEN 0 ELSE DD.NETT_WEIGHT END AS NETT_WEIGHT,
		CASE WHEN DD.SORD_NO IS NULL THEN ' ' ELSE D.SORD_NO END AS SORD_NO,
		CASE WHEN D.WAVE_ID IS NULL THEN ' ' ELSE D.WAVE_ID END AS WAVE_ID
FROM
		SORDER O,DESPATCH D, DESPATCHDET DD
WHERE
        D.DESP_ID = $P{DESP_DESP_ID}
		 AND D.DESP_ID = DD.DESP_ID
	 	 AND D.SORD_NO = O.SALE_ORDER]]>
	</queryString>
	<field name="CUST_PORD" class="java.lang.String"/>
	<field name="NO_ART" class="java.lang.String"/>
	<field name="NETT_WEIGHT" class="java.lang.String"/>
	<field name="SORD_NO" class="java.lang.String"/>
	<field name="WAVE_ID" class="java.lang.String"/>
	<variable name="NO_ART_1" class="java.lang.String" resetType="Group" resetGroup="GRAND_TOTAL" calculation="Sum">
		<variableExpression><![CDATA[$F{NO_ART}]]></variableExpression>
	</variable>
	<variable name="NETT_WEIGHT_1" class="java.lang.String" resetType="Group" resetGroup="GRAND_TOTAL" calculation="Sum">
		<variableExpression><![CDATA[$F{NETT_WEIGHT}]]></variableExpression>
	</variable>
	<group name="GRAND_TOTAL">
		<groupExpression><![CDATA[$F{SORD_NO}]]></groupExpression>
		<groupFooter>
			<band height="32">
				<rectangle>
					<reportElement mode="Transparent" x="5" y="0" width="559" height="15"/>
				</rectangle>
				<line>
					<reportElement x="207" y="-2" width="1" height="18"/>
				</line>
				<line direction="BottomUp">
					<reportElement x="166" y="16" width="1" height="16"/>
				</line>
				<line>
					<reportElement x="366" y="1" width="1" height="15"/>
				</line>
				<staticText>
					<reportElement x="25" y="17" width="100" height="15"/>
					<textElement>
						<font fontName="Arial" size="10" isBold="true"/>
					</textElement>
					<text><![CDATA[GRAND TOTAL]]></text>
				</staticText>
				<line direction="BottomUp">
					<reportElement x="207" y="16" width="1" height="16"/>
				</line>
				<line>
					<reportElement x="166" y="0" width="1" height="16"/>
				</line>
				<line>
					<reportElement x="274" y="-2" width="1" height="17"/>
				</line>
				<line direction="BottomUp">
					<reportElement x="5" y="15" width="1" height="17"/>
				</line>
				<rectangle>
					<reportElement x="274" y="16" width="290" height="15" backcolor="#AD9CA4"/>
				</rectangle>
				<line>
					<reportElement x="321" y="0" width="1" height="16"/>
				</line>
				<staticText>
					<reportElement x="333" y="3" width="8" height="10"/>
					<textElement>
						<font fontName="Arial" size="8" isBold="true"/>
					</textElement>
					<text><![CDATA[N]]></text>
				</staticText>
				<staticText>
					<reportElement x="293" y="3" width="8" height="10"/>
					<textElement>
						<font fontName="Arial" size="8" isBold="true"/>
					</textElement>
					<text><![CDATA[Y]]></text>
				</staticText>
				<line>
					<reportElement x="5" y="31" width="269" height="1"/>
				</line>
				<textField>
					<reportElement x="165" y="18" width="40" height="12"/>
					<textElement textAlignment="Right">
						<font fontName="Arial"/>
					</textElement>
					<textFieldExpression><![CDATA[$V{NO_ART_1}.equals(null)?"":$V{NO_ART_1}]]></textFieldExpression>
				</textField>
				<textField>
					<reportElement x="210" y="17" width="60" height="12"/>
					<textElement textAlignment="Right">
						<font fontName="Arial"/>
					</textElement>
					<textFieldExpression><![CDATA[$V{NETT_WEIGHT_1}.equals(null)?"":$V{NETT_WEIGHT_1}]]></textFieldExpression>
				</textField>
			</band>
		</groupFooter>
	</group>
	<background>
		<band splitType="Stretch"/>
	</background>
	<title>
		<band splitType="Stretch"/>
	</title>
	<pageHeader>
		<band splitType="Stretch"/>
	</pageHeader>
	<columnHeader>
		<band height="52" splitType="Stretch">
			<staticText>
				<reportElement x="218" y="20" width="50" height="15"/>
				<textElement textAlignment="Center">
					<font fontName="Arial" size="9" isBold="true"/>
				</textElement>
				<text><![CDATA[WEIGHT]]></text>
			</staticText>
			<staticText>
				<reportElement mode="Opaque" x="5" y="0" width="560" height="15" forecolor="#FEFEFE" backcolor="#010101"/>
				<textElement textAlignment="Center" verticalAlignment="Middle">
					<font fontName="Arial" size="8" isBold="true"/>
				</textElement>
				<text><![CDATA[CUSTOMER ORDER INFORMATION]]></text>
			</staticText>
			<staticText>
				<reportElement x="170" y="20" width="30" height="25"/>
				<textElement textAlignment="Center">
					<font fontName="Arial" size="9" isBold="true"/>
				</textElement>
				<text><![CDATA[# PKGS]]></text>
			</staticText>
			<staticText>
				<reportElement x="377" y="20" width="150" height="15"/>
				<textElement textAlignment="Center">
					<font fontName="Arial" size="9" isBold="true"/>
				</textElement>
				<text><![CDATA[ADDITIONAL SHIPPER INFO]]></text>
			</staticText>
			<line direction="BottomUp">
				<reportElement x="207" y="15" width="1" height="37"/>
			</line>
			<staticText>
				<reportElement x="10" y="20" width="150" height="15"/>
				<textElement textAlignment="Center">
					<font fontName="Arial" size="9" isBold="true"/>
				</textElement>
				<text><![CDATA[CUSTOMER ORDER NUMBER]]></text>
			</staticText>
			<line direction="BottomUp">
				<reportElement x="274" y="15" width="1" height="37"/>
			</line>
			<line direction="BottomUp">
				<reportElement x="5" y="15" width="1" height="37"/>
			</line>
			<line direction="BottomUp">
				<reportElement x="166" y="15" width="1" height="37"/>
			</line>
			<staticText>
				<reportElement x="283" y="20" width="70" height="15"/>
				<textElement textAlignment="Center">
					<font fontName="Arial" size="9" isBold="true"/>
				</textElement>
				<text><![CDATA[PALLET/SLIP]]></text>
			</staticText>
			<line direction="BottomUp">
				<reportElement x="564" y="15" width="1" height="37"/>
			</line>
			<staticText>
				<reportElement x="297" y="33" width="50" height="15"/>
				<textElement textAlignment="Center">
					<font fontName="Arial" size="6" isBold="false"/>
				</textElement>
				<text><![CDATA[(CIRCLE ONE)]]></text>
			</staticText>
			<line direction="BottomUp">
				<reportElement x="366" y="15" width="1" height="37"/>
			</line>
		</band>
	</columnHeader>
	<detail>
		<band height="15" splitType="Stretch">
			<rectangle>
				<reportElement mode="Transparent" x="5" y="0" width="559" height="15"/>
			</rectangle>
			<textField>
				<reportElement x="464" y="1" width="96" height="12"/>
				<textElement>
					<font fontName="Arial"/>
				</textElement>
				<textFieldExpression><![CDATA[$F{WAVE_ID}]]></textFieldExpression>
			</textField>
			<textField>
				<reportElement x="214" y="1" width="56" height="12"/>
				<textElement textAlignment="Right">
					<font fontName="Arial"/>
				</textElement>
				<textFieldExpression><![CDATA[$F{NETT_WEIGHT}.equals(null)?" ":$F{NETT_WEIGHT}]]></textFieldExpression>
			</textField>
			<staticText>
				<reportElement x="333" y="2" width="8" height="10"/>
				<textElement>
					<font fontName="Arial" size="8" isBold="true"/>
				</textElement>
				<text><![CDATA[N]]></text>
			</staticText>
			<staticText>
				<reportElement x="293" y="2" width="8" height="10"/>
				<textElement>
					<font fontName="Arial" size="8" isBold="true"/>
				</textElement>
				<text><![CDATA[Y]]></text>
			</staticText>
			<textField>
				<reportElement x="168" y="2" width="35" height="12"/>
				<textElement textAlignment="Right">
					<font fontName="Arial"/>
				</textElement>
				<textFieldExpression><![CDATA[$F{NO_ART}.equals(null)?" ":$F{NO_ART}]]></textFieldExpression>
			</textField>
			<textField>
				<reportElement x="368" y="1" width="92" height="12"/>
				<textElement textAlignment="Center">
					<font fontName="Arial"/>
				</textElement>
				<textFieldExpression><![CDATA[$F{SORD_NO}]]></textFieldExpression>
			</textField>
			<textField>
				<reportElement x="10" y="1" width="142" height="12"/>
				<textElement textAlignment="Center">
					<font fontName="Arial"/>
				</textElement>
				<textFieldExpression><![CDATA[$F{CUST_PORD}]]></textFieldExpression>
			</textField>
			<line>
				<reportElement x="207" y="0" width="1" height="15"/>
			</line>
			<line>
				<reportElement x="166" y="0" width="1" height="15"/>
			</line>
			<line>
				<reportElement x="366" y="0" width="1" height="15"/>
			</line>
			<line>
				<reportElement x="274" y="0" width="1" height="15"/>
			</line>
			<line>
				<reportElement x="321" y="0" width="1" height="15"/>
			</line>
		</band>
	</detail>
	<columnFooter>
		<band splitType="Stretch"/>
	</columnFooter>
	<pageFooter>
		<band splitType="Stretch"/>
	</pageFooter>
	<summary>
		<band splitType="Stretch"/>
	</summary>
</jasperReport>
