<?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 B.SUPP_CODE__MNFR,
       A.SUPP_NAME,
       C.ADD1||C.ADD2 as MNFR_SITE_ADDRESS,
       NVL(B.SITE_CODE,'*') as SITE_CODE,
       NVL(C.DESCR,'Vendor Level Approved') as DESCR
from   SUPPLIER A,
       SUPP_APPRV_SITE B,
       SITE C
WHERE  A.SUPP_CODE  = B.SUPP_CODE__MNFR
AND    B.SITE_CODE  = C.SITE_CODE
and   b.site_code        =$P{as_site_code}
and   (CASE WHEN trim(B.status) ='A' THEN 'Approved' when trim(B.status) ='U' then 'Under Observation' when trim(B.status) ='D' then 'Disqualified' else 'Rejected' end)  = $P{as_apprv}
and   B.eff_from  between $P{as_from_date} and $P{as_to_date}
order by 1]]>
	</queryString>
	<field name="SUPP_NAME" class="java.lang.String"/>
	<field name="SUPP_CODE__MNFR" class="java.lang.String"/>
	<field name="MNFR_SITE_ADDRESS" class="java.lang.String"/>
	<field name="SITE_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 / Site Level"]]></initialValueExpression>
	</variable>
	<background>
		<band splitType="Stretch"/>
	</background>
	<title>
		<band height="44" splitType="Stretch">
			<textField>
				<reportElement x="198" y="0" width="351" 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="652" 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="616" 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="5" y="0" 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="105" splitType="Stretch">
			<frame>
				<reportElement x="4" y="85" 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="0" width="70" height="20"/>
					<textElement>
						<font fontName="Times New Roman" size="12" isBold="true"/>
					</textElement>
					<text><![CDATA[Vendor Code]]></text>
				</staticText>
				<staticText>
					<reportElement x="75" y="0" 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="237" y="0" width="195" height="20"/>
					<textElement>
						<font fontName="Times New Roman" size="12" isBold="true"/>
					</textElement>
					<text><![CDATA[Manufacturing Site Address]]></text>
				</staticText>
				<staticText>
					<reportElement x="494" y="0" width="214" height="20"/>
					<textElement>
						<font fontName="Times New Roman" size="12" isBold="true"/>
					</textElement>
					<text><![CDATA[Name of the Site ]]></text>
				</staticText>
				<staticText>
					<reportElement x="435" y="0" width="55" height="20"/>
					<textElement>
						<font fontName="Times New Roman" size="12" isBold="true"/>
					</textElement>
					<text><![CDATA[Site Code]]></text>
				</staticText>
			</frame>
			<frame>
				<reportElement x="4" y="0" 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="4" 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="4" 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="201" y="1" width="6" height="24"/>
					<textElement>
						<font fontName="Times New Roman" size="12" isBold="true"/>
					</textElement>
					<text><![CDATA[:]]></text>
				</staticText>
				<staticText>
					<reportElement x="201" y="28" width="6" height="23"/>
					<textElement>
						<font fontName="Times New Roman" size="12" isBold="true"/>
					</textElement>
					<text><![CDATA[:]]></text>
				</staticText>
				<staticText>
					<reportElement x="201" y="54" width="6" height="23"/>
					<textElement>
						<font fontName="Times New Roman" size="12" isBold="true"/>
					</textElement>
					<text><![CDATA[:]]></text>
				</staticText>
				<textField>
					<reportElement x="221" 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="221" 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="303" 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="255" 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="322" 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="221" 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="4" 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="194" y="0" width="1" height="77"/>
				</line>
			</frame>
			<line>
				<reportElement x="4" y="26" width="708" height="1"/>
			</line>
			<line>
				<reportElement x="4" y="53" width="708" height="1"/>
			</line>
		</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="RelativeToBandHeight" x="2" y="0" width="70" height="30"/>
					<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="75" 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>
					<reportElement positionType="Float" stretchType="RelativeToBandHeight" isPrintRepeatedValues="false" x="435" y="0" width="55" height="30"/>
					<textElement>
						<font fontName="Times New Roman"/>
					</textElement>
					<textFieldExpression class="java.lang.String"><![CDATA[$F{SITE_CODE}]]></textFieldExpression>
				</textField>
				<textField>
					<reportElement positionType="Float" stretchType="RelativeToTallestObject" isPrintRepeatedValues="false" x="237" y="0" width="195" height="30"/>
					<textElement>
						<font fontName="Times New Roman"/>
					</textElement>
					<textFieldExpression class="java.lang.String"><![CDATA[$F{MNFR_SITE_ADDRESS}]]></textFieldExpression>
				</textField>
				<textField isBlankWhenNull="true">
					<reportElement positionType="Float" stretchType="RelativeToTallestObject" isPrintRepeatedValues="false" x="494" y="0" width="214" height="30"/>
					<textElement>
						<font fontName="Times New Roman"/>
					</textElement>
					<textFieldExpression class="java.lang.String"><![CDATA[$F{DESCR}]]></textFieldExpression>
				</textField>
				<elementGroup/>
			</frame>
		</band>
	</detail>
	<columnFooter>
		<band splitType="Stretch"/>
	</columnFooter>
	<pageFooter>
		<band height="20" splitType="Stretch">
			<staticText>
				<reportElement x="564" 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="625" y="0" width="34" 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="663" 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>
