<?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="sub" pageWidth="612" pageHeight="792" columnWidth="612" leftMargin="0" rightMargin="0" topMargin="0" bottomMargin="0">
	<property name="ireport.zoom" value="1.0"/>
	<property name="ireport.x" value="0"/>
	<property name="ireport.y" value="0"/>
	<parameter name="AS_TRAN_ID" class="java.lang.String"/>
	<queryString language="SQL">
		<![CDATA[select
distinct pagecnt
from
(
SELECT

     CEIL((ROWNUM/13)) as pagecnt

FROM
     MISC_PAYABLES MISC_PAYABLES,
     MISC_VOUCHER MISC_VOUCHER,
     VOUCHER VOUCHER,
     misc_paydet misc_paydet,
     misc_payment misc_payment
WHERE
     (MISC_PAYMENT.TRAN_ID = MISC_PAYDET.TRAN_ID)
	and ( misc_paydet.vouch_no = misc_voucher.tran_id (+))
	and ( misc_paydet.vouch_no = voucher.tran_id (+))
     and (MISC_PAYDET.TRAN_SER = MISC_PAYABLES.TRAN_SER)
     and (MISC_PAYDET.VOUCH_NO = MISC_PAYABLES.REF_NO)
 AND misc_payment.tran_id = '$P!{AS_TRAN_ID}'
) t order by pagecnt]]>
	</queryString>
	<field name="PAGECNT" class="java.lang.Integer">
		<fieldDescription><![CDATA[]]></fieldDescription>
	</field>
	<group name="PAGECNT" isStartNewPage="true">
		<groupExpression><![CDATA[$F{PAGECNT}]]></groupExpression>
		<groupHeader>
			<band height="96">
				<subreport>
					<reportElement positionType="Float" x="0" y="57" width="552" height="39" printWhenGroupChanges="PAGECNT"/>
					<parametersMapExpression><![CDATA[$P{REPORT_PARAMETERS_MAP}]]></parametersMapExpression>
					<subreportParameter name="PGNO">
						<subreportParameterExpression><![CDATA[$F{PAGECNT}]]></subreportParameterExpression>
					</subreportParameter>
					<subreportParameter name="AS_TRAN_ID">
						<subreportParameterExpression><![CDATA[$P{AS_TRAN_ID}]]></subreportParameterExpression>
					</subreportParameter>
					<connectionExpression><![CDATA[$P{REPORT_CONNECTION}]]></connectionExpression>
					<subreportExpression class="java.io.InputStream"><![CDATA[new FileInputStream("C:/jboss-5.1.0.GA/server/default/deploy/ibase.ear/ibase.war/webitm/reports/jrxml/d_taro_cheque_sub2.jasper")]]></subreportExpression>
				</subreport>
				<subreport>
					<reportElement positionType="Float" x="0" y="3" width="552" height="54" printWhenGroupChanges="PAGECNT"/>
					<parametersMapExpression><![CDATA[$P{REPORT_PARAMETERS_MAP}]]></parametersMapExpression>
					<subreportParameter name="PGNO">
						<subreportParameterExpression><![CDATA[$F{PAGECNT}]]></subreportParameterExpression>
					</subreportParameter>
					<subreportParameter name="AS_TRAN_ID">
						<subreportParameterExpression><![CDATA[$P{AS_TRAN_ID}]]></subreportParameterExpression>
					</subreportParameter>
					<connectionExpression><![CDATA[$P{REPORT_CONNECTION}]]></connectionExpression>
					<subreportExpression class="java.io.InputStream"><![CDATA[new FileInputStream("C:/jboss-5.1.0.GA/server/default/deploy/ibase.ear/ibase.war/webitm/reports/jrxml/d_taro_cheque_sub1.jasper")]]></subreportExpression>
				</subreport>
			</band>
		</groupHeader>
	</group>
</jasperReport>
