<?xml version="1.0" encoding="UTF-8"  ?>
<!-- Created with iReport - A designer for JasperReports -->
<!DOCTYPE jasperReport PUBLIC "//JasperReports//DTD Report Design//EN" "http://jasperreports.sourceforge.net/dtds/jasperreport.dtd">
<jasperReport
		 name="cashreceipt"

		 language="groovy"		 columnCount="1"
		 printOrder="Vertical"
		 orientation="Portrait"
		 pageWidth="595"
		 pageHeight="842"
		 columnWidth="535"
		 columnSpacing="0"
		 leftMargin="30"
		 rightMargin="30"
		 topMargin="20"
		 bottomMargin="20"
		 whenNoDataType="NoPages"
		 isTitleNewPage="false"
		 isSummaryNewPage="false">
	<property name="ireport.scriptlethandling" value="0" />
	<property name="ireport.encoding" value="UTF-8" />
	<import value="java.util.*" />
	<import value="net.sf.jasperreports.engine.*" />
	<import value="net.sf.jasperreports.engine.data.*" />

	<parameter name="receiptno" isForPrompting="true" class="java.lang.String"/>
	<parameter name="SUBREPORT_DIR" isForPrompting="false" class="java.lang.String">
		<defaultValueExpression ><![CDATA["C:\\Users\\annie\\Desktop\\reports\\samplereports\\src\\reports\\"]]></defaultValueExpression>
	</parameter>
	<parameter name="LOGOLGU" isForPrompting="false" class="java.io.InputStream"/>
	<queryString><![CDATA[SELECT objid, receiptno, receiptdate, amount,
       payer_name, paidby, paidbyaddress, 
       collector_name as collectorname, collector_title as collectortitle
FROM cashreceipt
WHERE receiptno=$P{receiptno}]]></queryString>

	<field name="amount" class="java.lang.Double"/>
	<field name="collectorname" class="java.lang.String"/>
	<field name="collectortitle" class="java.lang.String"/>
	<field name="objid" class="java.lang.String"/>
	<field name="paidby" class="java.lang.String"/>
	<field name="paidbyaddress" class="java.lang.String"/>
	<field name="payer_name" class="java.lang.String"/>
	<field name="receiptdate" class="java.sql.Timestamp"/>
	<field name="receiptno" class="java.lang.String"/>

		<background>
			<band height="0"  isSplitAllowed="true" >
			</band>
		</background>
		<title>
			<band height="194"  isSplitAllowed="true" >
				<staticText>
					<reportElement
						x="0"
						y="10"
						width="535"
						height="20"
						key="staticText-1"/>
					<box></box>
					<textElement textAlignment="Center">
						<font/>
					</textElement>
				<text><![CDATA[Republic of the Philippines]]></text>
				</staticText>
				<staticText>
					<reportElement
						x="0"
						y="25"
						width="535"
						height="20"
						key="staticText-2"/>
					<box></box>
					<textElement textAlignment="Center">
						<font/>
					</textElement>
				<text><![CDATA[Province of Misamis Occidental]]></text>
				</staticText>
				<staticText>
					<reportElement
						x="0"
						y="41"
						width="535"
						height="20"
						key="staticText-3"/>
					<box></box>
					<textElement textAlignment="Center">
						<font pdfFontName="Helvetica" isBold="false"/>
					</textElement>
				<text><![CDATA[OROQUIETA CITY]]></text>
				</staticText>
				<staticText>
					<reportElement
						x="0"
						y="70"
						width="535"
						height="20"
						key="staticText-4"/>
					<box></box>
					<textElement textAlignment="Center">
						<font pdfFontName="Helvetica" size="14" isBold="false"/>
					</textElement>
				<text><![CDATA[DETAILS OF COLLECTION]]></text>
				</staticText>
				<staticText>
					<reportElement
						x="0"
						y="100"
						width="50"
						height="20"
						key="staticText-6"/>
					<box></box>
					<textElement textAlignment="Left">
						<font/>
					</textElement>
				<text><![CDATA[Paid by:]]></text>
				</staticText>
				<staticText>
					<reportElement
						x="0"
						y="118"
						width="50"
						height="20"
						key="staticText-7"/>
					<box></box>
					<textElement textAlignment="Left">
						<font/>
					</textElement>
				<text><![CDATA[Address:]]></text>
				</staticText>
				<staticText>
					<reportElement
						x="385"
						y="100"
						width="70"
						height="20"
						key="staticText-8"/>
					<box></box>
					<textElement textAlignment="Left">
						<font/>
					</textElement>
				<text><![CDATA[Receipt No:]]></text>
				</staticText>
				<staticText>
					<reportElement
						x="385"
						y="118"
						width="70"
						height="20"
						key="staticText-9"/>
					<box></box>
					<textElement textAlignment="Left">
						<font/>
					</textElement>
				<text><![CDATA[Receipt Date:]]></text>
				</staticText>
				<textField isStretchWithOverflow="false" pattern="dd-MMM-yy" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						x="460"
						y="118"
						width="75"
						height="20"
						key="textField"/>
					<box></box>
					<textElement>
						<font pdfFontName="Helvetica-Bold" isBold="true"/>
					</textElement>
				<textFieldExpression   class="java.sql.Timestamp"><![CDATA[$F{receiptdate}]]></textFieldExpression>
				</textField>
				<textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						x="460"
						y="100"
						width="75"
						height="20"
						key="textField"/>
					<box></box>
					<textElement>
						<font pdfFontName="Helvetica-Bold" isBold="true"/>
					</textElement>
				<textFieldExpression   class="java.lang.String"><![CDATA[$F{receiptno}]]></textFieldExpression>
				</textField>
				<subreport  isUsingCache="true">
					<reportElement
						x="0"
						y="145"
						width="535"
						height="45"
						key="subreport-1"/>
					<subreportParameter  name="receiptid">
						<subreportParameterExpression><![CDATA[$F{objid}]]></subreportParameterExpression>
					</subreportParameter>
					<connectionExpression><![CDATA[$P{REPORT_CONNECTION}]]></connectionExpression>
					<subreportExpression  class="java.lang.String"><![CDATA[$P{SUBREPORT_DIR} + "cashreceiptitem.jasper"]]></subreportExpression>
				</subreport>
				<textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						x="51"
						y="100"
						width="280"
						height="20"
						key="textField"/>
					<box></box>
					<textElement>
						<font pdfFontName="Helvetica-Bold" isBold="true"/>
					</textElement>
				<textFieldExpression   class="java.lang.String"><![CDATA[$F{paidby}]]></textFieldExpression>
				</textField>
				<textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						x="51"
						y="118"
						width="280"
						height="20"
						key="textField"/>
					<box></box>
					<textElement>
						<font pdfFontName="Helvetica-Bold" isBold="true"/>
					</textElement>
				<textFieldExpression   class="java.lang.String"><![CDATA[$F{paidbyaddress}]]></textFieldExpression>
				</textField>
				<image  scaleImage="RetainShape" vAlign="Middle" hAlign="Center" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						x="80"
						y="10"
						width="60"
						height="60"
						key="image-1"/>
					<box></box>
					<graphicElement stretchType="NoStretch"/>
					<imageExpression class="java.io.InputStream"><![CDATA[$P{LOGOLGU}]]></imageExpression>
				</image>
			</band>
		</title>
		<pageHeader>
			<band height="110"  isSplitAllowed="true" >
				<staticText>
					<reportElement
						x="330"
						y="0"
						width="80"
						height="20"
						key="staticText-10"
						positionType="Float"/>
					<box></box>
					<textElement textAlignment="Right">
						<font pdfFontName="Helvetica-Bold" size="11" isBold="true"/>
					</textElement>
				<text><![CDATA[Total Payment:]]></text>
				</staticText>
				<textField isStretchWithOverflow="false" pattern="#,##0.00" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						x="415"
						y="0"
						width="85"
						height="20"
						key="textField"
						positionType="Float"/>
					<box></box>
					<textElement textAlignment="Right">
						<font pdfFontName="Helvetica-Bold" size="11" isBold="true"/>
					</textElement>
				<textFieldExpression   class="java.lang.Double"><![CDATA[$F{amount}]]></textFieldExpression>
				</textField>
				<textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						x="320"
						y="24"
						width="200"
						height="30"
						key="textField-1"
						positionType="Float"/>
					<box></box>
					<textElement>
						<font/>
					</textElement>
				<textFieldExpression   class="java.lang.String"><![CDATA[com.rameses.util.NumberToWords.getInstance().convert($F{amount}).toUpperCase()]]></textFieldExpression>
				</textField>
				<staticText>
					<reportElement
						x="224"
						y="24"
						width="90"
						height="20"
						key="staticText-11"/>
					<box></box>
					<textElement textAlignment="Right">
						<font pdfFontName="Helvetica-Bold" isBold="true"/>
					</textElement>
				<text><![CDATA[Amount in Words:]]></text>
				</staticText>
				<textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						x="170"
						y="77"
						width="140"
						height="20"
						key="textField"/>
					<box></box>
					<textElement textAlignment="Center">
						<font pdfFontName="Helvetica-Bold" isBold="true"/>
					</textElement>
				<textFieldExpression   class="java.lang.String"><![CDATA[$F{collectorname}]]></textFieldExpression>
				</textField>
				<textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						x="170"
						y="90"
						width="140"
						height="20"
						key="textField"/>
					<box></box>
					<textElement textAlignment="Center">
						<font/>
					</textElement>
				<textFieldExpression   class="java.lang.String"><![CDATA[$F{collectortitle}]]></textFieldExpression>
				</textField>
			</band>
		</pageHeader>
		<columnHeader>
			<band height="30"  isSplitAllowed="true" >
			</band>
		</columnHeader>
		<detail>
			<band height="100"  isSplitAllowed="true" >
			</band>
		</detail>
		<columnFooter>
			<band height="30"  isSplitAllowed="true" >
			</band>
		</columnFooter>
		<pageFooter>
			<band height="50"  isSplitAllowed="true" >
			</band>
		</pageFooter>
		<lastPageFooter>
			<band height="50"  isSplitAllowed="true" >
			</band>
		</lastPageFooter>
		<summary>
			<band height="50"  isSplitAllowed="true" >
			</band>
		</summary>
</jasperReport>
