<?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="pick_label" pageWidth="283" pageHeight="450" columnWidth="263" leftMargin="10" rightMargin="10" topMargin="10" bottomMargin="0">
	<property name="ireport.zoom" value="1.0"/>
	<property name="ireport.x" value="0"/>
	<property name="ireport.y" value="0"/>
	<parameter name="PTCN" class="java.lang.String"/>
	<parameter name="SUBREPORT_DIR" class="java.lang.String" isForPrompting="false">
		<defaultValueExpression><![CDATA["E:\\manohar\\reports\\"]]></defaultValueExpression>
	</parameter>
	<parameter name="PRINTVAL" class="java.lang.String"/>
	<queryString>
		<![CDATA[select w.ref_type,w.ref_ser,w.ref_id,w.ptcn,lead(w.ref_id,1,'**') over (ORDER by w.ref_type desc,w.ref_ser,w.ref_id) as next_ref_id,w.sale_order as sale_order,NVL(DDF_PICKLBL_FMT(w.sale_order),99) as format_id,W.WAVE_ID
from wave_task_det w
where w.ptcn = '$P!{PTCN}'
and w.ref_ser NOT IN ('M-PACK','S-DSP ') AND ('$P!{PRINTVAL}' = 'Y' or instr( (select  var_value
from disparm where prd_code='999999' and var_name = 'TSKLBL_IGNORE_REFSER'),w.ref_ser ) <= 0)
order by (case when substr(w.ref_ser,1,1) = 'R' then 1 else 2 end),w.line_no,w.ref_type desc,w.ref_ser,w.ref_id]]>
	</queryString>
	<field name="REF_ID" class="java.lang.String"/>
	<field name="PTCN" class="java.lang.String"/>
	<field name="REF_TYPE" class="java.lang.String"/>
	<field name="REF_SER" class="java.lang.String"/>
	<field name="next_ref_id" class="java.lang.String"/>
	<field name="format_id" class="java.lang.String"/>
	<field name="sale_order" class="java.lang.String"/>
	<field name="WAVE_ID" class="java.lang.String"/>
	<group name="replorder" isStartNewPage="true">
		<groupExpression><![CDATA[$F{REF_ID}]]></groupExpression>
		<groupHeader>
			<band height="103">
				<subreport>
					<reportElement x="0" y="0" width="263" height="103" printWhenGroupChanges="replorder"/>
					<parametersMapExpression><![CDATA[$P{REPORT_PARAMETERS_MAP}]]></parametersMapExpression>
					<subreportParameter name="PTCN">
						<subreportParameterExpression><![CDATA[$P{PTCN}]]></subreportParameterExpression>
					</subreportParameter>
					<subreportParameter name="PRINTVAL">
						<subreportParameterExpression><![CDATA[$P{PRINTVAL}]]></subreportParameterExpression>
					</subreportParameter>
					<subreportParameter name="FORMATID">
						<subreportParameterExpression><![CDATA[$F{format_id}]]></subreportParameterExpression>
					</subreportParameter>
					<subreportParameter name="REF_ID">
						<subreportParameterExpression><![CDATA[$F{REF_ID}]]></subreportParameterExpression>
					</subreportParameter>
					<connectionExpression><![CDATA[$P{REPORT_CONNECTION}]]></connectionExpression>
					<subreportExpression class="java.io.InputStream"><![CDATA[new FileInputStream("/data/jboss-5.1.0.GA/server/default/deploy/ibase.ear/ibase.war/webitm/reports/jrxml/pick_label_sub1.jasper")]]></subreportExpression>
				</subreport>
			</band>
		</groupHeader>
		<groupFooter>
			<band/>
		</groupFooter>
	</group>
	<background>
		<band splitType="Stretch"/>
	</background>
	<title>
		<band splitType="Stretch"/>
	</title>
	<pageHeader>
		<band splitType="Stretch"/>
	</pageHeader>
	<columnHeader>
		<band splitType="Stretch"/>
	</columnHeader>
	<detail>
		<band splitType="Stretch"/>
	</detail>
	<columnFooter>
		<band splitType="Stretch"/>
	</columnFooter>
	<pageFooter>
		<band splitType="Stretch"/>
	</pageFooter>
	<summary>
		<band splitType="Stretch"/>
	</summary>
</jasperReport>
