<?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="BOL_Manual_subreport1" pageWidth="612" pageHeight="792" 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 shipment_id,
CASE WHEN NO_ART IS NULL OR LENGTH(TRIM(NO_ART)) = 0 OR NO_ART = 0 THEN 'N' ELSE 'Y' END AS CARTON,
CASE WHEN NO_PALLET IS NULL OR LENGTH(TRIM(NO_PALLET)) = 0 OR NO_PALLET = 0 THEN 'N' ELSE 'Y' END AS PALLET
,CUST_PORD,
NO_PALLET,NO_ART,
GROSS_WEIGHT, SORD_NO, PTCN
from table (BOLTYPEMANUALTBL('$P!{DESP_DESP_ID}','SUB1'))]]>
	</queryString>
	<field name="CUST_PORD" class="java.lang.String"/>
	<field name="NO_ART" class="java.lang.Double"/>
	<field name="GROSS_WEIGHT" class="java.lang.Double"/>
	<field name="SORD_NO" class="java.lang.String"/>
	<field name="PTCN" class="java.lang.String"/>
	<field name="shipment_id" class="java.lang.String"/>
	<field name="NO_PALLET" class="java.lang.Double"/>
	<field name="CARTON" class="java.lang.String"/>
	<field name="PALLET" class="java.lang.String"/>
	<variable name="NO_ART_1" class="java.lang.Double" calculation="Sum">
		<variableExpression><![CDATA[new java.lang.Double($F{NO_ART}.doubleValue())]]></variableExpression>
	</variable>
	<variable name="NETT_WEIGHT_1" class="java.lang.Double" calculation="Sum">
		<variableExpression><![CDATA[new java.lang.Double($F{GROSS_WEIGHT}.doubleValue())]]></variableExpression>
	</variable>
	<variable name="NO_PALLET_1" class="java.lang.Double" calculation="Sum">
		<variableExpression><![CDATA[new java.lang.Double($F{NO_PALLET}.doubleValue())]]></variableExpression>
	</variable>
	<group name="GRAND_TOTAL">
		<groupExpression><![CDATA[$F{SORD_NO}]]></groupExpression>
		<groupFooter>
			<band/>
		</groupFooter>
	</group>
	<background>
		<band splitType="Stretch"/>
	</background>
	<title>
		<band splitType="Stretch"/>
	</title>
	<pageHeader>
		<band height="36" splitType="Stretch">
			<staticText>
				<reportElement x="218" y="17" width="50" height="11"/>
				<textElement textAlignment="Center">
					<font fontName="Arial" size="9" isBold="true"/>
				</textElement>
				<text><![CDATA[WEIGHT]]></text>
			</staticText>
			<staticText>
				<reportElement mode="Opaque" x="5" y="1" 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="169" y="17" width="35" height="11"/>
				<textElement textAlignment="Center">
					<font fontName="Arial" size="9" isBold="true"/>
				</textElement>
				<text><![CDATA[# PKGS]]></text>
			</staticText>
			<staticText>
				<reportElement x="377" y="17" width="150" height="11"/>
				<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="16" width="1" height="20"/>
			</line>
			<staticText>
				<reportElement x="10" y="17" width="150" height="11"/>
				<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="16" width="1" height="20"/>
			</line>
			<line direction="BottomUp">
				<reportElement x="5" y="16" width="1" height="20"/>
			</line>
			<line direction="BottomUp">
				<reportElement x="166" y="16" width="1" height="20"/>
			</line>
			<staticText>
				<reportElement x="275" y="17" width="92" height="11"/>
				<textElement textAlignment="Center">
					<font fontName="Arial" size="9" isBold="true"/>
				</textElement>
				<text><![CDATA[PALLET/SLIP]]></text>
			</staticText>
			<line direction="BottomUp">
				<reportElement x="564" y="16" width="1" height="20"/>
			</line>
			<staticText>
				<reportElement x="296" y="27" width="50" height="9"/>
				<textElement textAlignment="Center">
					<font fontName="Arial" size="6" isBold="false"/>
				</textElement>
				<text><![CDATA[(CIRCLE ONE)]]></text>
			</staticText>
			<line direction="BottomUp">
				<reportElement x="366" y="16" width="1" height="20"/>
			</line>
		</band>
	</pageHeader>
	<columnHeader>
		<band splitType="Stretch"/>
	</columnHeader>
	<detail>
		<band height="15" splitType="Stretch">
			<rectangle>
				<reportElement mode="Transparent" x="5" y="0" width="559" height="15"/>
			</rectangle>
			<staticText>
				<reportElement x="354" y="2" width="8" height="10">
					<printWhenExpression><![CDATA[new Boolean(false)]]></printWhenExpression>
				</reportElement>
				<textElement>
					<font fontName="Arial" size="8" isBold="true"/>
				</textElement>
				<text><![CDATA[N]]></text>
			</staticText>
			<staticText>
				<reportElement x="308" y="1" width="12" height="10">
					<printWhenExpression><![CDATA[new Boolean(false)]]></printWhenExpression>
				</reportElement>
				<textElement textAlignment="Center">
					<font fontName="Arial" size="8" isBold="true"/>
				</textElement>
				<text><![CDATA[(Y)]]></text>
			</staticText>
			<textField pattern="0" isBlankWhenNull="true">
				<reportElement x="168" y="2" width="35" height="12">
					<printWhenExpression><![CDATA[new Boolean($F{NO_ART}.doubleValue() > 0)]]></printWhenExpression>
				</reportElement>
				<textElement textAlignment="Right">
					<font fontName="Arial"/>
				</textElement>
				<textFieldExpression class="java.lang.Double"><![CDATA[$F{NO_ART}]]></textFieldExpression>
			</textField>
			<textField>
				<reportElement x="10" y="1" width="142" height="12"/>
				<textElement textAlignment="Center">
					<font fontName="Arial"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![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>
			<staticText>
				<reportElement x="310" y="3" width="8" height="10" isRemoveLineWhenBlank="true">
					<printWhenExpression><![CDATA[new Boolean(false)]]></printWhenExpression>
				</reportElement>
				<textElement>
					<font fontName="Arial" size="8" isBold="true"/>
				</textElement>
				<text><![CDATA[Y]]></text>
			</staticText>
			<textField isBlankWhenNull="true">
				<reportElement x="322" y="2" width="44" height="12"/>
				<textElement textAlignment="Center">
					<font fontName="Arial"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{CARTON}]]></textFieldExpression>
			</textField>
			<textField isBlankWhenNull="true">
				<reportElement x="275" y="2" width="45" height="12"/>
				<textElement textAlignment="Center">
					<font fontName="Arial"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{PALLET}]]></textFieldExpression>
			</textField>
			<textField pattern="0" isBlankWhenNull="true">
				<reportElement x="169" y="2" width="35" height="12">
					<printWhenExpression><![CDATA[new Boolean($F{NO_PALLET}.doubleValue() > 0)]]></printWhenExpression>
				</reportElement>
				<textElement textAlignment="Right">
					<font fontName="Arial"/>
				</textElement>
				<textFieldExpression class="java.lang.Double"><![CDATA[$F{NO_PALLET}]]></textFieldExpression>
			</textField>
			<textField isBlankWhenNull="true">
				<reportElement x="468" y="0" width="96" height="12">
					<printWhenExpression><![CDATA[new Boolean(!$F{CUST_PORD}.equals(" "))]]></printWhenExpression>
				</reportElement>
				<textElement verticalAlignment="Bottom">
					<font fontName="Courier New" size="9"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA["ORD #:"+$F{SORD_NO}]]></textFieldExpression>
			</textField>
			<textField isBlankWhenNull="true">
				<reportElement x="366" y="0" width="110" height="12">
					<printWhenExpression><![CDATA[new Boolean(!$F{CUST_PORD}.equals(" "))]]></printWhenExpression>
				</reportElement>
				<textElement textAlignment="Left" verticalAlignment="Bottom">
					<font fontName="Courier New" size="9"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA["PTCN #:"+$F{PTCN}]]></textFieldExpression>
			</textField>
			<textField isBlankWhenNull="true">
				<reportElement x="214" y="1" width="56" height="12">
					<printWhenExpression><![CDATA[new Boolean($F{NO_ART}.doubleValue() > 0 || $F{NO_PALLET}.doubleValue() > 0)]]></printWhenExpression>
				</reportElement>
				<textElement textAlignment="Right">
					<font fontName="Arial"/>
				</textElement>
				<textFieldExpression class="java.lang.Double"><![CDATA[$F{GROSS_WEIGHT}]]></textFieldExpression>
			</textField>
		</band>
	</detail>
	<summary>
		<band height="22" splitType="Stretch">
			<line direction="BottomUp">
				<reportElement x="166" y="0" width="1" height="16"/>
			</line>
			<rectangle>
				<reportElement x="274" y="0" width="290" height="15" backcolor="#AD9CA4"/>
			</rectangle>
			<textField isBlankWhenNull="true">
				<reportElement x="210" y="0" width="60" height="12"/>
				<textElement textAlignment="Right">
					<font fontName="Arial"/>
				</textElement>
				<textFieldExpression class="java.lang.Double"><![CDATA[$V{NETT_WEIGHT_1}]]></textFieldExpression>
			</textField>
			<textField pattern="0" isBlankWhenNull="true">
				<reportElement x="165" y="1" width="40" height="12">
					<printWhenExpression><![CDATA[new Boolean($V{NO_ART_1}.doubleValue() > 0)]]></printWhenExpression>
				</reportElement>
				<textElement textAlignment="Right">
					<font fontName="Arial"/>
				</textElement>
				<textFieldExpression class="java.lang.Double"><![CDATA[$V{NO_ART_1}]]></textFieldExpression>
			</textField>
			<staticText>
				<reportElement x="25" y="0" 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="0" width="1" height="16"/>
			</line>
			<line direction="BottomUp">
				<reportElement x="5" y="0" width="1" height="16"/>
			</line>
			<line>
				<reportElement x="5" y="15" width="269" height="1"/>
			</line>
			<textField pattern="0" isBlankWhenNull="true">
				<reportElement x="166" y="1" width="40" height="12">
					<printWhenExpression><![CDATA[new Boolean($V{NO_PALLET_1}.doubleValue() > 0)]]></printWhenExpression>
				</reportElement>
				<textElement textAlignment="Right">
					<font fontName="Arial"/>
				</textElement>
				<textFieldExpression class="java.lang.Double"><![CDATA[$V{NO_PALLET_1}]]></textFieldExpression>
			</textField>
		</band>
	</summary>
</jasperReport>
