<?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="lists_unwaved" pageWidth="1004" pageHeight="555" orientation="Landscape" columnWidth="1004" leftMargin="0" rightMargin="0" topMargin="0" bottomMargin="0">
	<property name="ireport.zoom" value="1.0"/>
	<property name="ireport.x" value="6"/>
	<property name="ireport.y" value="0"/>
	<parameter name="as_site_code" class="java.lang.String"/>
	<parameter name="as_item_ser_from" class="java.lang.String"/>
	<parameter name="as_item_ser_to" class="java.lang.String"/>
	<parameter name="as_item_code_from" class="java.lang.String"/>
	<parameter name="as_item_code_to" class="java.lang.String"/>
	<parameter name="as_cust_code_from" class="java.lang.String"/>
	<parameter name="as_cust_code_to" class="java.lang.String"/>
	<parameter name="as_cust_code_dlv_from" class="java.lang.String"/>
	<parameter name="as_cust_code_dlv_to" class="java.lang.String"/>
	<parameter name="as_sale_order_from" class="java.lang.String"/>
	<parameter name="as_sale_order_to" class="java.lang.String"/>
	<parameter name="as_due_date_from" class="java.util.Date"/>
	<parameter name="as_due_date_to" class="java.util.Date"/>
	<queryString>
		<![CDATA[select DISTINCT A.CUST_CODE,
		   A.CUST_NAME,
       A.LINE_NO,
       A.SALE_ORDER,
       A.DUE_DATE,
       A.ITEM_CODE,
       A.DESCR,
       A.QUANTITY,
       A.PENDING_QUANTITY ,
       A.QTY_ALLOC,
       A.SITE_CODE,
       A.EXP_LEV,
       A.PART_QTY ,
       A.SINGLE_LOT ,
       A.MIN_SHELF_LIFE  ,
       A.ALLOC_FLAG  ,
       A.MASTER_PACK_ALLOW ,
       A.ACTIVE_PICK_ALLOW ,
       A.STOCK_TO_DOCK_ALLOW,
       A.STATUS ,
       A.HOLD_FLAG,
       (case when (A.STATUS in('Cancel','Hold')) OR (A.HOLD_FLAG ='Yes') THEN sum(STK.QUANTITY-STK.ALLOC_QTY- nvl(STK.HOLD_QTY,0)) 
	   ELSE SUM(A.STOCK_NOT_AVAIL) END) STOCK_NOT_AVAIL,
       FN_NEAR_EXPIRY(A.ITEM_CODE,A.SITE_CODE) AS NEAR_EXPIRY
FROM
(SELECT SORDER.CUST_CODE,
       CUSTOMER.CUST_NAME,
       SORDDET.LINE_NO,
       SORDER.SALE_ORDER,
       SORDER.DUE_DATE,
       SORDITEM.ITEM_CODE,
       ITEM.DESCR,
       SORDITEM.QUANTITY,
       (SORDITEM.QUANTITY - SORDITEM.QTY_DESP - SORDITEM.QTY_ALLOC) PENDING_QUANTITY,
       SORDITEM.QTY_ALLOC,
	   0 STOCK_NOT_AVAIL,
       SORDER.SITE_CODE,
       SORDITEM.EXP_LEV,
       (CASE WHEN SORDER.PART_QTY = '0' THEN 'Ship Complete Order' when SORDER.PART_QTY = '1' then 'Ship Part Order-Full Qty' else 'Ship Available' end) AS PART_QTY,
       CUSTOMER.SINGLE_LOT AS SINGLE_LOT,
       SORDITEM.MIN_SHELF_LIFE AS MIN_SHELF_LIFE ,
       SORDER.ALLOC_FLAG AS ALLOC_FLAG ,
       WAVE_TYPE.MASTER_PACK_ALLOW ,
       WAVE_TYPE.ACTIVE_PICK_ALLOW ,
       WAVE_TYPE.STOCK_TO_DOCK_ALLOW,
      (case when SORDER.STATUS ='H' then 'Hold' when sorder.status='X' then 'Cancel' end) status,
      (CASE WHEN SORDDET.HOLD_FLAG ='Y' THEN 'Yes' when  SORDDET.HOLD_FLAG ='N' then 'No' end) HOLD_FLAG
FROM   SORDER,
       SORDDET,
       SORDITEM,
       CUSTOMER,
       ITEM ,
       WAVE_TYPE
WHERE  SORDER.SALE_ORDER      = SORDDET.SALE_ORDER
AND    SORDITEM.SALE_ORDER    = SORDER.SALE_ORDER
AND    SORDDET.LINE_NO        = SORDITEM.LINE_NO
AND    SORDITEM.ITEM_CODE     = ITEM.ITEM_CODE
AND    SORDER.CUST_CODE       = CUSTOMER.CUST_CODE
AND    SORDDET.SITE_CODE      = SORDITEM.SITE_CODE
AND    CUSTOMER.WAVE_TYPE     = WAVE_TYPE.WAVE_TYPE(+)
AND     SORDER.SITE_CODE      = $P{as_site_code}
AND     ITEM.ITEM_SER        >=  $P{as_item_ser_from}
AND     ITEM.ITEM_SER        <=  $P{as_item_ser_to}
AND     ITEM.ITEM_CODE       >=  $P{as_item_code_from}
AND     ITEM.ITEM_CODE       <=  $P{as_item_code_to}
AND     CUSTOMER.CUST_CODE   >=  $P{as_cust_code_from}
AND     CUSTOMER.CUST_CODE   <=  $P{as_cust_code_to}
AND     SORDER.CUST_CODE__DLV >= $P{as_cust_code_dlv_from}
AND     SORDER.CUST_CODE__DLV <= $P{as_cust_code_dlv_to}
AND     SORDER.SALE_ORDER >=$P{as_sale_order_from}
AND     SORDER.SALE_ORDER <=$P{as_sale_order_to}
AND     SORDER.DUE_DATE >=$P{as_due_date_from}
AND     SORDER.DUE_DATE <=$P{as_due_date_to}
AND     SORDER.STATUS            IN('X','H')
AND     SORDITEM.LINE_TYPE    = 'I'
UNION
SELECT SORDER.CUST_CODE,
      CUSTOMER.CUST_NAME,
       SORDDET.LINE_NO,
       SORDER.SALE_ORDER,
       SORDER.DUE_DATE,
       SORDITEM.ITEM_CODE,
       ITEM.DESCR,
       SORDITEM.QUANTITY,
       (SORDITEM.QUANTITY - SORDITEM.QTY_DESP - SORDITEM.QTY_ALLOC) PENDING_QUANTITY,
       SORDITEM.QTY_ALLOC,
	   0 STOCK_NOT_AVAIL,
       SORDER.SITE_CODE,
       SORDITEM.EXP_LEV,
       (CASE WHEN SORDER.PART_QTY = '0' THEN 'Ship Complete Order' when SORDER.PART_QTY = '1' then 'Ship Part Order-Full Qty' else 'Ship Available' end) AS PART_QTY,
       CUSTOMER.SINGLE_LOT AS SINGLE_LOT,
       SORDITEM.MIN_SHELF_LIFE AS MIN_SHELF_LIFE ,
       SORDER.ALLOC_FLAG AS ALLOC_FLAG ,
       WAVE_TYPE.MASTER_PACK_ALLOW ,
       WAVE_TYPE.ACTIVE_PICK_ALLOW ,
       WAVE_TYPE.STOCK_TO_DOCK_ALLOW,
       (case when SORDER.STATUS ='H' then 'Hold' when sorder.status='X' then 'Cancel' end) status,
       (CASE WHEN SORDDET.HOLD_FLAG ='Y' THEN 'Yes' when  SORDDET.HOLD_FLAG ='N' then 'No' end) HOLD_FLAG
	   
FROM   SORDER,
       SORDDET,
       SORDITEM,
       CUSTOMER,
       ITEM ,
       WAVE_TYPE
WHERE   SORDER.SALE_ORDER       = SORDDET.SALE_ORDER
AND     SORDITEM.SALE_ORDER     = SORDER.SALE_ORDER
AND     SORDDET.LINE_NO         = SORDITEM.LINE_NO
AND     SORDITEM.ITEM_CODE      = ITEM.ITEM_CODE
AND     SORDER.CUST_CODE        = CUSTOMER.CUST_CODE
AND     SORDDET.SITE_CODE       = SORDITEM.SITE_CODE
AND     CUSTOMER.WAVE_TYPE      = WAVE_TYPE.WAVE_TYPE(+)
AND     SORDER.SITE_CODE = $P{as_site_code}
AND     ITEM.ITEM_SER >  =$P{as_item_ser_from}
AND     ITEM.ITEM_SER <  =$P{as_item_ser_to}
AND     ITEM.ITEM_CODE > =$P{as_item_code_from}
AND     ITEM.ITEM_CODE < =$P{as_item_code_to}
AND     CUSTOMER.CUST_CODE >=$P{as_cust_code_from}
AND     CUSTOMER.CUST_CODE <=$P{as_cust_code_to}
AND     SORDER.CUST_CODE__DLV >=$P{as_cust_code_dlv_from}
AND     SORDER.CUST_CODE__DLV <=$P{as_cust_code_dlv_to}
AND     SORDER.SALE_ORDER >=$P{as_sale_order_from}
AND     SORDER.SALE_ORDER <=$P{as_sale_order_to}
AND     SORDER.DUE_DATE   >=$P{as_due_date_from}
AND     SORDER.DUE_DATE   <=$P{as_due_date_to}
AND     SORDDET.HOLD_FLAG        = 'Y'
AND     SORDITEM.LINE_TYPE       = 'I'
UNION
SELECT   SORDER.CUST_CODE,
	     CUSTOMER.CUST_NAME,
       SORDDET.LINE_NO,
       SORDER.SALE_ORDER,
       SORDER.DUE_DATE,
       SORDITEM.ITEM_CODE,
       ITEM.DESCR,
       SORDITEM.QUANTITY,
       (SORDITEM.QUANTITY - SORDITEM.QTY_DESP - SORDITEM.QTY_ALLOC) PENDING_QUANTITY,
       SORDITEM.QTY_ALLOC,
	   ((STOCK.QUANTITY) - (STOCK.ALLOC_QTY) - (nvl(STOCK.HOLD_QTY,0))) STOCK_NOT_AVAIL,
       SORDER.SITE_CODE,
       SORDITEM.EXP_LEV,
       (CASE WHEN SORDER.PART_QTY = '0' THEN 'Ship Complete Order' when SORDER.PART_QTY = '1' then 'Ship Part Order-Full Qty' else 'Ship Available' end) AS PART_QTY,
       CUSTOMER.SINGLE_LOT AS SINGLE_LOT,
       SORDITEM.MIN_SHELF_LIFE AS MIN_SHELF_LIFE ,
       SORDER.ALLOC_FLAG AS ALLOC_FLAG ,
       WAVE_TYPE.MASTER_PACK_ALLOW ,
       WAVE_TYPE.ACTIVE_PICK_ALLOW ,
       WAVE_TYPE.STOCK_TO_DOCK_ALLOW,
       (case when SORDER.STATUS ='H' then 'Hold' when sorder.status='X' then 'Cancel' end) status,
       (CASE WHEN SORDDET.HOLD_FLAG ='Y' THEN 'Yes' when  SORDDET.HOLD_FLAG ='N' then 'No' end) HOLD_FLAG
FROM   SORDER,
       STOCK,
       INVSTAT,
       LOCATION,
       SORDDET,
       SORDITEM,
       CUSTOMER,
       ITEM ,
       WAVE_TYPE
WHERE   SORDER.SALE_ORDER       = SORDDET.SALE_ORDER
AND     SORDITEM.SALE_ORDER     = SORDER.SALE_ORDER
AND     SORDDET.LINE_NO         = SORDITEM.LINE_NO
and     sorddet.loc_type =location.loc_type
AND     LOCATION.LOC_CODE       = STOCK.LOC_CODE
AND     LOCATION.INV_STAT       = INVSTAT.INV_STAT
AND     ITEM.ITEM_CODE          = STOCK.ITEM_CODE
AND     SORDDET.SITE_CODE       = STOCK.SITE_CODE
AND     SORDITEM.ITEM_CODE      = ITEM.ITEM_CODE
AND     SORDER.CUST_CODE        = CUSTOMER.CUST_CODE
AND     SORDDET.SITE_CODE       = SORDITEM.SITE_CODE
AND     CUSTOMER.WAVE_TYPE      = WAVE_TYPE.WAVE_TYPE(+)
AND     INVSTAT.AVAILABLE       = 'Y'
AND     SORDER.SITE_CODE      = $P{as_site_code}
AND     ITEM.ITEM_SER        >=  $P{as_item_ser_from}
AND     ITEM.ITEM_SER        <=  $P{as_item_ser_to}
AND     ITEM.ITEM_CODE       >=  $P{as_item_code_from}
AND     ITEM.ITEM_CODE       <=  $P{as_item_code_to}
AND     CUSTOMER.CUST_CODE   >=  $P{as_cust_code_from}
AND     CUSTOMER.CUST_CODE   <=  $P{as_cust_code_to}
AND     SORDER.CUST_CODE__DLV >= $P{as_cust_code_dlv_from}
AND     SORDER.CUST_CODE__DLV <= $P{as_cust_code_dlv_to}
AND     SORDER.SALE_ORDER >=$P{as_sale_order_from}
AND     SORDER.SALE_ORDER <=$P{as_sale_order_to}
AND     SORDER.DUE_DATE   >=$P{as_due_date_from}
AND     SORDER.DUE_DATE   <=$P{as_due_date_to}
AND     SORDITEM.LINE_TYPE       = 'I'
AND     (STOCK.QUANTITY -STOCK.ALLOC_QTY - nvl(STOCK.HOLD_QTY,0)) =0) a,STOCK STK
WHERE STK.ITEM_CODE = A.ITEM_CODE
AND   STK.SITE_CODE = A.SITE_CODE
GROUP BY A.CUST_CODE,
		   A.CUST_NAME,
       A.LINE_NO,
       A.SALE_ORDER,
       A.DUE_DATE,
       A.ITEM_CODE,
       A.DESCR,
       A.QUANTITY,
       A.PENDING_QUANTITY ,
       A.QTY_ALLOC,
       A.SITE_CODE,
       A.EXP_LEV,
       A.PART_QTY ,
       A.SINGLE_LOT ,
       A.MIN_SHELF_LIFE  ,
       A.ALLOC_FLAG  ,
       A.MASTER_PACK_ALLOW ,
       A.ACTIVE_PICK_ALLOW ,
       A.STOCK_TO_DOCK_ALLOW,
       A.STATUS ,
       A.HOLD_FLAG,FN_NEAR_EXPIRY(A.ITEM_CODE,A.SITE_CODE)
ORDER BY 1,4]]>
	</queryString>
	<field name="CUST_CODE" class="java.lang.String"/>
	<field name="CUST_NAME" class="java.lang.String"/>
	<field name="LINE_NO" class="java.lang.String"/>
	<field name="SALE_ORDER" class="java.lang.String"/>
	<field name="DUE_DATE" class="java.util.Date"/>
	<field name="ITEM_CODE" class="java.lang.String"/>
	<field name="DESCR" class="java.lang.String"/>
	<field name="QUANTITY" class="java.lang.String"/>
	<field name="PENDING_QUANTITY" class="java.lang.String"/>
	<field name="QTY_ALLOC" class="java.lang.String"/>
	<field name="SITE_CODE" class="java.lang.String"/>
	<field name="EXP_LEV" class="java.lang.String"/>
	<field name="PART_QTY" class="java.lang.String"/>
	<field name="SINGLE_LOT" class="java.lang.String"/>
	<field name="MIN_SHELF_LIFE" class="java.lang.String"/>
	<field name="ALLOC_FLAG" class="java.lang.String"/>
	<field name="MASTER_PACK_ALLOW" class="java.lang.String"/>
	<field name="ACTIVE_PICK_ALLOW" class="java.lang.String"/>
	<field name="STOCK_TO_DOCK_ALLOW" class="java.lang.String"/>
	<field name="STATUS" class="java.lang.String"/>
	<field name="HOLD_FLAG" class="java.lang.String"/>
	<field name="STOCK_NOT_AVAIL" class="java.lang.String"/>
	<field name="NEAR_EXPIRY" class="java.lang.String"/>
	<variable name="as_heading" class="java.lang.String" calculation="System">
		<variableExpression><![CDATA["List of Unwave Items/Orders"]]></variableExpression>
		<initialValueExpression><![CDATA["List of Unwave Items/Orders"]]></initialValueExpression>
	</variable>
	<background>
		<band splitType="Stretch"/>
	</background>
	<title>
		<band height="75" splitType="Stretch">
			<textField isBlankWhenNull="true">
				<reportElement x="1" y="4" width="964" height="29"/>
				<textElement textAlignment="Center">
					<font fontName="Times New Roman" size="14" isBold="true"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$V{as_heading}]]></textFieldExpression>
			</textField>
			<staticText>
				<reportElement x="1" y="33" width="964" height="30"/>
				<textElement textAlignment="Center">
					<font fontName="Times New Roman" size="14" isBold="true"/>
				</textElement>
				<text><![CDATA[Stock Not Available / Stock Near Expiry / Order Cancelled / Order  on Hold ]]></text>
			</staticText>
		</band>
	</title>
	<pageHeader>
		<band splitType="Stretch"/>
	</pageHeader>
	<columnHeader>
		<band height="217" splitType="Stretch">
			<frame>
				<reportElement x="2" y="170" width="1002" height="47"/>
				<box>
					<pen lineWidth="1.0"/>
					<topPen lineWidth="1.0"/>
					<leftPen lineWidth="1.0"/>
					<bottomPen lineWidth="1.0"/>
					<rightPen lineWidth="1.0"/>
				</box>
				<staticText>
					<reportElement x="2" y="1" width="45" height="45"/>
					<textElement>
						<font fontName="Times New Roman" size="12" isBold="true"/>
					</textElement>
					<text><![CDATA[Cust Code]]></text>
				</staticText>
				<staticText>
					<reportElement x="49" y="1" width="105" height="44"/>
					<textElement>
						<font fontName="Times New Roman" size="12" isBold="true"/>
					</textElement>
					<text><![CDATA[Customer Name]]></text>
				</staticText>
				<staticText>
					<reportElement x="156" y="1" width="25" height="45"/>
					<textElement>
						<font fontName="Times New Roman" size="12" isBold="true"/>
					</textElement>
					<text><![CDATA[Line No.]]></text>
				</staticText>
				<staticText>
					<reportElement x="184" y="1" width="50" height="45"/>
					<textElement>
						<font fontName="Times New Roman" size="12" isBold="true"/>
					</textElement>
					<text><![CDATA[Sale Order]]></text>
				</staticText>
				<line>
					<reportElement x="47" y="0" width="1" height="46"/>
				</line>
				<line>
					<reportElement x="154" y="0" width="1" height="46"/>
				</line>
				<line>
					<reportElement x="182" y="0" width="1" height="46"/>
				</line>
				<staticText>
					<reportElement x="238" y="1" width="37" height="45"/>
					<textElement>
						<font fontName="Times New Roman" size="12" isBold="true"/>
					</textElement>
					<text><![CDATA[Due Date]]></text>
				</staticText>
				<staticText>
					<reportElement x="330" y="1" width="212" height="45"/>
					<textElement>
						<font fontName="Times New Roman" size="12" isBold="true"/>
					</textElement>
					<text><![CDATA[Description]]></text>
				</staticText>
				<staticText>
					<reportElement x="546" y="0" width="47" height="47"/>
					<textElement textAlignment="Right">
						<font fontName="Times New Roman" size="12" isBold="true"/>
					</textElement>
					<text><![CDATA[Quantity]]></text>
				</staticText>
				<staticText>
					<reportElement x="595" y="1" width="49" height="45"/>
					<textElement textAlignment="Right">
						<font fontName="Times New Roman" size="12" isBold="true"/>
					</textElement>
					<text><![CDATA[Pending
Quantity]]></text>
				</staticText>
				<staticText>
					<reportElement x="647" y="1" width="50" height="45"/>
					<textElement textAlignment="Right">
						<font fontName="Times New Roman" size="12" isBold="true"/>
					</textElement>
					<text><![CDATA[Qty
Alloc]]></text>
				</staticText>
				<staticText>
					<reportElement x="277" y="1" width="52" height="45"/>
					<textElement>
						<font fontName="Times New Roman" size="12" isBold="true"/>
					</textElement>
					<text><![CDATA[Item Code]]></text>
				</staticText>
				<staticText>
					<reportElement x="700" y="1" width="117" height="45"/>
					<textElement>
						<font fontName="Times New Roman" size="12" isBold="true"/>
					</textElement>
					<text><![CDATA[Part Qty]]></text>
				</staticText>
				<staticText>
					<reportElement x="818" y="1" width="34" height="44"/>
					<textElement>
						<font fontName="Times New Roman" size="12" isBold="true"/>
					</textElement>
					<text><![CDATA[Order Status]]></text>
				</staticText>
				<staticText>
					<reportElement x="857" y="1" width="28" height="45"/>
					<textElement>
						<font fontName="Times New Roman" size="12" isBold="true"/>
					</textElement>
					<text><![CDATA[Item Hold]]></text>
				</staticText>
				<line>
					<reportElement x="236" y="0" width="1" height="46"/>
				</line>
				<line>
					<reportElement x="276" y="0" width="1" height="46"/>
				</line>
				<line>
					<reportElement x="329" y="0" width="1" height="46"/>
				</line>
				<line>
					<reportElement x="542" y="0" width="1" height="46"/>
				</line>
				<line>
					<reportElement x="594" y="1" width="1" height="46"/>
				</line>
				<line>
					<reportElement x="645" y="0" width="1" height="46"/>
				</line>
				<line>
					<reportElement x="698" y="0" width="1" height="46"/>
				</line>
				<line>
					<reportElement x="817" y="0" width="1" height="46"/>
				</line>
				<line>
					<reportElement x="853" y="1" width="1" height="46"/>
				</line>
				<line>
					<reportElement x="886" y="1" width="1" height="46"/>
				</line>
				<line>
					<reportElement x="948" y="1" width="1" height="46"/>
				</line>
				<staticText>
					<reportElement x="890" y="1" width="57" height="45"/>
					<textElement>
						<font fontName="Times New Roman" size="12" isBold="true"/>
					</textElement>
					<text><![CDATA[Stock Available]]></text>
				</staticText>
				<staticText>
					<reportElement x="951" y="1" width="50" height="45"/>
					<textElement>
						<font fontName="Times New Roman" size="12" isBold="true"/>
					</textElement>
					<text><![CDATA[Stock Near Expiry]]></text>
				</staticText>
			</frame>
			<staticText>
				<reportElement x="7" y="0" width="73" height="20"/>
				<textElement>
					<font fontName="Times New Roman" isBold="true"/>
				</textElement>
				<text><![CDATA[Site Code :]]></text>
			</staticText>
			<staticText>
				<reportElement x="7" y="23" width="95" height="20"/>
				<textElement>
					<font fontName="Times New Roman" isBold="true"/>
				</textElement>
				<text><![CDATA[Item Series From :]]></text>
			</staticText>
			<staticText>
				<reportElement x="228" y="23" width="100" height="20"/>
				<textElement>
					<font fontName="Times New Roman" isBold="true"/>
				</textElement>
				<text><![CDATA[Item Series To :]]></text>
			</staticText>
			<staticText>
				<reportElement x="7" y="46" width="95" height="20"/>
				<textElement>
					<font fontName="Times New Roman" isBold="true"/>
				</textElement>
				<text><![CDATA[Item Code From :]]></text>
			</staticText>
			<staticText>
				<reportElement x="228" y="46" width="100" height="20"/>
				<textElement>
					<font fontName="Times New Roman" isBold="true"/>
				</textElement>
				<text><![CDATA[Item Code To :]]></text>
			</staticText>
			<staticText>
				<reportElement x="7" y="69" width="95" height="20"/>
				<textElement>
					<font fontName="Times New Roman" isBold="true"/>
				</textElement>
				<text><![CDATA[Sale Order From :]]></text>
			</staticText>
			<staticText>
				<reportElement x="228" y="69" width="100" height="20"/>
				<textElement>
					<font fontName="Times New Roman" isBold="true"/>
				</textElement>
				<text><![CDATA[Sale Order To :]]></text>
			</staticText>
			<staticText>
				<reportElement x="7" y="92" width="95" height="20"/>
				<textElement>
					<font fontName="Times New Roman" isBold="true"/>
				</textElement>
				<text><![CDATA[Cust Code From :]]></text>
			</staticText>
			<staticText>
				<reportElement x="228" y="92" width="100" height="20"/>
				<textElement>
					<font fontName="Times New Roman" isBold="true"/>
				</textElement>
				<text><![CDATA[Cust Code To :]]></text>
			</staticText>
			<staticText>
				<reportElement x="7" y="115" width="95" height="20"/>
				<textElement>
					<font fontName="Times New Roman" isBold="true"/>
				</textElement>
				<text><![CDATA[Due Date From :]]></text>
			</staticText>
			<staticText>
				<reportElement x="228" y="115" width="100" height="20"/>
				<textElement>
					<font fontName="Times New Roman" isBold="true"/>
				</textElement>
				<text><![CDATA[Due Date To :]]></text>
			</staticText>
			<staticText>
				<reportElement x="7" y="138" width="95" height="20"/>
				<textElement>
					<font fontName="Times New Roman" isBold="true"/>
				</textElement>
				<text><![CDATA[Cust Code Dlv From :]]></text>
			</staticText>
			<staticText>
				<reportElement x="228" y="138" width="100" height="20"/>
				<textElement>
					<font fontName="Times New Roman" isBold="true"/>
				</textElement>
				<text><![CDATA[Cust Code Dlv To :]]></text>
			</staticText>
			<textField>
				<reportElement x="114" y="0" width="100" height="20"/>
				<textElement>
					<font fontName="Times New Roman"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$P{as_site_code}]]></textFieldExpression>
			</textField>
			<textField>
				<reportElement x="114" y="23" width="100" height="20"/>
				<textElement>
					<font fontName="Times New Roman"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$P{as_item_ser_from}]]></textFieldExpression>
			</textField>
			<textField>
				<reportElement x="340" y="23" width="100" height="20"/>
				<textElement>
					<font fontName="Times New Roman"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$P{as_item_ser_to}]]></textFieldExpression>
			</textField>
			<textField>
				<reportElement x="114" y="46" width="100" height="20"/>
				<textElement>
					<font fontName="Times New Roman"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$P{as_item_code_from}]]></textFieldExpression>
			</textField>
			<textField>
				<reportElement x="340" y="46" width="100" height="20"/>
				<textElement>
					<font fontName="Times New Roman"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$P{as_item_code_to}]]></textFieldExpression>
			</textField>
			<textField>
				<reportElement x="114" y="92" width="100" height="20"/>
				<textElement>
					<font fontName="Times New Roman"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$P{as_cust_code_from}]]></textFieldExpression>
			</textField>
			<textField>
				<reportElement x="340" y="92" width="100" height="20"/>
				<textElement>
					<font fontName="Times New Roman"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$P{as_cust_code_to}]]></textFieldExpression>
			</textField>
			<textField>
				<reportElement x="114" y="138" width="100" height="20"/>
				<textElement>
					<font fontName="Times New Roman"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$P{as_cust_code_dlv_from}]]></textFieldExpression>
			</textField>
			<textField>
				<reportElement x="340" y="138" width="100" height="20"/>
				<textElement>
					<font fontName="Times New Roman"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$P{as_cust_code_dlv_to}]]></textFieldExpression>
			</textField>
			<textField>
				<reportElement x="114" y="69" width="100" height="20"/>
				<textElement>
					<font fontName="Times New Roman"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$P{as_sale_order_from}]]></textFieldExpression>
			</textField>
			<textField>
				<reportElement x="340" y="69" width="100" height="20"/>
				<textElement>
					<font fontName="Times New Roman"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$P{as_sale_order_to}]]></textFieldExpression>
			</textField>
			<textField pattern="MM/dd/yy" isBlankWhenNull="true">
				<reportElement x="114" y="115" width="100" height="20"/>
				<textElement>
					<font fontName="Times New Roman"/>
				</textElement>
				<textFieldExpression class="java.util.Date"><![CDATA[$P{as_due_date_from}]]></textFieldExpression>
			</textField>
			<textField pattern="MM/dd/yy" isBlankWhenNull="true">
				<reportElement x="340" y="115" width="100" height="20"/>
				<textElement>
					<font fontName="Times New Roman"/>
				</textElement>
				<textFieldExpression class="java.util.Date"><![CDATA[$P{as_due_date_to}]]></textFieldExpression>
			</textField>
		</band>
	</columnHeader>
	<detail>
		<band height="25" splitType="Stretch">
			<frame>
				<reportElement positionType="Float" stretchType="RelativeToTallestObject" x="2" y="0" width="1002" height="25"/>
				<box>
					<pen lineWidth="1.0"/>
					<topPen lineWidth="1.0"/>
					<leftPen lineWidth="1.0"/>
					<bottomPen lineWidth="1.0"/>
					<rightPen lineWidth="1.0"/>
				</box>
				<textField isBlankWhenNull="true">
					<reportElement positionType="Float" stretchType="RelativeToTallestObject" x="1" y="0" width="45" height="25" isPrintWhenDetailOverflows="true"/>
					<textElement>
						<font fontName="Times New Roman"/>
					</textElement>
					<textFieldExpression class="java.lang.String"><![CDATA[$F{CUST_CODE}]]></textFieldExpression>
				</textField>
				<textField isBlankWhenNull="true">
					<reportElement positionType="Float" stretchType="RelativeToTallestObject" x="49" y="0" width="105" height="25" isPrintWhenDetailOverflows="true"/>
					<textElement>
						<font fontName="Times New Roman"/>
					</textElement>
					<textFieldExpression class="java.lang.String"><![CDATA[$F{CUST_NAME}]]></textFieldExpression>
				</textField>
				<textField isBlankWhenNull="true">
					<reportElement positionType="Float" stretchType="RelativeToTallestObject" x="156" y="0" width="25" height="25" isPrintWhenDetailOverflows="true"/>
					<textElement textAlignment="Right">
						<font fontName="Times New Roman"/>
					</textElement>
					<textFieldExpression class="java.lang.String"><![CDATA[$F{LINE_NO}]]></textFieldExpression>
				</textField>
				<textField isBlankWhenNull="true">
					<reportElement positionType="Float" stretchType="RelativeToTallestObject" x="184" y="0" width="50" height="25" isPrintWhenDetailOverflows="true"/>
					<textElement>
						<font fontName="Times New Roman"/>
					</textElement>
					<textFieldExpression class="java.lang.String"><![CDATA[$F{SALE_ORDER}]]></textFieldExpression>
				</textField>
				<line>
					<reportElement positionType="Float" stretchType="RelativeToTallestObject" x="47" y="0" width="1" height="25" isPrintWhenDetailOverflows="true"/>
				</line>
				<line>
					<reportElement positionType="Float" stretchType="RelativeToTallestObject" x="154" y="0" width="1" height="25" isPrintWhenDetailOverflows="true"/>
				</line>
				<line>
					<reportElement positionType="Float" stretchType="RelativeToTallestObject" x="182" y="0" width="1" height="25" isPrintWhenDetailOverflows="true"/>
				</line>
				<textField pattern="MM/dd/yy" isBlankWhenNull="true">
					<reportElement positionType="Float" stretchType="RelativeToTallestObject" x="238" y="0" width="37" height="25" isPrintWhenDetailOverflows="true"/>
					<textElement>
						<font fontName="Times New Roman"/>
					</textElement>
					<textFieldExpression class="java.util.Date"><![CDATA[$F{DUE_DATE}]]></textFieldExpression>
				</textField>
				<textField isBlankWhenNull="true">
					<reportElement positionType="Float" stretchType="RelativeToTallestObject" x="277" y="0" width="52" height="25" isPrintWhenDetailOverflows="true"/>
					<textElement>
						<font fontName="Times New Roman"/>
					</textElement>
					<textFieldExpression class="java.lang.String"><![CDATA[$F{ITEM_CODE}]]></textFieldExpression>
				</textField>
				<textField isBlankWhenNull="true">
					<reportElement positionType="Float" stretchType="RelativeToTallestObject" x="330" y="0" width="212" height="25" isPrintWhenDetailOverflows="true"/>
					<textElement>
						<font fontName="Times New Roman"/>
					</textElement>
					<textFieldExpression class="java.lang.String"><![CDATA[$F{DESCR}]]></textFieldExpression>
				</textField>
				<textField isBlankWhenNull="true">
					<reportElement positionType="Float" stretchType="RelativeToTallestObject" x="544" y="0" width="47" height="25" isPrintWhenDetailOverflows="true"/>
					<textElement textAlignment="Right">
						<font fontName="Times New Roman"/>
					</textElement>
					<textFieldExpression class="java.lang.String"><![CDATA[$F{QUANTITY}]]></textFieldExpression>
				</textField>
				<textField isBlankWhenNull="true">
					<reportElement positionType="Float" stretchType="RelativeToTallestObject" x="595" y="0" width="49" height="25" isPrintWhenDetailOverflows="true"/>
					<textElement textAlignment="Right">
						<font fontName="Times New Roman"/>
					</textElement>
					<textFieldExpression class="java.lang.String"><![CDATA[$F{PENDING_QUANTITY}]]></textFieldExpression>
				</textField>
				<textField isBlankWhenNull="true">
					<reportElement positionType="Float" stretchType="RelativeToTallestObject" x="700" y="0" width="117" height="25" isPrintWhenDetailOverflows="true"/>
					<textElement>
						<font fontName="Times New Roman"/>
					</textElement>
					<textFieldExpression class="java.lang.String"><![CDATA[$F{PART_QTY}]]></textFieldExpression>
				</textField>
				<textField isBlankWhenNull="true">
					<reportElement positionType="Float" stretchType="RelativeToTallestObject" x="647" y="0" width="50" height="25" isPrintWhenDetailOverflows="true"/>
					<textElement textAlignment="Right">
						<font fontName="Times New Roman"/>
					</textElement>
					<textFieldExpression class="java.lang.String"><![CDATA[$F{QTY_ALLOC}]]></textFieldExpression>
				</textField>
				<textField isBlankWhenNull="true">
					<reportElement positionType="Float" stretchType="RelativeToTallestObject" x="818" y="0" width="34" height="25" isPrintWhenDetailOverflows="true"/>
					<textElement>
						<font fontName="Times New Roman"/>
					</textElement>
					<textFieldExpression class="java.lang.String"><![CDATA[$F{STATUS}]]></textFieldExpression>
				</textField>
				<textField isBlankWhenNull="true">
					<reportElement positionType="Float" stretchType="RelativeToTallestObject" x="856" y="0" width="28" height="25" isPrintWhenDetailOverflows="true"/>
					<textElement>
						<font fontName="Times New Roman"/>
					</textElement>
					<textFieldExpression class="java.lang.String"><![CDATA[$F{HOLD_FLAG}]]></textFieldExpression>
				</textField>
				<line>
					<reportElement positionType="Float" stretchType="RelativeToTallestObject" x="236" y="0" width="1" height="25" isPrintWhenDetailOverflows="true"/>
				</line>
				<line>
					<reportElement positionType="Float" stretchType="RelativeToTallestObject" x="276" y="0" width="1" height="25" isPrintWhenDetailOverflows="true"/>
				</line>
				<line>
					<reportElement positionType="Float" stretchType="RelativeToTallestObject" x="329" y="0" width="1" height="25" isPrintWhenDetailOverflows="true"/>
				</line>
				<line>
					<reportElement positionType="Float" stretchType="RelativeToTallestObject" x="542" y="0" width="1" height="25" isPrintWhenDetailOverflows="true"/>
				</line>
				<line>
					<reportElement positionType="Float" stretchType="RelativeToTallestObject" x="594" y="0" width="1" height="25" isPrintWhenDetailOverflows="true"/>
				</line>
				<line>
					<reportElement positionType="Float" stretchType="RelativeToTallestObject" x="645" y="0" width="1" height="25" isPrintWhenDetailOverflows="true"/>
				</line>
				<line>
					<reportElement positionType="Float" stretchType="RelativeToTallestObject" x="698" y="0" width="1" height="25" isPrintWhenDetailOverflows="true"/>
				</line>
				<line>
					<reportElement positionType="Float" stretchType="RelativeToTallestObject" x="817" y="0" width="1" height="25" isPrintWhenDetailOverflows="true"/>
				</line>
				<textField isBlankWhenNull="true">
					<reportElement positionType="Float" stretchType="RelativeToTallestObject" x="890" y="0" width="57" height="25" isPrintWhenDetailOverflows="true"/>
					<textElement textAlignment="Right">
						<font fontName="Times New Roman"/>
					</textElement>
					<textFieldExpression class="java.lang.String"><![CDATA[$F{STOCK_NOT_AVAIL}]]></textFieldExpression>
				</textField>
				<textField isBlankWhenNull="true">
					<reportElement positionType="Float" stretchType="RelativeToTallestObject" x="949" y="0" width="50" height="25" isPrintWhenDetailOverflows="true"/>
					<textElement textAlignment="Right">
						<font fontName="Times New Roman"/>
					</textElement>
					<textFieldExpression class="java.lang.String"><![CDATA[$F{NEAR_EXPIRY}]]></textFieldExpression>
				</textField>
			</frame>
			<line>
				<reportElement positionType="Float" stretchType="RelativeToTallestObject" x="855" y="0" width="1" height="25" isPrintWhenDetailOverflows="true"/>
			</line>
			<line>
				<reportElement positionType="Float" stretchType="RelativeToTallestObject" x="888" y="0" width="1" height="25" isPrintWhenDetailOverflows="true"/>
			</line>
			<line>
				<reportElement positionType="Float" stretchType="RelativeToTallestObject" x="950" y="0" width="1" height="25" isPrintWhenDetailOverflows="true"/>
			</line>
		</band>
	</detail>
	<columnFooter>
		<band splitType="Stretch"/>
	</columnFooter>
	<pageFooter>
		<band splitType="Stretch"/>
	</pageFooter>
	<summary>
		<band splitType="Stretch"/>
	</summary>
</jasperReport>