<?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="253"/>
	<property name="ireport.y" value="0"/>
	<parameter name="SUBREPORT_DIR" class="java.lang.String" isForPrompting="false">
		<defaultValueExpression><![CDATA["/data/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.SUPP_CODE IS NULL THEN ' 'ELSE ASH.SUPP_CODE END AS SUPP_CODE,
	(SELECT SUPP_NAME FROM SUPPLIER WHERE SUPPLIER.SUPP_CODE = ASH.SUPP_CODE) AS SUPP_DESC,
	CASE WHEN ASH.PURC_ORDER IS NULL THEN ' 'ELSE ASH.PURC_ORDER END AS PO_NO,
	(SELECT ORD_DATE FROM PORDER WHERE PORDER.PURC_ORDER = ASH.PURC_ORDER ) AS PO_DATE,
	ASH.ASN_DATE AS SHIP_DATE,
	CASE WHEN ASH.ASN_NO IS NULL THEN ' 'ELSE ASH.ASN_NO END AS SHPMENT_NO,
	(SELECT DISTINCT COUNT(*) ITEM_CODE FROM ASN_DET WHERE ASN_DET.TRAN_ID = ASH.TRAN_ID) AS TOT_ITEM,
	(SELECT SUM(NO_PALLET) FROM ASN_DET WHERE ASN_DET.TRAN_ID = ASH.TRAN_ID) AS TOT_PALLET
    FROM ASN_HDR ASH
    WHERE 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="SUPP_CODE" class="java.lang.String"/>
	<field name="SUPP_DESC" class="java.lang.String"/>
	<field name="SHIP_DATE" class="java.util.Date"/>
	<field name="TOT_ITEM" class="java.lang.Double"/>
	<field name="TOT_PALLET" class="java.lang.Double"/>
	<field name="PO_DATE" class="java.util.Date"/>
	<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 splitType="Stretch"/>
	</title>
	<pageHeader>
		<band height="108" splitType="Stretch">
			<textField isBlankWhenNull="true">
				<reportElement x="106" y="73" 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="82" width="74" height="10"/>
				<textElement>
					<font fontName="Courier New" size="7"/>
				</textElement>
				<text><![CDATA[ASN No ]]></text>
			</staticText>
			<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="271" y="36" width="70" height="10"/>
				<textElement>
					<font fontName="Courier New" size="7"/>
				</textElement>
				<text><![CDATA[Vendor Name ]]></text>
			</staticText>
			<staticText>
				<reportElement x="271" y="55" width="70" height="10"/>
				<textElement>
					<font fontName="Courier New" size="7"/>
				</textElement>
				<text><![CDATA[PO Date ]]></text>
			</staticText>
			<staticText>
				<reportElement x="24" y="36" width="74" height="10"/>
				<textElement>
					<font fontName="Courier New" size="7"/>
				</textElement>
				<text><![CDATA[Received From]]></text>
			</staticText>
			<textField isBlankWhenNull="true">
				<reportElement x="110" y="95" 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="108" y="55" width="145" height="10" isRemoveLineWhenBlank="true"/>
				<textElement>
					<font fontName="Courier New" size="7"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{PO_NO}]]></textFieldExpression>
			</textField>
			<staticText>
				<reportElement x="24" y="55" width="74" height="10"/>
				<textElement>
					<font fontName="Courier New" size="7"/>
				</textElement>
				<text><![CDATA[PO No  ]]></text>
			</staticText>
			<staticText>
				<reportElement x="271" y="73" width="70" height="10"/>
				<textElement>
					<font fontName="Courier New" size="7"/>
				</textElement>
				<text><![CDATA[Shipment Date  ]]></text>
			</staticText>
			<textField isBlankWhenNull="true">
				<reportElement x="108" y="36" width="145" height="10" isRemoveLineWhenBlank="true"/>
				<textElement>
					<font fontName="Courier New" size="7"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{SUPP_CODE}]]></textFieldExpression>
			</textField>
			<textField isBlankWhenNull="true">
				<reportElement x="350" y="36" width="241" height="10" isRemoveLineWhenBlank="true"/>
				<textElement>
					<font fontName="Courier New" size="7"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{SUPP_DESC}]]></textFieldExpression>
			</textField>
			<textField pattern="MM/dd/yy" isBlankWhenNull="true">
				<reportElement x="350" y="73" width="122" height="10" isRemoveLineWhenBlank="true"/>
				<textElement>
					<font fontName="Courier New" size="7"/>
				</textElement>
				<textFieldExpression class="java.util.Date"><![CDATA[$F{SHIP_DATE}]]></textFieldExpression>
			</textField>
			<staticText>
				<reportElement x="340" y="73" width="5" height="10"/>
				<textElement>
					<font fontName="Courier New" size="7"/>
				</textElement>
				<text><![CDATA[: ]]></text>
			</staticText>
			<staticText>
				<reportElement x="340" y="36" width="5" height="10"/>
				<textElement>
					<font fontName="Courier New" size="7"/>
				</textElement>
				<text><![CDATA[: ]]></text>
			</staticText>
			<staticText>
				<reportElement x="97" y="82" width="5" height="10"/>
				<textElement>
					<font fontName="Courier New" size="7"/>
				</textElement>
				<text><![CDATA[: ]]></text>
			</staticText>
			<staticText>
				<reportElement x="97" y="55" width="5" height="10"/>
				<textElement>
					<font fontName="Courier New" size="7"/>
				</textElement>
				<text><![CDATA[: ]]></text>
			</staticText>
			<staticText>
				<reportElement x="340" y="55" width="5" height="10"/>
				<textElement>
					<font fontName="Courier New" size="7"/>
				</textElement>
				<text><![CDATA[: ]]></text>
			</staticText>
			<staticText>
				<reportElement x="97" y="36" width="5" height="10"/>
				<textElement>
					<font fontName="Courier New" size="7"/>
				</textElement>
				<text><![CDATA[: ]]></text>
			</staticText>
			<textField pattern="MM/dd/yy" isBlankWhenNull="true">
				<reportElement x="350" y="55" width="122" height="10" isRemoveLineWhenBlank="true"/>
				<textElement>
					<font fontName="Courier New" size="7"/>
				</textElement>
				<textFieldExpression class="java.util.Date"><![CDATA[$F{PO_DATE}]]></textFieldExpression>
			</textField>
		</band>
	</pageHeader>
	<columnHeader>
		<band splitType="Stretch"/>
	</columnHeader>
	<detail>
		<band height="45" splitType="Stretch">
			<staticText>
				<reportElement x="21" y="7" width="93" height="10"/>
				<textElement textAlignment="Justified">
					<font fontName="Courier New" size="7"/>
				</textElement>
				<text><![CDATA[Total Items ]]></text>
			</staticText>
			<textField pattern="###0" isBlankWhenNull="true">
				<reportElement x="131" y="7" width="92" height="10" isRemoveLineWhenBlank="true"/>
				<textElement>
					<font fontName="Courier New" size="7"/>
				</textElement>
				<textFieldExpression class="java.lang.Double"><![CDATA[$F{TOT_ITEM}]]></textFieldExpression>
			</textField>
			<textField pattern="###0" isBlankWhenNull="true">
				<reportElement x="131" y="30" width="92" height="10" isRemoveLineWhenBlank="true"/>
				<textElement>
					<font fontName="Courier New" size="7"/>
				</textElement>
				<textFieldExpression class="java.lang.Double"><![CDATA[$F{TOT_PALLET}]]></textFieldExpression>
			</textField>
			<line>
				<reportElement x="2" y="44" width="770" height="1"/>
				<graphicElement>
					<pen lineWidth="0.5" lineStyle="Dashed"/>
				</graphicElement>
			</line>
			<staticText>
				<reportElement x="21" y="30" width="93" height="10"/>
				<textElement textAlignment="Justified">
					<font fontName="Courier New" size="7"/>
				</textElement>
				<text><![CDATA[Total # of Pallets]]></text>
			</staticText>
			<line>
				<reportElement x="0" y="1" width="770" height="1"/>
				<graphicElement>
					<pen lineWidth="0.5" lineStyle="Dashed"/>
				</graphicElement>
			</line>
			<staticText>
				<reportElement x="113" y="30" width="5" height="10"/>
				<textElement>
					<font fontName="Courier New" size="7"/>
				</textElement>
				<text><![CDATA[: ]]></text>
			</staticText>
			<staticText>
				<reportElement x="113" y="7" width="5" height="10"/>
				<textElement>
					<font fontName="Courier New" size="7"/>
				</textElement>
				<text><![CDATA[: ]]></text>
			</staticText>
		</band>
	</detail>
	<columnFooter>
		<band splitType="Stretch"/>
	</columnFooter>
	<pageFooter>
		<band/>
	</pageFooter>
	<lastPageFooter>
		<band/>
	</lastPageFooter>
	<summary>
		<band splitType="Stretch"/>
	</summary>
</jasperReport>
