<?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="wave_pick_task_det" pageWidth="784" pageHeight="595" orientation="Landscape" whenNoDataType="NoDataSection" columnWidth="748" leftMargin="18" rightMargin="18" topMargin="3" bottomMargin="18">
	<property name="ireport.zoom" value="1.0"/>
	<property name="ireport.x" value="0"/>
	<property name="ireport.y" value="0"/>
	<parameter name="P_PICK_ID" class="java.lang.String"/>
	<queryString>
		<![CDATA[SELECT PICK_ORD_DET.PICK_ORDER,
PICK_ORD_DET.LINE_NO,(case when PICK_TYPE in ('M','C') THEN 'Case Pick Tasks' else 'Active Pick Tasks' end) as PICK_TYPE,
PICK_ORD_DET.SALE_ORDER,PICK_ORD_DET.LINE_NO__SORD,
PICK_ORD_DET.SITE_CODE,
ITEM.ITEM_CODE||ITEM.DESCR ITEM_CODE,
PICK_ORD_DET.LOC_CODE,
PICK_ORD_DET.LOT_NO,
PICK_ORD_DET.LOT_SL,
(CASE WHEN PICK_TYPE in ('M','C') THEN PICK_ORD_DET.NO_ART ELSE NULL END) AS NO_ART,
PICK_ORD_DET.QUANTITY,
PICK_ORD_DET.LOC_CODE__TO,
(CASE WHEN WAVE_TASK_DET.WAVE_STATUS='V' THEN 'Verified' WHEN WAVE_TASK_DET.WAVE_STATUS='W' THEN 'Held' WHEN  WAVE_TASK_DET.WAVE_STATUS='C' THEN 'Created' else '' end) AS STATUS
FROM   PICK_ORD_DET,PICK_ORD_HDR ,WAVE_TASK_DET,ITEM
WHERE  PICK_ORD_DET.ITEM_CODE    = ITEM.ITEM_CODE
AND    PICK_ORD_HDR.PICK_TYPE    IN ('C','M','A')
AND    PICK_ORD_HDR.WAVE_ID      = $P{P_PICK_ID}
AND    PICK_ORD_HDR.PICK_ORDER   = PICK_ORD_DET.PICK_ORDER
and   PICK_ORD_HDR.PICK_ORDER    =  WAVE_TASK_DET.REF_ID
order by PICK_TYPE DESC,LINE_NO__SORD]]>
	</queryString>
	<field name="PICK_ORDER" class="java.lang.String"/>
	<field name="LINE_NO" class="java.lang.String"/>
	<field name="PICK_TYPE" class="java.lang.String"/>
	<field name="SALE_ORDER" class="java.lang.String"/>
	<field name="LINE_NO__SORD" class="java.lang.Double"/>
	<field name="SITE_CODE" class="java.lang.String"/>
	<field name="ITEM_CODE" class="java.lang.String"/>
	<field name="LOC_CODE" class="java.lang.String"/>
	<field name="LOT_NO" class="java.lang.String"/>
	<field name="LOT_SL" class="java.lang.String"/>
	<field name="NO_ART" class="java.lang.Double"/>
	<field name="QUANTITY" class="java.lang.Double"/>
	<field name="LOC_CODE__TO" class="java.lang.String"/>
	<field name="STATUS" class="java.lang.String"/>
	<group name="PICK_GROUP" isReprintHeaderOnEachPage="true">
		<groupExpression><![CDATA[$F{PICK_TYPE}]]></groupExpression>
		<groupHeader>
			<band height="49">
				<staticText>
					<reportElement x="8" y="23" width="55" height="26"/>
					<textElement textAlignment="Center">
						<font size="10" isBold="true"/>
					</textElement>
					<text><![CDATA[Pick Order]]></text>
				</staticText>
				<staticText>
					<reportElement x="65" y="23" width="58" height="26"/>
					<textElement textAlignment="Center">
						<font size="10" isBold="true"/>
					</textElement>
					<text><![CDATA[Sale Order]]></text>
				</staticText>
				<staticText>
					<reportElement x="124" y="23" width="37" height="26"/>
					<textElement textAlignment="Center">
						<font size="10" isBold="true"/>
					</textElement>
					<text><![CDATA[Sordln]]></text>
				</staticText>
				<staticText>
					<reportElement x="164" y="23" width="119" height="26"/>
					<textElement textAlignment="Center">
						<font size="10" isBold="true"/>
					</textElement>
					<text><![CDATA[Item Description]]></text>
				</staticText>
				<staticText>
					<reportElement x="283" y="23" width="57" height="26"/>
					<textElement textAlignment="Center">
						<font size="10" isBold="true"/>
					</textElement>
					<text><![CDATA[Loc Code
From]]></text>
				</staticText>
				<staticText>
					<reportElement x="340" y="23" width="104" height="26"/>
					<textElement textAlignment="Center">
						<font size="10" isBold="true"/>
					</textElement>
					<text><![CDATA[Lot No]]></text>
				</staticText>
				<staticText>
					<reportElement x="445" y="23" width="108" height="26"/>
					<textElement textAlignment="Center">
						<font size="10" isBold="true"/>
					</textElement>
					<text><![CDATA[LPN]]></text>
				</staticText>
				<staticText>
					<reportElement x="554" y="23" width="33" height="26"/>
					<textElement textAlignment="Center">
						<font size="10" isBold="true"/>
					</textElement>
					<text><![CDATA[Cases]]></text>
				</staticText>
				<staticText>
					<reportElement x="589" y="23" width="48" height="26"/>
					<textElement textAlignment="Center">
						<font size="10" isBold="true"/>
					</textElement>
					<text><![CDATA[Quantity]]></text>
				</staticText>
				<staticText>
					<reportElement x="639" y="23" width="51" height="26"/>
					<textElement textAlignment="Center">
						<font size="10" isBold="true"/>
					</textElement>
					<text><![CDATA[Loc Code
To]]></text>
				</staticText>
				<line>
					<reportElement x="6" y="48" width="738" height="1"/>
				</line>
				<line>
					<reportElement x="744" y="23" width="1" height="26"/>
				</line>
				<line>
					<reportElement x="638" y="23" width="1" height="26"/>
				</line>
				<line>
					<reportElement x="587" y="23" width="1" height="26"/>
				</line>
				<line>
					<reportElement x="553" y="23" width="1" height="26"/>
				</line>
				<line>
					<reportElement x="444" y="23" width="1" height="26"/>
				</line>
				<line>
					<reportElement x="338" y="23" width="1" height="26"/>
				</line>
				<line>
					<reportElement x="283" y="23" width="1" height="26"/>
				</line>
				<line>
					<reportElement x="162" y="23" width="1" height="26"/>
				</line>
				<line>
					<reportElement x="122" y="23" width="1" height="26"/>
				</line>
				<line>
					<reportElement x="64" y="23" width="1" height="26"/>
				</line>
				<line>
					<reportElement x="6" y="23" width="1" height="26"/>
				</line>
				<line>
					<reportElement x="6" y="23" width="738" height="1"/>
				</line>
				<textField>
					<reportElement x="8" y="1" width="184" height="20"/>
					<textElement>
						<font isBold="true"/>
					</textElement>
					<textFieldExpression class="java.lang.String"><![CDATA[$F{PICK_TYPE}]]></textFieldExpression>
				</textField>
				<staticText>
					<reportElement x="692" y="23" width="51" height="26"/>
					<textElement textAlignment="Center">
						<font size="10" isBold="true"/>
					</textElement>
					<text><![CDATA[Task Status]]></text>
				</staticText>
				<line>
					<reportElement x="690" y="23" width="1" height="26"/>
				</line>
			</band>
		</groupHeader>
	</group>
	<background>
		<band splitType="Stretch"/>
	</background>
	<title>
		<band height="21" splitType="Stretch">
			<staticText>
				<reportElement x="8" y="3" width="660" height="15"/>
				<textElement>
					<font isBold="true"/>
				</textElement>
				<text><![CDATA[Pick Tasks Details]]></text>
			</staticText>
		</band>
	</title>
	<pageHeader>
		<band splitType="Stretch"/>
	</pageHeader>
	<columnHeader>
		<band splitType="Stretch"/>
	</columnHeader>
	<detail>
		<band height="27" splitType="Stretch">
			<textField isBlankWhenNull="true">
				<reportElement x="7" y="1" width="55" height="26"/>
				<textElement>
					<font size="8"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{PICK_ORDER}]]></textFieldExpression>
			</textField>
			<textField isBlankWhenNull="true">
				<reportElement x="65" y="-1" width="57" height="26"/>
				<textElement>
					<font size="8"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{SALE_ORDER}]]></textFieldExpression>
			</textField>
			<textField isBlankWhenNull="true">
				<reportElement x="124" y="-1" width="37" height="26"/>
				<textElement textAlignment="Right">
					<font size="8"/>
				</textElement>
				<textFieldExpression class="java.lang.Double"><![CDATA[$F{LINE_NO__SORD}]]></textFieldExpression>
			</textField>
			<textField isBlankWhenNull="true">
				<reportElement x="164" y="0" width="119" height="26"/>
				<textElement>
					<font size="8"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{ITEM_CODE}]]></textFieldExpression>
			</textField>
			<textField isBlankWhenNull="true">
				<reportElement x="286" y="0" width="50" height="26"/>
				<textElement>
					<font size="8"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{LOC_CODE}]]></textFieldExpression>
			</textField>
			<textField isBlankWhenNull="true">
				<reportElement x="340" y="0" width="104" height="26"/>
				<textElement>
					<font size="8"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{LOT_NO}]]></textFieldExpression>
			</textField>
			<textField isBlankWhenNull="true">
				<reportElement x="446" y="0" width="107" height="26"/>
				<textElement>
					<font size="8"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{LOT_SL}]]></textFieldExpression>
			</textField>
			<textField isBlankWhenNull="true">
				<reportElement x="554" y="0" width="32" height="26"/>
				<textElement textAlignment="Right">
					<font size="8"/>
				</textElement>
				<textFieldExpression class="java.lang.Double"><![CDATA[$F{NO_ART}]]></textFieldExpression>
			</textField>
			<textField isBlankWhenNull="true">
				<reportElement x="589" y="0" width="48" height="26"/>
				<textElement textAlignment="Right">
					<font size="8"/>
				</textElement>
				<textFieldExpression class="java.lang.Double"><![CDATA[$F{QUANTITY}]]></textFieldExpression>
			</textField>
			<textField>
				<reportElement x="640" y="0" width="49" height="26"/>
				<textElement>
					<font size="8"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{LOC_CODE__TO}]]></textFieldExpression>
			</textField>
			<line>
				<reportElement x="553" y="0" width="1" height="26"/>
			</line>
			<line>
				<reportElement x="744" y="0" width="1" height="26"/>
			</line>
			<line>
				<reportElement x="122" y="0" width="1" height="26"/>
			</line>
			<line>
				<reportElement x="6" y="26" width="738" height="1"/>
			</line>
			<line>
				<reportElement x="64" y="0" width="1" height="26"/>
			</line>
			<line>
				<reportElement x="162" y="0" width="1" height="26"/>
			</line>
			<line>
				<reportElement x="283" y="0" width="1" height="26"/>
			</line>
			<line>
				<reportElement x="444" y="0" width="1" height="26"/>
			</line>
			<line>
				<reportElement x="338" y="0" width="1" height="26"/>
			</line>
			<line>
				<reportElement x="638" y="0" width="1" height="26"/>
			</line>
			<line>
				<reportElement x="587" y="0" width="1" height="26"/>
			</line>
			<line>
				<reportElement x="6" y="-1" width="738" height="1"/>
			</line>
			<line>
				<reportElement x="6" y="0" width="1" height="26"/>
			</line>
			<line>
				<reportElement x="690" y="0" width="1" height="26"/>
			</line>
			<textField isBlankWhenNull="true">
				<reportElement x="692" y="0" width="51" height="25"/>
				<textElement/>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{STATUS}]]></textFieldExpression>
			</textField>
		</band>
	</detail>
	<columnFooter>
		<band splitType="Stretch"/>
	</columnFooter>
	<pageFooter>
		<band splitType="Stretch"/>
	</pageFooter>
	<summary>
		<band splitType="Stretch"/>
	</summary>
	<noData>
		<band height="80">
			<staticText>
				<reportElement x="341" y="19" width="104" height="26"/>
				<textElement textAlignment="Center">
					<font size="10" isBold="true"/>
				</textElement>
				<text><![CDATA[Lot No]]></text>
			</staticText>
			<line>
				<reportElement x="445" y="19" width="1" height="26"/>
			</line>
			<staticText>
				<reportElement x="555" y="19" width="33" height="26"/>
				<textElement textAlignment="Center">
					<font size="10" isBold="true"/>
				</textElement>
				<text><![CDATA[Cases]]></text>
			</staticText>
			<line>
				<reportElement x="122" y="19" width="1" height="26"/>
			</line>
			<line>
				<reportElement x="554" y="19" width="1" height="26"/>
			</line>
			<line>
				<reportElement x="162" y="19" width="1" height="26"/>
			</line>
			<line>
				<reportElement x="284" y="19" width="1" height="26"/>
			</line>
			<staticText>
				<reportElement x="640" y="19" width="51" height="26"/>
				<textElement textAlignment="Center">
					<font size="10" isBold="true"/>
				</textElement>
				<text><![CDATA[Loc Code
To]]></text>
			</staticText>
			<staticText>
				<reportElement x="284" y="19" width="57" height="26"/>
				<textElement textAlignment="Center">
					<font size="10" isBold="true"/>
				</textElement>
				<text><![CDATA[Loc Code
From]]></text>
			</staticText>
			<line>
				<reportElement x="64" y="19" width="1" height="26"/>
			</line>
			<line>
				<reportElement x="639" y="19" width="1" height="26"/>
			</line>
			<line>
				<reportElement x="339" y="19" width="1" height="26"/>
			</line>
			<staticText>
				<reportElement x="446" y="19" width="108" height="26"/>
				<textElement textAlignment="Center">
					<font size="10" isBold="true"/>
				</textElement>
				<text><![CDATA[LPN]]></text>
			</staticText>
			<line>
				<reportElement x="7" y="44" width="738" height="1"/>
			</line>
			<line>
				<reportElement x="7" y="19" width="1" height="26"/>
			</line>
			<staticText>
				<reportElement x="590" y="19" width="48" height="26"/>
				<textElement textAlignment="Center">
					<font size="10" isBold="true"/>
				</textElement>
				<text><![CDATA[Quantity]]></text>
			</staticText>
			<staticText>
				<reportElement x="9" y="19" width="55" height="26"/>
				<textElement textAlignment="Center">
					<font size="10" isBold="true"/>
				</textElement>
				<text><![CDATA[Pick Order]]></text>
			</staticText>
			<staticText>
				<reportElement x="65" y="19" width="57" height="26"/>
				<textElement textAlignment="Center">
					<font size="10" isBold="true"/>
				</textElement>
				<text><![CDATA[Sale Order]]></text>
			</staticText>
			<line>
				<reportElement x="588" y="19" width="1" height="26"/>
			</line>
			<staticText>
				<reportElement x="165" y="19" width="119" height="26"/>
				<textElement textAlignment="Center">
					<font size="10" isBold="true"/>
				</textElement>
				<text><![CDATA[Item Description]]></text>
			</staticText>
			<staticText>
				<reportElement x="124" y="19" width="37" height="26"/>
				<textElement textAlignment="Center">
					<font size="10" isBold="true"/>
				</textElement>
				<text><![CDATA[Sordln]]></text>
			</staticText>
			<line>
				<reportElement x="7" y="18" width="738" height="1"/>
			</line>
			<line>
				<reportElement x="744" y="18" width="1" height="26"/>
			</line>
			<staticText>
				<reportElement x="8" y="2" width="735" height="15"/>
				<textElement>
					<font isBold="true"/>
				</textElement>
				<text><![CDATA[Pick Tasks Details]]></text>
			</staticText>
			<line>
				<reportElement x="7" y="71" width="738" height="1"/>
			</line>
			<line>
				<reportElement x="7" y="45" width="1" height="26"/>
			</line>
			<line>
				<reportElement x="744" y="45" width="1" height="26"/>
			</line>
			<staticText>
				<reportElement x="9" y="47" width="734" height="20"/>
				<textElement textAlignment="Center"/>
				<text><![CDATA[NA]]></text>
			</staticText>
			<staticText>
				<reportElement x="692" y="19" width="51" height="26"/>
				<textElement textAlignment="Center">
					<font size="10" isBold="true"/>
				</textElement>
				<text><![CDATA[Task Status]]></text>
			</staticText>
			<line>
				<reportElement x="691" y="19" width="1" height="26"/>
			</line>
		</band>
	</noData>
</jasperReport>
