<?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="rpt_report"
		 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="2" />
	<property name="ireport.encoding" value="UTF-8" />
	<import value="java.util.*" />
	<import value="net.sf.jasperreports.engine.*" />
	<import value="net.sf.jasperreports.engine.data.*" />

	<queryString><![CDATA[SELECT taxpayer_objid AS taxpayerid,
  fullpin, classcode, classification_objid AS classification,
  totalav, owner_name AS ownername, barangayid
  FROM rptledger
ORDER BY classification, ownername]]></queryString>

	<field name="barangayid" class="java.lang.String"/>
	<field name="classcode" class="java.lang.String"/>
	<field name="classification" class="java.lang.String"/>
	<field name="fullpin" class="java.lang.String"/>
	<field name="ownername" class="java.lang.String"/>
	<field name="taxpayerid" class="java.lang.String"/>
	<field name="totalav" class="java.lang.Double"/>

	<variable name="ownertotalav" class="java.lang.Double" resetType="Group" resetGroup="owner" calculation="Sum">
		<variableExpression><![CDATA[$F{totalav}]]></variableExpression>
	</variable>
	<variable name="grandtotalav" class="java.lang.Double" resetType="Report" calculation="Sum">
		<variableExpression><![CDATA[$F{totalav}]]></variableExpression>
	</variable>

		<group  name="classification" >
			<groupExpression><![CDATA[$F{classification}]]></groupExpression>
			<groupHeader>
			<band height="25"  isSplitAllowed="true" >
				<textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						x="16"
						y="5"
						width="100"
						height="18"
						key="textField"/>
					<box></box>
					<textElement>
						<font pdfFontName="Helvetica-Bold" size="12" isBold="true"/>
					</textElement>
				<textFieldExpression   class="java.lang.String"><![CDATA[$F{classification}]]></textFieldExpression>
				</textField>
			</band>
			</groupHeader>
			<groupFooter>
			<band height="23"  isSplitAllowed="true" >
				<staticText>
					<reportElement
						x="46"
						y="0"
						width="131"
						height="17"
						key="staticText-1"/>
					<box></box>
					<textElement>
						<font/>
					</textElement>
				<text><![CDATA[Total classification count:]]></text>
				</staticText>
				<textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						x="177"
						y="0"
						width="33"
						height="18"
						key="textField"/>
					<box></box>
					<textElement>
						<font/>
					</textElement>
				<textFieldExpression   class="java.lang.Integer"><![CDATA[$V{classification_COUNT}]]></textFieldExpression>
				</textField>
				<textField isStretchWithOverflow="false" pattern="#,##0.00" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						x="332"
						y="0"
						width="110"
						height="18"
						key="textField"/>
					<box></box>
					<textElement>
						<font/>
					</textElement>
				<textFieldExpression   class="java.lang.Double"><![CDATA[$V{grandtotalav}]]></textFieldExpression>
				</textField>
				<staticText>
					<reportElement
						x="253"
						y="0"
						width="71"
						height="17"
						key="staticText-4"/>
					<box></box>
					<textElement textAlignment="Right">
						<font/>
					</textElement>
				<text><![CDATA[Grand Total:]]></text>
				</staticText>
			</band>
			</groupFooter>
		</group>
		<group  name="owner" >
			<groupExpression><![CDATA[$F{ownername}]]></groupExpression>
			<groupHeader>
			<band height="23"  isSplitAllowed="true" >
				<textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						x="46"
						y="5"
						width="331"
						height="18"
						key="textField"/>
					<box></box>
					<textElement>
						<font/>
					</textElement>
				<textFieldExpression   class="java.lang.String"><![CDATA[$F{ownername}]]></textFieldExpression>
				</textField>
			</band>
			</groupHeader>
			<groupFooter>
			<band height="25"  isSplitAllowed="true" >
				<textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						x="153"
						y="0"
						width="100"
						height="18"
						key="textField"/>
					<box></box>
					<textElement>
						<font/>
					</textElement>
				<textFieldExpression   class="java.lang.Integer"><![CDATA[$V{owner_COUNT}]]></textFieldExpression>
				</textField>
				<staticText>
					<reportElement
						x="46"
						y="0"
						width="90"
						height="17"
						key="staticText-2"/>
					<box></box>
					<textElement>
						<font/>
					</textElement>
				<text><![CDATA[Total owner count:]]></text>
				</staticText>
				<textField isStretchWithOverflow="false" pattern="#,##0.00" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						x="323"
						y="0"
						width="84"
						height="18"
						key="textField"/>
					<box></box>
					<textElement textAlignment="Right">
						<font/>
					</textElement>
				<textFieldExpression   class="java.lang.Double"><![CDATA[$V{ownertotalav}]]></textFieldExpression>
				</textField>
				<staticText>
					<reportElement
						x="248"
						y="0"
						width="71"
						height="17"
						key="staticText-3"/>
					<box></box>
					<textElement textAlignment="Right">
						<font/>
					</textElement>
				<text><![CDATA[Total:]]></text>
				</staticText>
			</band>
			</groupFooter>
		</group>
		<background>
			<band height="0"  isSplitAllowed="true" >
			</band>
		</background>
		<title>
			<band height="18"  isSplitAllowed="true" >
			</band>
		</title>
		<pageHeader>
			<band height="51"  isSplitAllowed="true" >
			</band>
		</pageHeader>
		<columnHeader>
			<band height="30"  isSplitAllowed="true" >
			</band>
		</columnHeader>
		<detail>
			<band height="22"  isSplitAllowed="true" >
				<textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						x="116"
						y="0"
						width="100"
						height="18"
						key="textField"/>
					<box></box>
					<textElement>
						<font/>
					</textElement>
				<textFieldExpression   class="java.lang.String"><![CDATA[$F{fullpin}]]></textFieldExpression>
				</textField>
				<textField isStretchWithOverflow="false" pattern="#,##0.00" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						x="323"
						y="0"
						width="84"
						height="18"
						key="textField"/>
					<box></box>
					<textElement textAlignment="Right">
						<font/>
					</textElement>
				<textFieldExpression   class="java.lang.Double"><![CDATA[$F{totalav}]]></textFieldExpression>
				</textField>
			</band>
		</detail>
		<columnFooter>
			<band height="0"  isSplitAllowed="true" >
			</band>
		</columnFooter>
		<pageFooter>
			<band height="0"  isSplitAllowed="true" >
			</band>
		</pageFooter>
		<lastPageFooter>
			<band height="6"  isSplitAllowed="true" >
			</band>
		</lastPageFooter>
		<summary>
			<band height="3"  isSplitAllowed="true" >
			</band>
		</summary>
</jasperReport>
