<?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="walgreens shipping label" printOrder="Horizontal" pageWidth="283" pageHeight="438" columnWidth="263" leftMargin="10" rightMargin="10" topMargin="2" bottomMargin="2">
	<property name="ireport.zoom" value="1.4641000000000013"/>
	<property name="ireport.x" value="0"/>
	<property name="ireport.y" value="3"/>
	<parameter name="DESP_ID_START" class="java.lang.String"/>
	<parameter name="DESP_ID_LAST" class="java.lang.String"/>
	<queryString>
		<![CDATA[SELECT
		CASE WHEN S.ADD1 IS NULL THEN ' ' ELSE S.ADD1 END AS ADD1,
		CASE WHEN S.ADD2 IS NULL THEN ' ' ELSE S.ADD2 END AS ADD2,
		CASE WHEN S.CITY IS NULL THEN ' ' ELSE S.CITY END AS CITY,
		CASE WHEN S.PIN IS NULL THEN ' ' ELSE S.PIN END AS PIN,
		CASE WHEN S.STATE_CODE IS NULL THEN ' ' ELSE S.STATE_CODE END AS STATE_CODE,
        C.CUST_NAME AS CUST_NAME,
		CASE WHEN O.DLV_ADD1 IS NULL THEN ' ' ELSE O.DLV_ADD1 END AS DLV_ADD1,
		CASE WHEN O.DLV_ADD2 IS NULL THEN ' ' ELSE O.DLV_ADD2 END AS DLV_ADD2,
		CASE WHEN O.DLV_ADD3 IS NULL THEN ' ' ELSE O.DLV_ADD3 END AS DLV_ADD3,
		CASE WHEN O.DLV_CITY IS NULL THEN ' ' ELSE O.DLV_CITY END AS DLV_CITY,
		CASE WHEN O.STATE_CODE__DLV IS NULL THEN ' ' ELSE O.STATE_CODE__DLV END AS STATE_CODE__DLV,
		CASE WHEN O.DLV_PIN IS NULL THEN ' ' ELSE O.DLV_PIN END AS DLV_PIN,
		(SELECT TRAN_NAME FROM TRANSPORTER WHERE TRAN_CODE = D.TRAN_CODE) AS TRAN_CODE,
		CASE WHEN O.CUST_PORD IS NULL THEN ' ' ELSE O.CUST_PORD END AS CUST_PORD,
		CASE WHEN D.LR_NO IS NULL THEN ' ' ELSE D.LR_NO END AS PRO_NO,
		CASE WHEN D.BOL_NO IS NULL THEN ' ' ELSE D.BOL_NO END AS BOL_NO,
		D.GROSS_WEIGHT AS WEIGHT,
		CASE WHEN C.OLD_CUST_REF IS NULL THEN ' ' ELSE C.OLD_CUST_REF END AS OLD_CUST_REF,
		CASE WHEN C.STORE_NUMBER IS NULL THEN ' ' ELSE C.STORE_NUMBER END AS STORE_NUMBER,
		CASE WHEN P.SSCC_18 IS NULL THEN CASE WHEN D.LR_NO IS NULL THEN '' ELSE D.LR_NO END ELSE P.SSCC_18 END AS SSCC_18
FROM
		SITE S, SORDER O,  DESPATCH D, DESPATCHDET E,  CUSTOMER C ,PACK_HDR P, WAVE_TASK_DET W, SHIP_DOCS SD
WHERE
		(D.DESP_ID BETWEEN $P{DESP_ID_START} AND $P{DESP_ID_LAST})
		AND O.SALE_ORDER = D.SORD_NO
		AND S.SITE_CODE = O.SITE_CODE
		AND E.DESP_ID = D.DESP_ID
		AND O.CUST_CODE__DLV = C.CUST_CODE
        AND D.DESP_ID = SD.REF_ID(+)
        AND 'S-DSP' = SD.REF_SER(+)
        AND SD.PTCN = W.PTCN(+)
        AND 'M-PACK' = W.REF_SER(+)
        AND W.REF_ID = P.TRAN_ID(+)]]>
	</queryString>
	<field name="CUST_NAME" class="java.lang.String"/>
	<field name="ADD1" class="java.lang.String"/>
	<field name="ADD2" class="java.lang.String"/>
	<field name="CITY" class="java.lang.String"/>
	<field name="PIN" class="java.lang.String"/>
	<field name="STATE_CODE" class="java.lang.String"/>
	<field name="DLV_ADD1" class="java.lang.String"/>
	<field name="DLV_ADD2" class="java.lang.String"/>
	<field name="DLV_ADD3" class="java.lang.String"/>
	<field name="DLV_CITY" class="java.lang.String"/>
	<field name="STATE_CODE__DLV" class="java.lang.String"/>
	<field name="DLV_PIN" class="java.lang.String"/>
	<field name="TRAN_CODE" class="java.lang.String"/>
	<field name="CUST_PORD" class="java.lang.String"/>
	<field name="PRO_NO" class="java.lang.String"/>
	<field name="BOL_NO" class="java.lang.String"/>
	<field name="WEIGHT" class="java.lang.Double"/>
	<field name="OLD_CUST_REF" class="java.lang.String"/>
	<field name="STORE_NUMBER" class="java.lang.String"/>
	<field name="SSCC_18" class="java.lang.String"/>
	<variable name="COMPUTE_1" class="java.lang.String">
		<variableExpression><![CDATA[new java.lang.String(ibase.webitm.reports.sun.BaseReportGFMethods.gf_bar_code("420"+ibase.webitm.reports.utility.BaseReportMethods.trim($F{DLV_PIN}).substring(0,5)  ) )]]></variableExpression>
	</variable>
	<variable name="COMPUTE_2" class="java.lang.String">
		<variableExpression><![CDATA[new java.lang.String(ibase.webitm.reports.sun.BaseReportGFMethods.gf_bar_code("90"+ibase.webitm.reports.utility.BaseReportMethods.trim($F{OLD_CUST_REF}) ) )]]></variableExpression>
	</variable>
	<variable name="COMPUTE_3" class="java.lang.String">
		<variableExpression><![CDATA[new java.lang.String(ibase.webitm.reports.sun.BaseReportGFMethods.gf_bar_code("91008965063"+ibase.webitm.reports.utility.BaseReportMethods.trim($F{STORE_NUMBER})))]]></variableExpression>
	</variable>
	<variable name="COMPUTE_4" class="java.lang.String">
		<variableExpression><![CDATA[new java.lang.String(ibase.webitm.reports.sun.BaseReportGFMethods.gf_bar_code("00"+ibase.webitm.reports.utility.BaseReportMethods.trim($F{SSCC_18}) ) )]]></variableExpression>
	</variable>
	<variable name="COMPUTE_5" class="java.lang.String">
		<variableExpression><![CDATA[new java.lang.String("(420) "+ibase.webitm.reports.utility.BaseReportMethods.trim($F{DLV_PIN}).substring(0,5))]]></variableExpression>
	</variable>
	<variable name="COMPUTE_6" class="java.lang.String">
		<variableExpression><![CDATA[new java.lang.String("(00) "+ibase.webitm.reports.utility.BaseReportMethods.trim($F{SSCC_18}))]]></variableExpression>
	</variable>
	<background>
		<band splitType="Stretch"/>
	</background>
	<title>
		<band splitType="Stretch"/>
	</title>
	<pageHeader>
		<band splitType="Stretch"/>
	</pageHeader>
	<columnHeader>
		<band splitType="Stretch"/>
	</columnHeader>
	<detail>
		<band height="421" splitType="Stretch">
			<rectangle>
				<reportElement positionType="Float" mode="Transparent" x="2" y="16" width="259" height="389"/>
			</rectangle>
			<line>
				<reportElement x="3" y="184" width="258" height="1"/>
			</line>
			<line>
				<reportElement x="164" y="242" width="1" height="58"/>
			</line>
			<staticText>
				<reportElement x="129" y="16" width="17" height="13"/>
				<textElement>
					<font fontName="Times New Roman" size="8" isBold="true"/>
				</textElement>
				<text><![CDATA[TO]]></text>
			</staticText>
			<line>
				<reportElement x="2" y="131" width="259" height="1"/>
			</line>
			<line>
				<reportElement x="140" y="74" width="1" height="58"/>
			</line>
			<line>
				<reportElement x="2" y="73" width="259" height="1"/>
			</line>
			<staticText>
				<reportElement x="15" y="187" width="50" height="12"/>
				<textElement>
					<font fontName="Times New Roman" size="10" isBold="true"/>
				</textElement>
				<text><![CDATA[Vendor :]]></text>
			</staticText>
			<staticText>
				<reportElement x="6" y="77" width="120" height="12"/>
				<textElement>
					<font fontName="Times New Roman" size="9" isBold="true"/>
				</textElement>
				<text><![CDATA[Ship To Postal Code :]]></text>
			</staticText>
			<staticText>
				<reportElement x="15" y="135" width="30" height="15"/>
				<textElement>
					<font fontName="Times New Roman" size="12" isBold="true"/>
				</textElement>
				<text><![CDATA[PO#:]]></text>
			</staticText>
			<staticText>
				<reportElement x="7" y="304" width="150" height="15"/>
				<textElement textAlignment="Left" verticalAlignment="Top">
					<font fontName="Times New Roman" size="12" isBold="true"/>
				</textElement>
				<text><![CDATA[SSCC-18:]]></text>
			</staticText>
			<line>
				<reportElement x="126" y="16" width="1" height="57"/>
			</line>
			<staticText>
				<reportElement x="143" y="76" width="80" height="12"/>
				<textElement>
					<font fontName="Times New Roman" size="9" isBold="true"/>
				</textElement>
				<text><![CDATA[CARRIER:]]></text>
			</staticText>
			<staticText>
				<reportElement x="4" y="16" width="106" height="13"/>
				<textElement>
					<font fontName="Times New Roman" size="8" isBold="true"/>
				</textElement>
				<text><![CDATA[FROM]]></text>
			</staticText>
			<line>
				<reportElement x="2" y="300" width="259" height="1"/>
			</line>
			<line>
				<reportElement x="3" y="242" width="258" height="1"/>
			</line>
			<staticText>
				<reportElement x="143" y="118" width="30" height="12"/>
				<textElement textAlignment="Left">
					<font fontName="Times New Roman" size="10" isBold="true"/>
				</textElement>
				<text><![CDATA[BOL#:]]></text>
			</staticText>
			<staticText>
				<reportElement x="143" y="104" width="30" height="12"/>
				<textElement textAlignment="Left" verticalAlignment="Middle">
					<font fontName="Times New Roman" size="10" isBold="true"/>
				</textElement>
				<text><![CDATA[PRO#:]]></text>
			</staticText>
			<staticText>
				<reportElement x="15" y="159" width="50" height="15"/>
				<textElement>
					<font fontName="Times New Roman" size="12" isBold="true"/>
				</textElement>
				<text><![CDATA[Weight:]]></text>
			</staticText>
			<staticText>
				<reportElement x="5" y="245" width="20" height="12"/>
				<textElement>
					<font fontName="Times New Roman" size="10" isBold="true"/>
				</textElement>
				<text><![CDATA[For]]></text>
			</staticText>
			<textField isStretchWithOverflow="true" isBlankWhenNull="true">
				<reportElement x="4" y="26" width="121" height="13"/>
				<textElement>
					<font fontName="Times New Roman" size="9"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{ADD1}]]></textFieldExpression>
			</textField>
			<textField isStretchWithOverflow="true" isBlankWhenNull="true">
				<reportElement x="4" y="40" width="121" height="12"/>
				<textElement>
					<font fontName="Times New Roman" size="9"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{ADD2}]]></textFieldExpression>
			</textField>
			<textField isBlankWhenNull="true">
				<reportElement x="4" y="52" width="42" height="12"/>
				<textElement>
					<font fontName="Times New Roman" size="9"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{CITY}]]></textFieldExpression>
			</textField>
			<textField>
				<reportElement x="46" y="52" width="33" height="12"/>
				<textElement>
					<font fontName="Times New Roman" size="9"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{STATE_CODE}]]></textFieldExpression>
			</textField>
			<textField isBlankWhenNull="true">
				<reportElement x="78" y="53" width="47" height="12"/>
				<textElement>
					<font fontName="Times New Roman" size="9"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{PIN}]]></textFieldExpression>
			</textField>
			<textField isBlankWhenNull="true">
				<reportElement x="183" y="53" width="27" height="12"/>
				<textElement>
					<font fontName="Times New Roman" size="9"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{STATE_CODE__DLV}]]></textFieldExpression>
			</textField>
			<textField isBlankWhenNull="true">
				<reportElement x="211" y="53" width="52" height="12"/>
				<textElement>
					<font fontName="Times New Roman" size="9"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{DLV_PIN}]]></textFieldExpression>
			</textField>
			<textField isBlankWhenNull="true">
				<reportElement x="130" y="41" width="133" height="11"/>
				<textElement>
					<font fontName="Times New Roman" size="9"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{DLV_ADD1}]]></textFieldExpression>
			</textField>
			<textField isBlankWhenNull="true">
				<reportElement x="131" y="53" width="51" height="12"/>
				<textElement>
					<font fontName="Times New Roman" size="9"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{DLV_ADD3}+""+$F{DLV_CITY}]]></textFieldExpression>
			</textField>
			<textField isBlankWhenNull="true">
				<reportElement x="130" y="29" width="133" height="12"/>
				<textElement>
					<font fontName="Times New Roman" size="9"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA["Store "+$F{STORE_NUMBER}]]></textFieldExpression>
			</textField>
			<textField isBlankWhenNull="true">
				<reportElement x="144" y="89" width="100" height="12"/>
				<textElement>
					<font fontName="Times New Roman" size="9"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{TRAN_CODE}]]></textFieldExpression>
			</textField>
			<textField isBlankWhenNull="true">
				<reportElement x="46" y="135" width="200" height="15"/>
				<textElement>
					<font fontName="Times New Roman" size="12" isBold="true"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{CUST_PORD}]]></textFieldExpression>
			</textField>
			<textField isBlankWhenNull="true">
				<reportElement x="172" y="104" width="91" height="12"/>
				<textElement textAlignment="Left" verticalAlignment="Middle">
					<font fontName="Times New Roman" size="9"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{PRO_NO}]]></textFieldExpression>
			</textField>
			<textField isBlankWhenNull="true">
				<reportElement x="172" y="118" width="91" height="12"/>
				<textElement>
					<font fontName="Times New Roman" size="9"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{BOL_NO}]]></textFieldExpression>
			</textField>
			<textField pattern="0.00" isBlankWhenNull="true">
				<reportElement x="65" y="159" width="181" height="15"/>
				<textElement>
					<font fontName="Times New Roman" size="12" isBold="true"/>
				</textElement>
				<textFieldExpression class="java.lang.Double"><![CDATA[$F{WEIGHT}]]></textFieldExpression>
			</textField>
			<textField isBlankWhenNull="true">
				<reportElement x="169" y="246" width="94" height="50"/>
				<textElement textAlignment="Center" verticalAlignment="Middle">
					<font fontName="Times New Roman" size="30" isBold="true"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{STORE_NUMBER}]]></textFieldExpression>
			</textField>
			<textField>
				<reportElement x="24" y="246" width="140" height="12"/>
				<textElement textAlignment="Center">
					<font fontName="Times New Roman" isBold="true"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA["(91)008965063"+$F{STORE_NUMBER}]]></textFieldExpression>
			</textField>
			<textField isBlankWhenNull="true">
				<reportElement x="67" y="187" width="179" height="12"/>
				<textElement>
					<font fontName="Times New Roman" isBold="true"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA["(90)"+$F{OLD_CUST_REF}]]></textFieldExpression>
			</textField>
			<textField>
				<reportElement x="6" y="103" width="131" height="26"/>
				<textElement textAlignment="Center" verticalAlignment="Middle">
					<font fontName="Code 128AB" size="28" isBold="false"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$V{COMPUTE_1}]]></textFieldExpression>
			</textField>
			<textField isBlankWhenNull="true">
				<reportElement x="60" y="205" width="144" height="37"/>
				<textElement textAlignment="Center" verticalAlignment="Middle">
					<font fontName="Code 128AB" size="36" isBold="false"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$V{COMPUTE_2}]]></textFieldExpression>
			</textField>
			<textField>
				<reportElement x="3" y="258" width="159" height="38"/>
				<textElement textAlignment="Center" verticalAlignment="Middle">
					<font fontName="Code 128AB" size="26" isBold="false"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$V{COMPUTE_3}]]></textFieldExpression>
			</textField>
			<textField>
				<reportElement x="4" y="336" width="257" height="66"/>
				<textElement textAlignment="Center" verticalAlignment="Middle">
					<font fontName="Code 128AB Tall" size="32" isBold="false"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$V{COMPUTE_4}]]></textFieldExpression>
			</textField>
			<staticText>
				<reportElement x="130" y="63" width="133" height="13"/>
				<textElement verticalAlignment="Top">
					<font fontName="Times New Roman" size="9" isBold="true"/>
				</textElement>
				<text><![CDATA[WINDSOS WI 53598000]]></text>
			</staticText>
			<textField>
				<reportElement x="4" y="89" width="136" height="14"/>
				<textElement textAlignment="Center" verticalAlignment="Middle">
					<font fontName="Times New Roman" size="9"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$V{COMPUTE_5}]]></textFieldExpression>
			</textField>
			<textField>
				<reportElement x="7" y="319" width="254" height="15"/>
				<textElement textAlignment="Center">
					<font fontName="Times New Roman" size="9"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$V{COMPUTE_6}]]></textFieldExpression>
			</textField>
			<textField>
				<reportElement x="144" y="17" width="116" height="11"/>
				<textElement>
					<font fontName="Times New Roman" size="9"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDA