<?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="Unnamed" pageWidth="650" pageHeight="864" columnWidth="610" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20">
	<property name="com.jasperassistant.designer.GridHeight" value="12"/>
	<property name="com.jasperassistant.designer.GridWidth" value="12"/>
	<property name="com.jasperassistant.designer.HGuides" value="0"/>
	<property name="com.jasperassistant.designer.DataSource" value="genral_ledger"/>
	<property name="com.jasperassistant.designer.SnapToGrid" value="false"/>
	<property name="com.jasperassistant.designer.Units" value="Inches"/>
	<property name="com.jasperassistant.designer.Grid" value="false"/>
	<property name="ireport.zoom" value="1.0"/>
	<property name="ireport.x" value="0"/>
	<property name="ireport.y" value="0"/>
	<reportFont name="Report_Font" isDefault="false" fontName="Courier New" size="9" isBold="false" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfFontName="Helvetica" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
	<parameter name="as_date" class="java.util.Date"/>
	<queryString>
		<![CDATA[SELECT		physcan.tran_date as trandate,
		stock.site_code as sitecd ,
		stock.item_code as itemcd,
		stock.loc_code as loccd,
		stock.lot_no as lotno,
		stock.lot_sl as lotsl,
		item.descr as itemdescr,
		invstat.inv_stat as invstat,
		invstat.descr as invdescr
 FROM
		physcan,
		physcandet,
		stock ,
		invstat,
		item
WHERE
		( physcandet.tran_id = physcan.tran_id ) and
		( physcandet.item_code = stock.item_code ) and
		( physcandet.lot_no = stock.lot_no ) and
		( physcandet.lot_sl = stock.lot_sl ) and
		( physcandet.loc_code = stock.loc_code ) and
		( physcan.tran_date = $P{as_date}) and
		( stock.inv_stat = invstat.inv_stat ) and
		( invstat.stat_type <> 'S') and
		( stock.quantity >= 0 ) and
		( physcandet.item_code = item.item_code ) and
		(invstat.inv_stat IN ('PSO','CASPK','DSO')) /* 'ACTPK' is removed as per requirement by Ashish Mehta on 02/07/2012*/
order by stock.site_code,  invstat.inv_stat,stock.loc_code]]>
	</queryString>
	<field name="sitecd" class="java.lang.String"/>
	<field name="itemcd" class="java.lang.String"/>
	<field name="loccd" class="java.lang.String"/>
	<field name="lotno" class="java.lang.String"/>
	<field name="lotsl" class="java.lang.String"/>
	<field name="itemdescr" class="java.lang.String"/>
	<field name="invstat" class="java.lang.String"/>
	<field name="invdescr" class="java.lang.String"/>
	<field name="trandate" class="java.util.Date"/>
	<variable name="varPage01" class="java.lang.String" resetType="None">
		<variableExpression><![CDATA[new java.lang.String("Page " + ($V{PAGE_NUMBER}).intValue())]]></variableExpression>
	</variable>
	<variable name="varPgCount02" class="java.lang.String" resetType="None">
		<variableExpression><![CDATA[new java.lang.String(""+ " of " + ($V{PAGE_NUMBER}).intValue())]]></variableExpression>
	</variable>
	<group name="sitecode" isStartNewPage="true" isResetPageNumber="true">
		<groupExpression><![CDATA[$F{sitecd}]]></groupExpression>
		<groupHeader>
			<band/>
		</groupHeader>
		<groupFooter>
			<band/>
		</groupFooter>
	</group>
	<group name="invstat" isStartNewPage="true">
		<groupExpression><![CDATA[$F{invstat}]]></groupExpression>
		<groupHeader>
			<band/>
		</groupHeader>
		<groupFooter>
			<band/>
		</groupFooter>
	</group>
	<pageHeader>
		<band height="124" splitType="Stretch">
			<staticText>
				<reportElement positionType="Float" mode="Transparent" x="2" y="68" width="562" height="13">
					<printWhenExpression><![CDATA[new Boolean(true)]]></printWhenExpression>
				</reportElement>
				<textElement textAlignment="Left">
					<font fontName="Courier New" size="10" isBold="false"/>
				</textElement>
				<text><![CDATA[------------------------------------------------------------------------------------------------------------------------------------]]></text>
			</staticText>
			<staticText>
				<reportElement positionType="Float" mode="Transparent" x="2" y="108" width="562" height="13">
					<printWhenExpression><![CDATA[new Boolean(true)]]></printWhenExpression>
				</reportElement>
				<textElement textAlignment="Left">
					<font fontName="Courier New" size="10" isBold="false"/>
				</textElement>
				<text><![CDATA[------------------------------------------------------------------------------------------------------------------------------------]]></text>
			</staticText>
			<staticText>
				<reportElement positionType="Float" mode="Transparent" x="395" y="54" width="53" height="13">
					<printWhenExpression><![CDATA[new Boolean(true)]]></printWhenExpression>
				</reportElement>
				<textElement textAlignment="Right">
					<font fontName="Courier New" size="10" isBold="false"/>
				</textElement>
				<text><![CDATA[Date:]]></text>
			</staticText>
			<staticText>
				<reportElement positionType="Float" mode="Transparent" x="3" y="95" width="98" height="13">
					<printWhenExpression><![CDATA[new Boolean(true)]]></printWhenExpression>
				</reportElement>
				<textElement textAlignment="Left">
					<font fontName="Courier New" size="10" isBold="false"/>
				</textElement>
				<text><![CDATA[Type of Location]]></text>
			</staticText>
			<staticText>
				<reportElement positionType="Float" mode="Transparent" x="110" y="95" width="70" height="13">
					<printWhenExpression><![CDATA[new Boolean(true)]]></printWhenExpression>
				</reportElement>
				<textElement textAlignment="Left">
					<font fontName="Courier New" size="10" isBold="false"/>
				</textElement>
				<text><![CDATA[Item Code]]></text>
			</staticText>
			<staticText>
				<reportElement positionType="Float" mode="Transparent" x="189" y="95" width="79" height="13">
					<printWhenExpression><![CDATA[new Boolean(true)]]></printWhenExpression>
				</reportElement>
				<textElement textAlignment="Left">
					<font fontName="Courier New" size="10" isBold="false"/>
				</textElement>
				<text><![CDATA[Item Descr]]></text>
			</staticText>
			<staticText>
				<reportElement positionType="Float" mode="Transparent" x="334" y="95" width="59" height="13">
					<printWhenExpression><![CDATA[new Boolean(true)]]></printWhenExpression>
				</reportElement>
				<textElement textAlignment="Left">
					<font fontName="Courier New" size="10" isBold="false"/>
				</textElement>
				<text><![CDATA[Location]]></text>
			</staticText>
			<staticText>
				<reportElement positionType="Float" mode="Transparent" x="403" y="95" width="74" height="13">
					<printWhenExpression><![CDATA[new Boolean(true)]]></printWhenExpression>
				</reportElement>
				<textElement textAlignment="Left">
					<font fontName="Courier New" size="10" isBold="false"/>
				</textElement>
				<text><![CDATA[Lot No]]></text>
			</staticText>
			<textField evaluationTime="Page" pattern="" isBlankWhenNull="true">
				<reportElement positionType="Float" x="451" y="36" width="64" height="13">
					<printWhenExpression><![CDATA[new Boolean(true)]]></printWhenExpression>
				</reportElement>
				<textElement textAlignment="Right">
					<font fontName="Courier New" size="10"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$V{varPage01}]]></textFieldExpression>
			</textField>
			<textField evaluationTime="Group" evaluationGroup="sitecode" pattern="" isBlankWhenNull="true">
				<reportElement positionType="Float" x="515" y="36" width="49" height="13"/>
				<textElement textAlignment="Left">
					<font fontName="Courier New" size="10"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$V{varPgCount02}]]></textFieldExpression>
			</textField>
			<textField pattern="MM/dd/yy" isBlankWhenNull="true">
				<reportElement positionType="Float" x="449" y="54" width="102" height="13">
					<printWhenExpression><![CDATA[new Boolean(true)]]></printWhenExpression>
				</reportElement>
				<textElement textAlignment="Right">
					<font fontName="Courier New" size="10"/>
				</textElement>
				<textFieldExpression class="java.util.Date"><![CDATA[$F{trandate}]]></textFieldExpression>
			</textField>
			<staticText>
				<reportElement positionType="Float" mode="Transparent" x="6" y="49" width="69" height="13">
					<printWhenExpression><![CDATA[new Boolean(true)]]></printWhenExpression>
				</reportElement>
				<textElement textAlignment="Left">
					<font fontName="Courier New" size="10" isBold="false"/>
				</textElement>
				<text><![CDATA[Site Code:]]></text>
			</staticText>
			<staticText>
				<reportElement positionType="Float" mode="Transparent" x="2" y="0" width="573" height="26">
					<printWhenExpression><![CDATA[new Boolean(true)]]></printWhenExpression>
				</reportElement>
				<textElement textAlignment="Center">
					<font fontName="Courier New" size="20" isBold="false"/>
				</textElement>
				<text><![CDATA[Physical Count Checklist]]></text>
			</staticText>
			<staticText>
				<reportElement positionType="Float" mode="Transparent" x="481" y="95" width="67" height="13">
					<printWhenExpression><![CDATA[new Boolean(true)]]></printWhenExpression>
				</reportElement>
				<textElement textAlignment="Left">
					<font fontName="Courier New" size="10" isBold="false"/>
				</textElement>
				<text><![CDATA[LPN]]></text>
			</staticText>
			<textField pattern="" isBlankWhenNull="true">
				<reportElement positionType="Float" x="75" y="49" width="49" height="13">
					<printWhenExpression><![CDATA[new Boolean(true)]]></printWhenExpression>
				</reportElement>
				<textElement textAlignment="Left">
					<font fontName="Courier New" size="10" isUnderline="false"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{sitecd}]]></textFieldExpression>
			</textField>
		</band>
	</pageHeader>
	<detail>
		<band height="17" splitType="Stretch">
			<textField isStretchWithOverflow="true" pattern="" isBlankWhenNull="true">
				<reportElement positionType="Float" x="3" y="0" width="98" height="13">
					<printWhenExpression><![CDATA[new Boolean(true)]]></printWhenExpression>
				</reportElement>
				<textElement textAlignment="Left">
					<font fontName="Courier New" size="10" isUnderline="false"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{invdescr}]]></textFieldExpression>
			</textField>
			<textField isStretchWithOverflow="true" pattern="" isBlankWhenNull="true">
				<reportElement positionType="Float" x="189" y="0" width="131" height="13">
					<printWhenExpression><![CDATA[new Boolean(true)]]></printWhenExpression>
				</reportElement>
				<textElement textAlignment="Left">
					<font fontName="Courier New" size="10" isUnderline="false"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{itemdescr}]]></textFieldExpression>
			</textField>
			<textField pattern="dd/MM/yy" isBlankWhenNull="true">
				<reportElement positionType="Float" x="110" y="0" width="70" height="13">
					<printWhenExpression><![CDATA[new Boolean(true)]]></printWhenExpression>
				</reportElement>
				<textElement textAlignment="Left">
					<font fontName="Courier New" size="10" isUnderline="false"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{itemcd}]]></textFieldExpression>
			</textField>
			<textField pattern="0.000" isBlankWhenNull="true">
				<reportElement positionType="Float" x="403" y="0" width="74" height="13"/>
				<textElement textAlignment="Left">
					<font fontName="Courier New" size="10"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{lotno}]]></textFieldExpression>
			</textField>
			<textField pattern="0.000" isBlankWhenNull="true">
				<reportElement positionType="Float" x="334" y="0" width="59" height="13"/>
				<textElement textAlignment="Left">
					<font fontName="Courier New" size="10"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{loccd}]]></textFieldExpression>
			</textField>
			<textField pattern="0.000" isBlankWhenNull="true">
				<reportElement positionType="Float" x="481" y="0" width="67" height="13"/>
				<textElement textAlignment="Left">
					<font fontName="Courier New" size="10"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{lotsl}]]></textFieldExpression>
			</textField>
		</band>
	</detail>
	<pageFooter>
		<band height="14" splitType="Stretch">
			<staticText>
				<reportElement positionType="Float" mode="Transparent" x="2" y="0" width="573" height="13">
					<printWhenExpression><![CDATA[new Boolean(false)]]></printWhenExpression>
				</reportElement>
				<textElement textAlignment="Left">
					<font fontName="Courier New" size="10" isBold="false"/>
				</textElement>
				<text><![CDATA[------------------------------------------------------------------------------------------------------------------------------------]]></text>
			</staticText>
		</band>
	</pageFooter>
</jasperReport>
