<?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="d_recv_worksheet" pageWidth="792" pageHeight="612" orientation="Landscape" columnWidth="772" leftMargin="15" rightMargin="5" topMargin="18" bottomMargin="10">
	<property name="ireport.zoom" value="1.5"/>
	<property name="ireport.x" value="0"/>
	<property name="ireport.y" value="151"/>
	<parameter name="SUBREPORT_DIR" class="java.lang.String" isForPrompting="false">
		<defaultValueExpression><![CDATA["C:/jboss-5.1.0.GA/server/default/deploy/ibase.ear/ibase.war/webitm/reports/jrxml"]]></defaultValueExpression>
	</parameter>
	<parameter name="ASN_NO_From" class="java.lang.String"/>
	<parameter name="ASN_NO_To" class="java.lang.String"/>
	<queryString>
		<![CDATA[SELECT  CASE WHEN ASH.TRAN_ID IS NULL THEN ' ' ELSE ASH.TRAN_ID END AS TRAN_ID,
        CASE WHEN ASH.ASN_NO IS NULL THEN ' 'ELSE ASH.ASN_NO END AS SHPMENT_NO,
	CASE WHEN ASH.PURC_ORDER IS NULL THEN ' 'ELSE ASH.PURC_ORDER END AS PO_NO,
	CASE WHEN S.STATE_CODE IS NULL THEN ' 'ELSE S.STATE_CODE END AS STATE_CODE
    FROM ASN_HDR ASH,
	SITE S
   WHERE ASH.SITE_CODE = S.SITE_CODE
   AND  ASH.ASN_NO >= ('$P!{ASN_NO_From}')  and
        ASH.ASN_NO <= ('$P!{ASN_NO_To}')]]>
	</queryString>
	<field name="TRAN_ID" class="java.lang.String"/>
	<field name="SHPMENT_NO" class="java.lang.String"/>
	<field name="PO_NO" class="java.lang.String"/>
	<field name="STATE_CODE" class="java.lang.String"/>
	<sortField name="SHPMENT_NO"/>
	<variable name="tot_po" class="java.lang.Double">
		<variableExpression><![CDATA[$V{tot_po}]]></variableExpression>
	</variable>
	<variable name="tot_ship" class="java.lang.Double">
		<variableExpression><![CDATA[$V{tot_ship}]]></variableExpression>
	</variable>
	<group name="SHIP_NO" isStartNewPage="true" isResetPageNumber="true">
		<groupExpression><![CDATA[$F{SHPMENT_NO}]]></groupExpression>
		<groupHeader>
			<band/>
		</groupHeader>
		<groupFooter>
			<band/>
		</groupFooter>
	</group>
	<background>
		<band splitType="Stretch"/>
	</background>
	<title>
		<band height="84" splitType="Stretch">
			<staticText>
				<reportElement x="361" y="6" width="176" height="14"/>
				<textElement textAlignment="Justified">
					<font fontName="Courier New" size="10"/>
				</textElement>
				<text><![CDATA[Receiving Worksheet]]></text>
			</staticText>
			<staticText>
				<reportElement x="23" y="14" width="46" height="10"/>
				<textElement>
					<font fontName="Courier New" size="7"/>
				</textElement>
				<text><![CDATA[WM]]></text>
			</staticText>
			<staticText>
				<reportElement x="24" y="36" width="176" height="14" isRemoveLineWhenBlank="true">
					<printWhenExpression><![CDATA[new Boolean(($V{PAGE_NUMBER}.intValue())>1?false:true)]]></printWhenExpression>
				</reportElement>
				<textElement textAlignment="Center">
					<font fontName="Courier New" size="10"/>
				</textElement>
				<text><![CDATA[... Input Parameter ...]]></text>
			</staticText>
			<textField pattern="MM/dd/yy">
				<reportElement x="653" y="20" width="40" height="10"/>
				<textElement>
					<font fontName="Courier New" size="7"/>
				</textElement>
				<textFieldExpression class="java.util.Date"><![CDATA[new java.util.Date()]]></textFieldExpression>
			</textField>
			<staticText>
				<reportElement x="706" y="10" width="32" height="10"/>
				<textElement>
					<font fontName="Courier New" size="7"/>
				</textElement>
				<text><![CDATA[Page :]]></text>
			</staticText>
			<staticText>
				<reportElement x="693" y="20" width="10" height="10"/>
				<textElement>
					<font fontName="Courier New" size="7"/>
				</textElement>
				<text><![CDATA[At ]]></text>
			</staticText>
			<staticText>
				<reportElement x="23" y="64" width="130" height="10" isRemoveLineWhenBlank="true">
					<printWhenExpression><![CDATA[new Boolean(($V{PAGE_NUMBER}.intValue())>1?false:true)]]></printWhenExpression>
				</reportElement>
				<textElement>
					<font fontName="Courier New" size="7"/>
				</textElement>
				<text><![CDATA[From Shipment Nbr .... :]]></text>
			</staticText>
			<staticText>
				<reportElement x="23" y="23" width="46" height="10"/>
				<textElement>
					<font fontName="Courier New" size="7"/>
				</textElement>
				<text><![CDATA[Wh/Co/Div::]]></text>
			</staticText>
			<staticText>
				<reportElement x="23" y="4" width="75" height="10"/>
				<textElement>
					<font fontName="Courier New" size="7"/>
				</textElement>
				<text><![CDATA[d_recv_worksheet]]></text>
			</staticText>
			<staticText>
				<reportElement x="23" y="54" width="104" height="10" isRemoveLineWhenBlank="true">
					<printWhenExpression><![CDATA[new Boolean(($V{PAGE_NUMBER}.intValue())>1?false:true)]]></printWhenExpression>
				</reportElement>
				<textElement>
					<font fontName="Courier New" size="7"/>
				</textElement>
				<text><![CDATA[Report Address ..... :]]></text>
			</staticText>
			<textField pattern="HH:mm:ss">
				<reportElement x="703" y="20" width="51" height="10"/>
				<textElement>
					<font fontName="Courier New" size="7"/>
				</textElement>
				<textFieldExpression class="java.util.Date"><![CDATA[new java.util.Date()]]></textFieldExpression>
			</textField>
			<textField isBlankWhenNull="true">
				<reportElement x="738" y="10" width="17" height="10"/>
				<textElement>
					<font fontName="Courier New" size="7"/>
				</textElement>
				<textFieldExpression class="java.lang.Integer"><![CDATA[$V{PAGE_NUMBER}]]></textFieldExpression>
			</textField>
			<textField isBlankWhenNull="true">
				<reportElement x="71" y="23" width="39" height="10"/>
				<textElement>
					<font fontName="Courier New" size="7"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{STATE_CODE}]]></textFieldExpression>
			</textField>
			<textField isBlankWhenNull="true">
				<reportElement x="167" y="64" width="105" height="10" isRemoveLineWhenBlank="true">
					<printWhenExpression><![CDATA[new Boolean(($V{PAGE_NUMBER}.intValue())>1?false:true)]]></printWhenExpression>
				</reportElement>
				<textElement>
					<font fontName="Courier New" size="7"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$P{ASN_NO_From}]]></textFieldExpression>
			</textField>
			<staticText>
				<reportElement x="23" y="74" width="104" height="10" isRemoveLineWhenBlank="true">
					<printWhenExpression><![CDATA[new Boolean(($V{PAGE_NUMBER}.intValue())>1?false:true)]]></printWhenExpression>
				</reportElement>
				<textElement>
					<font fontName="Courier New" size="7"/>
				</textElement>
				<text><![CDATA[To Shipment Nbr ....:]]></text>
			</staticText>
			<textField isBlankWhenNull="true">
				<reportElement x="167" y="74" width="105" height="10" isRemoveLineWhenBlank="true">
					<printWhenExpression><![CDATA[new Boolean(($V{PAGE_NUMBER}.intValue())>1?false:true)]]></printWhenExpression>
				</reportElement>
				<textElement>
					<font fontName="Courier New" size="7"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$P{ASN_NO_To}]]></textFieldExpression>
			</textField>
			<break>
				<reportElement x="0" y="83" width="100" height="1"/>
			</break>
		</band>
	</title>
	<pageHeader>
		<band height="150" splitType="Stretch">
			<textField isBlankWhenNull="true">
				<reportElement x="106" y="117" width="145" height="22"/>
				<textElement textAlignment="Left" verticalAlignment="Middle">
					<font fontName="Code 128AB" size="22"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[new java.lang.String(ibase.webitm.reports.sun.BaseReportGFMethods.gf_bar_code(ibase.webitm.reports.utility.BaseReportMethods.trim($F{PO_NO}) ) )]]></textFieldExpression>
			</textField>
			<textField isBlankWhenNull="true">
				<reportElement x="106" y="86" width="145" height="22"/>
				<textElement textAlignment="Left" verticalAlignment="Middle">
					<font fontName="Code 128AB" size="22"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[new java.lang.String(ibase.webitm.reports.sun.BaseReportGFMethods.gf_bar_code(ibase.webitm.reports.utility.BaseReportMethods.trim($F{SHPMENT_NO}) ) )]]></textFieldExpression>
			</textField>
			<staticText>
				<reportElement x="23" y="95" width="74" height="10"/>
				<textElement>
					<font fontName="Courier New" size="7"/>
				</textElement>
				<text><![CDATA[Shipment Nbr :]]></text>
			</staticText>
			<staticText>
				<reportElement x="475" y="98" width="62" height="10"/>
				<textElement>
					<font fontName="Courier New" size="7"/>
				</textElement>
				<text><![CDATA[Dock Door :]]></text>
			</staticText>
			<staticText>
				<reportElement x="475" y="129" width="62" height="10"/>
				<textElement>
					<font fontName="Courier New" size="7"/>
				</textElement>
				<text><![CDATA[BOL NO .. :]]></text>
			</staticText>
			<textField pattern="MM/dd/yy">
				<reportElement x="640" y="26" width="40" height="10"/>
				<textElement>
					<font fontName="Courier New" size="7"/>
				</textElement>
				<textFieldExpression class="java.util.Date"><![CDATA[new java.util.Date()]]></textFieldExpression>
			</textField>
			<textField pattern="HH:mm:ss">
				<reportElement x="690" y="26" width="51" height="10"/>
				<textElement>
					<font fontName="Courier New" size="7"/>
				</textElement>
				<textFieldExpression class="java.util.Date"><![CDATA[new java.util.Date()]]></textFieldExpression>
			</textField>
			<staticText>
				<reportElement x="10" y="29" width="46" height="10"/>
				<textElement>
					<font fontName="Courier New" size="7"/>
				</textElement>
				<text><![CDATA[Wh/Co/Div::]]></text>
			</staticText>
			<textField isBlankWhenNull="true">
				<reportElement x="58" y="29" width="39" height="10"/>
				<textElement>
					<font fontName="Courier New" size="7"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{STATE_CODE}]]></textFieldExpression>
			</textField>
			<staticText>
				<reportElement x="10" y="10" width="75" height="10"/>
				<textElement>
					<font fontName="Courier New" size="7"/>
				</textElement>
				<text><![CDATA[d_recv_worksheet]]></text>
			</staticText>
			<textField isBlankWhenNull="true">
				<reportElement x="725" y="16" width="17" height="10"/>
				<textElement>
					<font fontName="Courier New" size="7"/>
				</textElement>
				<textFieldExpression class="java.lang.Integer"><![CDATA[$V{PAGE_NUMBER}]]></textFieldExpression>
			</textField>
			<staticText>
				<reportElement x="348" y="12" width="176" height="14"/>
				<textElement textAlignment="Justified">
					<font fontName="Courier New" size="10"/>
				</textElement>
				<text><![CDATA[Receiving Worksheet]]></text>
			</staticText>
			<staticText>
				<reportElement x="10" y="20" width="46" height="10"/>
				<textElement>
					<font fontName="Courier New" size="7"/>
				</textElement>
				<text><![CDATA[WM]]></text>
			</staticText>
			<staticText>
				<reportElement x="680" y="26" width="10" height="10"/>
				<textElement>
					<font fontName="Courier New" size="7"/>
				</textElement>
				<text><![CDATA[At ]]></text>
			</staticText>
			<staticText>
				<reportElement x="693" y="16" width="32" height="10"/>
				<textElement>
					<font fontName="Courier New" size="7"/>
				</textElement>
				<text><![CDATA[Page :]]></text>
			</staticText>
			<staticText>
				<reportElement x="198" y="66" width="74" height="10"/>
				<textElement>
					<font fontName="Courier New" size="7"/>
				</textElement>
				<text><![CDATA[Delivery Date :]]></text>
			</staticText>
			<staticText>
				<reportElement x="198" y="51" width="74" height="10"/>
				<textElement>
					<font fontName="Courier New" size="7"/>
				</textElement>
				<text><![CDATA[Vendor Name :]]></text>
			</staticText>
			<staticText>
				<reportElement x="24" y="66" width="74" height="10"/>
				<textElement>
					<font fontName="Courier New" size="7"/>
				</textElement>
				<text><![CDATA[PO Date ... :]]></text>
			</staticText>
			<staticText>
				<reportElement x="24" y="51" width="74" height="10"/>
				<textElement>
					<font fontName="Courier New" size="7"/>
				</textElement>
				<text><![CDATA[Received From :]]></text>
			</staticText>
			<staticText>
				<reportElement x="24" y="128" width="74" height="10"/>
				<textElement>
					<font fontName="Courier New" size="7"/>
				</textElement>
				<text><![CDATA[PO Number ..:]]></text>
			</staticText>
			<textField isBlankWhenNull="true">
				<reportElement x="110" y="108" width="141" height="10" isRemoveLineWhenBlank="true"/>
				<textElement>
					<font fontName="Courier New" size="7"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{SHPMENT_NO}]]></textFieldExpression>
			</textField>
			<textField isBlankWhenNull="true">
				<reportElement x="110" y="139" width="141" height="10" isRemoveLineWhenBlank="true"/>
				<textElement>
					<font fontName="Courier New" size="7"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{PO_NO}]]></textFieldExpression>
			</textField>
		</band>
	</pageHeader>
	<columnHeader>
		<band height="35" splitType="Stretch">
			<staticText>
				<reportElement x="2" y="27" width="769" height="8"/>
				<textElement>
					<font fontName="Courier New" size="7"/>
				</textElement>
				<text><![CDATA[=============================================================================================================================================================================]]></text>
			</staticText>
			<staticText>
				<reportElement x="125" y="13" width="137" height="10"/>
				<textElement>
					<font fontName="Courier New" size="7"/>
				</textElement>
				<text><![CDATA[SKU Description]]></text>
			</staticText>
			<staticText>
				<reportElement x="18" y="13" width="85" height="10"/>
				<textElement>
					<font fontName="Courier New" size="7"/>
				</textElement>
				<text><![CDATA[SKU]]></text>
			</staticText>
			<staticText>
				<reportElement x="500" y="10" width="25" height="16"/>
				<textElement textAlignment="Right">
					<font fontName="Courier New" size="7"/>
				</textElement>
				<text><![CDATA[Inner Pack Qty]]></text>
			</staticText>
			<staticText>
				<reportElement x="296" y="10" width="18" height="17"/>
				<textElement>
					<font fontName="Courier New" size="7"/>
				</textElement>
				<text><![CDATA[Immd Need]]></text>
			</staticText>
			<staticText>
				<reportElement x="340" y="13" width="56" height="10"/>
				<textElement textAlignment="Left">
					<font fontName="Courier New" size="7"/>
				</textElement>
				<text><![CDATA[Shipped Units ]]></text>
			</staticText>
			<staticText>
				<reportElement x="415" y="13" width="65" height="10"/>
				<textElement textAlignment="Left">
					<font fontName="Courier New" size="7"/>
				</textElement>
				<text><![CDATA[Shipped LPNs]]></text>
			</staticText>
			<staticText>
				<reportElement x="639" y="13" width="30" height="10"/>
				<textElement textAlignment="Left">
					<font fontName="Courier New" size="7"/>
				</textElement>
				<text><![CDATA[Mnf Cod]]></text>
			</staticText>
			<staticText>
				<reportElement x="558" y="13" width="50" height="10"/>
				<textElement textAlignment="Left">
					<font fontName="Courier New" size="7"/>
				</textElement>
				<text><![CDATA[Location]]></text>
			</staticText>
			<staticText>
				<reportElement x="2" y="2" width="769" height="8"/>
				<textElement>
					<font fontName="Courier New" size="7"/>
				</textElement>
				<text><![CDATA[=============================================================================================================================================================================]]></text>
			</staticText>
		</band>
	</columnHeader>
	<detail>
		<band height="25" splitType="Stretch">
			<subreport>
				<reportElement x="0" y="0" width="772" height="25" isPrintInFirstWholeBand="true" isPrintWhenDetailOverflows="true"/>
				<parametersMapExpression><![CDATA[$P{REPORT_PARAMETERS_MAP}]]></parametersMapExpression>
				<subreportParameter name="ASN_NO">
					<subreportParameterExpression><![CDATA[$F{SHPMENT_NO}]]></subreportParameterExpression>
				</subreportParameter>
				<connectionExpression><![CDATA[$P{REPORT_CONNECTION}]]></connectionExpression>
				<returnValue subreportVariable="tot_po" toVariable="tot_po" calculation="Sum"/>
				<returnValue subreportVariable="tot_ship" toVariable="tot_ship" calculation="Sum"/>
				<subreportExpression class="java.io.InputStream"><![CDATA[new FileInputStream("C:/jboss-5.1.0.GA/server/default/deploy/ibase.ear/ibase.war/webitm/reports/jrxml/d_recv_worksheet_subrep1.jasper")]]></subreportExpression>
			</subreport>
		</band>
	</detail>
	<columnFooter>
		<band splitType="Stretch"/>
	</columnFooter>
	<pageFooter>
		<band/>
	</pageFooter>
	<lastPageFooter>
		<band height="100">
			<staticText>
				<reportElement x="0" y="49" width="85" height="10"/>
				<textElement textAlignment="Justified">
					<font fontName="Courier New" size="7"/>
				</textElement>
				<text><![CDATA[Received By :]]></text>
			</staticText>
			<staticText>
				<reportElement x="200" y="49" width="85" height="10"/>
				<textElement textAlignment="Justified">
					<font fontName="Courier New" size="7"/>
				</textElement>
				<text><![CDATA[Print Name :]]></text>
			</staticText>
			<staticText>
				<reportElement x="153" y="75" width="79" height="10"/>
				<textElement textAlignment="Justified">
					<font fontName="Courier New" size="7"/>
				</textElement>
				<text><![CDATA[Pallets Out :]]></text>
			</staticText>
			<staticText>
				<reportElement x="0" y="75" width="79" height="10"/>
				<textElement textAlignment="Justified">
					<font fontName="Courier New" size="7"/>
				</textElement>
				<text><![CDATA[Pallets In :]]></text>
			</staticText>
			<staticText>
				<reportElement x="403" y="49" width="41" height="10"/>
				<textElement textAlignment="Justified">
					<font fontName="Courier New" size="7"/>
				</textElement>
				<text><![CDATA[Date :]]></text>
			</staticText>
			<staticText>
				<reportElement x="307" y="75" width="118" height="10"/>
				<textElement textAlignment="Justified">
					<font fontName="Courier New" size="7"/>
				</textElement>
				<text><![CDATA[Driver Signature :]]></text>
			</staticText>
			<staticText>
				<reportElement x="522" y="75" width="61" height="10"/>
				<textElement textAlignment="Justified">
					<font fontName="Courier New" size="7"/>
				</textElement>
				<text><![CDATA[Time In :]]></text>
			</staticText>
			<staticText>
				<reportElement x="653" y="75" width="61" height="10"/>
				<textElement textAlignment="Justified">
					<font fontName="Courier New" size="7"/>
				</textElement>
				<text><![CDATA[Time Out :]]></text>
			</staticText>
			<staticText>
				<reportElement x="0" y="90" width="772" height="10"/>
				<textElement textAlignment="Justified">
					<font fontName="Courier New" size="7"/>
				</textElement>
				<text><![CDATA[===========================================================================================================================================================================================]]></text>
			</staticText>
			<staticText>
				<reportElement x="17" y="24" width="93" height="10"/>
				<textElement textAlignment="Justified">
					<font fontName="Courier New" size="7"/>
				</textElement>
				<text><![CDATA[Total For Shipment :]]></text>
			</staticText>
			<staticText>
				<reportElement x="17" y="7" width="85" height="10"/>
				<textElement textAlignment="Justified">
					<font fontName="Courier New" size="7"/>
				</textElement>
				<text><![CDATA[Total For PO :]]></text>
			</staticText>
			<staticText>
				<reportElement x="191" y="24" width="41" height="10"/>
				<textElement textAlignment="Justified">
					<font fontName="Courier New" size="7"/>
				</textElement>
				<text><![CDATA[Weight]]></text>
			</staticText>
			<textField pattern="###0">
				<reportElement x="340" y="7" width="63" height="10"/>
				<textElement textAlignment="Right">
					<font fontName="Courier New" size="7"/>
				</textElement>
				<textFieldExpression class="java.lang.Double"><![CDATA[$V{tot_po}]]></textFieldExpression>
			</textField>
			<textField pattern="###0">
				<reportElement x="340" y="24" width="63" height="10"/>
				<textElement textAlignment="Right">
					<font fontName="Courier New" size="7" isBold="false"/>
				</textElement>
				<textFieldExpression class="java.lang.Double"><![CDATA[$V{tot_ship}]]></textFieldExpression>
			</textField>
			<line>
				<reportElement x="2" y="41" width="770" height="1"/>
				<graphicElement>
					<pen lineWidth="0.5" lineStyle="Dashed"/>
				</graphicElement>
			</line>
			<line>
				<reportElement x="1" y="2" width="770" height="1"/>
				<graphicElement>
					<pen lineWidth="0.5" lineStyle="Dashed"/>
				</graphicElement>
			</line>
		</band>
	</lastPageFooter>
	<summary>
		<band splitType="Stretch"/>
	</summary>
</jasperReport>
