<?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_list_vendor" pageWidth="752" pageHeight="595" orientation="Landscape" columnWidth="712" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20">
	<property name="ireport.zoom" value="1.0"/>
	<property name="ireport.x" value="0"/>
	<property name="ireport.y" value="0"/>
	<parameter name="as_site_code" class="java.lang.String"/>
	<parameter name="as_apprv" class="java.lang.String"/>
	<parameter name="as_from_date" class="java.util.Date"/>
	<parameter name="as_to_date" class="java.util.Date"/>
	<queryString>
		<![CDATA[select c.supp_code__mnfr,
       a.supp_name,
       d.add1||d.add2 as address,
       c.item_code,
       e.descr
from
supplier a,
ITEMMNFR c,
site d,
item e
where a.supp_code        = c.supp_code__mnfr
and   c.site_code        = d.site_code
and   c.item_code        = e.item_code
and   c.site_code        =$P{as_site_code}
and   (CASE WHEN trim(c.status) ='A' THEN 'Approved' when trim(c.status) ='U' then 'Under Observation' when trim(c.status) ='D' then 'Disqualified' else 'Rejected' end)  = $P{as_apprv}
and   c.eff_from          between $P{as_from_date} and $P{as_to_date}
order by 1]]>
	</queryString>
	<field name="SUPP_CODE__MNFR" class="java.lang.String"/>
	<field name="SUPP_NAME" class="java.lang.String"/>
	<field name="ADDRESS" class="java.lang.String"/>
	<field name="ITEM_CODE" class="java.lang.String"/>
	<field name="DESCR" class="java.lang.String"/>
	<variable name="as_heading" class="java.lang.String" calculation="System">
		<variableExpression><![CDATA[$P{as_apprv}]]></variableExpression>
		<initialValueExpression><![CDATA["List of"+" "+$P{as_apprv}+" "+"Vendors - Item Level"]]></initialValueExpression>
	</variable>
	<background>
		<band splitType="Stretch"/>
	</background>
	<title>
		<band height="43" splitType="Stretch">
			<textField>
				<reportElement x="204" y="0" width="328" height="20"/>
				<textElement textAlignment="Center">
					<font fontName="Times New Roman" size="14" isBold="true"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$V{as_heading}]]></textFieldExpression>
			</textField>
			<textField pattern="MM/dd/yy">
				<reportElement x="653" y="0" width="59" height="20"/>
				<textElement>
					<font fontName="Times New Roman" size="14" isBold="false"/>
				</textElement>
				<textFieldExpression class="java.util.Date"><![CDATA[new java.util.Date()]]></textFieldExpression>
			</textField>
			<staticText>
				<reportElement x="617" y="0" width="34" height="20"/>
				<textElement>
					<font fontName="Times New Roman" size="14" isBold="true"/>
				</textElement>
				<text><![CDATA[Date]]></text>
			</staticText>
			<image>
				<reportElement x="4" y="2" width="43" height="41"/>
				<imageExpression class="java.lang.String"><![CDATA["D:\\Sabita_folder\\Work\\List of approved vendor\\05.12.12\\AM1.jpg"]]></imageExpression>
			</image>
		</band>
	</title>
	<pageHeader>
		<band splitType="Stretch"/>
	</pageHeader>
	<columnHeader>
		<band height="110" splitType="Stretch">
			<frame>
				<reportElement x="4" y="90" width="708" height="20"/>
				<box>
					<pen lineWidth="0.0"/>
					<topPen lineWidth="0.0"/>
					<leftPen lineWidth="0.0"/>
					<bottomPen lineWidth="0.0"/>
					<rightPen lineWidth="0.0"/>
				</box>
				<staticText>
					<reportElement x="1" y="-1" width="70" height="20"/>
					<textElement>
						<font fontName="Times New Roman" size="12" isBold="true"/>
					</textElement>
					<text><![CDATA[Vendor Code]]></text>
				</staticText>
				<staticText>
					<reportElement x="79" y="-1" width="158" height="20"/>
					<textElement>
						<font fontName="Times New Roman" size="12" isBold="true"/>
					</textElement>
					<text><![CDATA[Name of the Vendor]]></text>
				</staticText>
				<staticText>
					<reportElement x="240" y="-1" width="218" height="20"/>
					<textElement>
						<font fontName="Times New Roman" size="12" isBold="true"/>
					</textElement>
					<text><![CDATA[Manufacturing Site Address]]></text>
				</staticText>
				<staticText>
					<reportElement x="524" y="-2" width="183" height="20"/>
					<textElement>
						<font fontName="Times New Roman" size="12" isBold="true"/>
					</textElement>
					<text><![CDATA[Name of the Material]]></text>
				</staticText>
				<staticText>
					<reportElement x="459" y="1" width="63" height="18"/>
					<textElement>
						<font fontName="Times New Roman" size="12" isBold="true"/>
					</textElement>
					<text><![CDATA[Item Code]]></text>
				</staticText>
			</frame>
			<frame>
				<reportElement x="4" y="5" width="708" height="77"/>
				<box>
					<pen lineWidth="1.0"/>
					<topPen lineWidth="1.0"/>
					<leftPen lineWidth="1.0"/>
					<bottomPen lineWidth="1.0"/>
					<rightPen lineWidth="1.0"/>
				</box>
				<staticText>
					<reportElement x="1" y="30" width="190" height="20"/>
					<box>
						<pen lineWidth="0.0"/>
						<topPen lineWidth="0.0"/>
						<leftPen lineWidth="0.0"/>
						<bottomPen lineWidth="0.0"/>
						<rightPen lineWidth="0.0"/>
					</box>
					<textElement>
						<font fontName="Times New Roman" size="12" isBold="true"/>
					</textElement>
					<text><![CDATA[Period]]></text>
				</staticText>
				<staticText>
					<reportElement x="1" y="57" width="190" height="20"/>
					<box>
						<pen lineWidth="0.0"/>
						<topPen lineWidth="0.0"/>
						<leftPen lineWidth="0.0"/>
						<bottomPen lineWidth="0.0"/>
						<rightPen lineWidth="0.0"/>
					</box>
					<textElement>
						<font fontName="Times New Roman" size="12" isBold="true"/>
					</textElement>
					<text><![CDATA[Period Status]]></text>
				</staticText>
				<staticText>
					<reportElement x="198" y="1" width="6" height="24"/>
					<textElement>
						<font fontName="Times New Roman" size="12" isBold="true"/>
					</textElement>
					<text><![CDATA[:]]></text>
				</staticText>
				<staticText>
					<reportElement x="198" y="28" width="6" height="23"/>
					<textElement>
						<font fontName="Times New Roman" size="12" isBold="true"/>
					</textElement>
					<text><![CDATA[:]]></text>
				</staticText>
				<staticText>
					<reportElement x="198" y="54" width="6" height="23"/>
					<textElement>
						<font fontName="Times New Roman" size="12" isBold="true"/>
					</textElement>
					<text><![CDATA[:]]></text>
				</staticText>
				<textField>
					<reportElement x="218" y="2" width="100" height="20"/>
					<textElement>
						<font fontName="Times New Roman" size="12"/>
					</textElement>
					<textFieldExpression class="java.lang.String"><![CDATA[$P{as_site_code}]]></textFieldExpression>
				</textField>
				<staticText>
					<reportElement x="218" y="30" width="29" height="20"/>
					<textElement>
						<font fontName="Times New Roman" size="12" isBold="true"/>
					</textElement>
					<text><![CDATA[From]]></text>
				</staticText>
				<staticText>
					<reportElement x="300" y="30" width="16" height="20"/>
					<textElement>
						<font fontName="Times New Roman" size="12" isBold="true"/>
					</textElement>
					<text><![CDATA[To]]></text>
				</staticText>
				<textField pattern="MM/dd/yy">
					<reportElement x="252" y="30" width="45" height="20"/>
					<textElement>
						<font fontName="Times New Roman" size="12"/>
					</textElement>
					<textFieldExpression class="java.util.Date"><![CDATA[$P{as_from_date}]]></textFieldExpression>
				</textField>
				<textField pattern="MM/dd/yy">
					<reportElement x="319" y="30" width="100" height="20"/>
					<textElement>
						<font fontName="Times New Roman" size="12"/>
					</textElement>
					<textFieldExpression class="java.util.Date"><![CDATA[$P{as_to_date}]]></textFieldExpression>
				</textField>
				<textField>
					<reportElement x="218" y="57" width="241" height="20"/>
					<textElement>
						<font fontName="Times New Roman" size="12" isBold="false"/>
					</textElement>
					<textFieldExpression class="java.lang.String"><![CDATA[$P{as_apprv}]]></textFieldExpression>
				</textField>
				<staticText>
					<reportElement x="1" y="2" width="100" height="20"/>
					<textElement>
						<font fontName="Times New Roman" size="12" isBold="true"/>
					</textElement>
					<text><![CDATA[Location]]></text>
				</staticText>
				<line>
					<reportElement x="191" y="0" width="1" height="77"/>
				</line>
				<line>
					<reportElement x="0" y="25" width="707" height="1"/>
				</line>
				<line>
					<reportElement x="0" y="53" width="707" height="1"/>
				</line>
			</frame>
		</band>
	</columnHeader>
	<detail>
		<band height="30" splitType="Stretch">
			<frame>
				<reportElement positionType="Float" stretchType="RelativeToTallestObject" x="4" y="0" width="708" height="30"/>
				<box>
					<pen lineWidth="0.0"/>
					<topPen lineWidth="0.0"/>
					<leftPen lineWidth="0.0"/>
					<bottomPen lineWidth="0.0"/>
					<rightPen lineWidth="0.0"/>
				</box>
				<textField isBlankWhenNull="true">
					<reportElement positionType="Float" stretchType="RelativeToTallestObject" x="2" y="0" width="70" height="20"/>
					<textElement>
						<font fontName="Times New Roman"/>
					</textElement>
					<textFieldExpression class="java.lang.String"><![CDATA[$F{SUPP_CODE__MNFR}]]></textFieldExpression>
				</textField>
				<textField isBlankWhenNull="true">
					<reportElement positionType="Float" stretchType="RelativeToTallestObject" x="79" y="0" width="158" height="30"/>
					<textElement>
						<font fontName="Times New Roman"/>
					</textElement>
					<textFieldExpression class="java.lang.String"><![CDATA[$F{SUPP_NAME}]]></textFieldExpression>
				</textField>
				<textField isBlankWhenNull="true">
					<reportElement positionType="Float" stretchType="RelativeToTallestObject" x="241" y="0" width="218" height="30"/>
					<textElement>
						<font fontName="Times New Roman"/>
					</textElement>
					<textFieldExpression class="java.lang.String"><![CDATA[$F{ADDRESS}]]></textFieldExpression>
				</textField>
				<textField isBlankWhenNull="true">
					<reportElement positionType="Float" stretchType="RelativeToTallestObject" x="524" y="-1" width="183" height="30"/>
					<textElement>
						<font fontName="Times New Roman"/>
					</textElement>
					<textFieldExpression class="java.lang.String"><![CDATA[$F{DESCR}]]></textFieldExpression>
				</textField>
				<textField isBlankWhenNull="true">
					<reportElement positionType="Float" stretchType="RelativeToTallestObject" x="459" y="0" width="63" height="20"/>
					<textElement>
						<font fontName="Times New Roman"/>
					</textElement>
					<textFieldExpression class="java.lang.String"><![CDATA[$F{ITEM_CODE}]]></textFieldExpression>
				</textField>
			</frame>
		</band>
	</detail>
	<columnFooter>
		<band splitType="Stretch"/>
	</columnFooter>
	<pageFooter>
		<band height="20" splitType="Stretch">
			<staticText>
				<reportElement x="567" y="0" width="58" height="20"/>
				<textElement>
					<font fontName="Times New Roman" size="14" isBold="true"/>
				</textElement>
				<text><![CDATA[Page No.]]></text>
			</staticText>
			<textField>
				<reportElement x="626" y="0" width="32" height="20"/>
				<textElement textAlignment="Right">
					<font fontName="Times New Roman" size="14"/>
				</textElement>
				<textFieldExpression class="java.lang.Integer"><![CDATA[$V{PAGE_NUMBER}]]></textFieldExpression>
			</textField>
			<staticText>
				<reportElement x="661" y="0" width="17" height="20"/>
				<textElement>
					<font fontName="Times New Roman" size="14" isBold="true"/>
				</textElement>
				<text><![CDATA[To]]></text>
			</staticText>
			<textField evaluationTime="Report">
				<reportElement x="681" y="0" width="31" height="20"/>
				<textElement textAlignment="Right">
					<font fontName="Times New Roman" size="14"/>
				</textElement>
				<textFieldExpression class="java.lang.Integer"><![CDATA[$V{PAGE_NUMBER}]]></textFieldExpression>
			</textField>
		</band>
	</pageFooter>
	<summary>
		<band splitType="Stretch"/>
	</summary>
</jasperReport>
