<?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="report06_rekap_piutang_dagang_bulanan"
		 columnCount="1"
		 printOrder="Vertical"
		 orientation="Portrait"
		 pageWidth="651"
		 pageHeight="1360"
		 columnWidth="591"
		 columnSpacing="0"
		 leftMargin="30"
		 rightMargin="30"
		 topMargin="20"
		 bottomMargin="20"
		 whenNoDataType="AllSectionsNoDetail"
		 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="date_from" isForPrompting="true" class="java.util.Date"/>
	<parameter name="date_end" isForPrompting="true" class="java.util.Date"/>
	<parameter name="username" isForPrompting="true" class="java.lang.String"/>
	<queryString><![CDATA[call spfreport06_rekap_piutang_bulanan($P{date_from},$P{date_end})]]></queryString>

	<field name="ftcompany_name" class="java.lang.String"/>
	<field name="ftcustomer_code" class="java.lang.String"/>
	<field name="ftcustomer_name" class="java.lang.String"/>
	<field name="fdtrans_date" class="java.sql.Date"/>
	<field name="ftsales_invoice_no" class="java.lang.String"/>
	<field name="ftdo_no" class="java.lang.String"/>
	<field name="fcamount" class="java.math.BigDecimal"/>

	<sortField name="ftcustomer_code" />

	<variable name="urut" class="java.lang.Integer" resetType="Group" resetGroup="g_ftcustomer_code" calculation="Count">
		<variableExpression><![CDATA[new java.lang.Integer(0) ]]></variableExpression>
		<initialValueExpression><![CDATA[new java.lang.Integer(1) ]]></initialValueExpression>
	</variable>
	<variable name="jumlah" class="java.math.BigDecimal" resetType="Group" resetGroup="g_ftcustomer_code" calculation="Sum">
		<variableExpression><![CDATA[$F{fcamount}]]></variableExpression>
	</variable>

		<group  name="g_ftcustomer_code" >
			<groupExpression><![CDATA[$F{ftcustomer_code}]]></groupExpression>
			<groupHeader>
			<band height="23"  isSplitAllowed="true" >
				<staticText>
					<reportElement
						x="-1"
						y="3"
						width="92"
						height="15"
						key="staticText-7"/>
					<box></box>
					<textElement textAlignment="Right">
						<font fontName="Arial" size="12"/>
					</textElement>
				<text><![CDATA[Customer :]]></text>
				</staticText>
				<textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						x="94"
						y="3"
						width="186"
						height="15"
						key="textField"/>
					<box></box>
					<textElement>
						<font fontName="Arial" size="12"/>
					</textElement>
				<textFieldExpression   class="java.lang.String"><![CDATA[$F{ftcustomer_name}]]></textFieldExpression>
				</textField>
				<line direction="TopDown">
					<reportElement
						x="4"
						y="20"
						width="238"
						height="0"
						key="line-3"/>
					<graphicElement stretchType="NoStretch"/>
				</line>
			</band>
			</groupHeader>
			<groupFooter>
			<band height="27"  isSplitAllowed="true" >
				<line direction="TopDown">
					<reportElement
						x="2"
						y="3"
						width="546"
						height="0"
						key="line-4"/>
					<graphicElement stretchType="NoStretch"/>
				</line>
				<staticText>
					<reportElement
						x="369"
						y="5"
						width="78"
						height="18"
						key="staticText-12"/>
					<box></box>
					<textElement textAlignment="Right">
						<font fontName="Arial" size="12"/>
					</textElement>
				<text><![CDATA[Total :]]></text>
				</staticText>
				<textField isStretchWithOverflow="false" pattern="#,##0.00" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						x="449"
						y="6"
						width="96"
						height="18"
						key="textField"/>
					<box></box>
					<textElement textAlignment="Right">
						<font fontName="Arial" size="12"/>
					</textElement>
				<textFieldExpression   class="java.math.BigDecimal"><![CDATA[$V{jumlah}]]></textFieldExpression>
				</textField>
			</band>
			</groupFooter>
		</group>
		<background>
			<band height="0"  isSplitAllowed="true" >
			</band>
		</background>
		<title>
			<band height="0"  isSplitAllowed="true" >
			</band>
		</title>
		<pageHeader>
			<band height="91"  isSplitAllowed="true" >
				<staticText>
					<reportElement
						x="169"
						y="21"
						width="249"
						height="18"
						key="staticText-1"/>
					<box></box>
					<textElement textAlignment="Center">
						<font fontName="Arial" pdfFontName="Helvetica-Bold" size="12" isBold="true"/>
					</textElement>
				<text><![CDATA[LAPORAN REKAPITULASI PIUTANG BULANAN]]></text>
				</staticText>
				<textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						x="2"
						y="3"
						width="312"
						height="18"
						key="textField-1"/>
					<box></box>
					<textElement>
						<font fontName="Arial" pdfFontName="Helvetica-Bold" size="12" isBold="true"/>
					</textElement>
				<textFieldExpression   class="java.lang.String"><![CDATA[$F{ftcompany_name}]]></textFieldExpression>
				</textField>
				<staticText>
					<reportElement
						x="2"
						y="39"
						width="92"
						height="20"
						key="staticText-2"/>
					<box></box>
					<textElement textAlignment="Right">
						<font fontName="Arial" size="12"/>
					</textElement>
				<text><![CDATA[Periode transaksi :]]></text>
				</staticText>
				<textField isStretchWithOverflow="false" pattern="dd-MMM-yyyy" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						x="100"
						y="39"
						width="92"
						height="18"
						key="textField-2"/>
					<box></box>
					<textElement>
						<font fontName="Arial" pdfFontName="Helvetica" size="12" isBold="false" isStrikeThrough="false" />
					</textElement>
				<textFieldExpression   class="java.util.Date"><![CDATA[$P{date_from}]]></textFieldExpression>
				</textField>
				<staticText>
					<reportElement
						x="192"
						y="39"
						width="25"
						height="17"
						key="staticText-3"/>
					<box></box>
					<textElement textAlignment="Center">
						<font/>
					</textElement>
				<text><![CDATA[s/d]]></text>
				</staticText>
				<textField isStretchWithOverflow="false" pattern="dd-MMM-yyyy" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						x="217"
						y="39"
						width="100"
						height="18"
						key="textField-3"/>
					<box></box>
					<textElement>
						<font fontName="Arial" size="12"/>
					</textElement>
				<textFieldExpression   class="java.util.Date"><![CDATA[$P{date_end}]]></textFieldExpression>
				</textField>
				<staticText>
					<reportElement
						x="6"
						y="68"
						width="17"
						height="15"
						key="staticText-4"/>
					<box></box>
					<textElement>
						<font fontName="Arial" size="12"/>
					</textElement>
				<text><![CDATA[No.]]></text>
				</staticText>
				<staticText>
					<reportElement
						x="28"
						y="68"
						width="81"
						height="15"
						key="staticText-5"/>
					<box></box>
					<textElement>
						<font fontName="Arial" size="12"/>
					</textElement>
				<text><![CDATA[Tgl. Invoice]]></text>
				</staticText>
				<staticText>
					<reportElement
						x="361"
						y="68"
						width="90"
						height="15"
						key="staticText-6"/>
					<box></box>
					<textElement>
						<font fontName="Arial" size="12"/>
					</textElement>
				<text><![CDATA[No. SJ]]></text>
				</staticText>
				<staticText>
					<reportElement
						x="193"
						y="68"
						width="84"
						height="15"
						key="staticText-11"/>
					<box></box>
					<textElement>
						<font fontName="Arial" size="12"/>
					</textElement>
				<text><![CDATA[No. Invoice]]></text>
				</staticText>
				<staticText>
					<reportElement
						x="464"
						y="68"
						width="81"
						height="15"
						key="staticText-13"/>
					<box></box>
					<textElement textAlignment="Right">
						<font fontName="Arial" size="12"/>
					</textElement>
				<text><![CDATA[Jumlah]]></text>
				</staticText>
				<line direction="TopDown">
					<reportElement
						x="0"
						y="62"
						width="551"
						height="4"
						key="line-5"/>
					<graphicElement stretchType="NoStretch"/>
				</line>
				<line direction="TopDown">
					<reportElement
						x="1"
						y="83"
						width="551"
						height="4"
						key="line-6"/>
					<graphicElement stretchType="NoStretch"/>
				</line>
				<textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						x="354"
						y="-20"
						width="100"
						height="18"
						key="textField-8"/>
					<box></box>
					<textElement textAlignment="Right">
						<font fontName="Arial" size="12"/>
					</textElement>
				<textFieldExpression   class="java.lang.String"><![CDATA["Page " + $V{PAGE_NUMBER} + " of "]]></textFieldExpression>
				</textField>
				<textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Report" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						x="454"
						y="-20"
						width="100"
						height="18"
						key="textField-9"/>
					<box></box>
					<textElement>
						<font fontName="Arial" size="12"/>
					</textElement>
				<textFieldExpression   class="java.lang.String"><![CDATA["" + $V{PAGE_NUMBER} + ""]]></textFieldExpression>
				</textField>
			</band>
		</pageHeader>
		<columnHeader>
			<band height="2"  isSplitAllowed="true" >
			</band>
		</columnHeader>
		<detail>
			<band height="20"  isSplitAllowed="true" >
				<textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						x="4"
						y="2"
						width="19"
						height="18"
						key="textField"/>
					<box></box>
					<textElement>
						<font fontName="Arial" size="12"/>
					</textElement>
				<textFieldExpression   class="java.lang.Integer"><![CDATA[$V{urut}]]></textFieldExpression>
				</textField>
				<textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						x="362"
						y="2"
						width="87"
						height="18"
						key="textField"/>
					<box></box>
					<textElement>
						<font fontName="Arial" size="12"/>
					</textElement>
				<textFieldExpression   class="java.lang.String"><![CDATA[$F{ftdo_no}]]></textFieldExpression>
				</textField>
				<textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						x="187"
						y="2"
						width="87"
						height="18"
						key="textField"/>
					<box></box>
					<textElement>
						<font fontName="Arial" size="12"/>
					</textElement>
				<textFieldExpression   class="java.lang.String"><![CDATA[$F{ftsales_invoice_no}]]></textFieldExpression>
				</textField>
				<textField isStretchWithOverflow="false" pattern="dd-MMM-yyyy" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						x="26"
						y="2"
						width="74"
						height="18"
						key="textField"/>
					<box></box>
					<textElement>
						<font fontName="Arial" size="12"/>
					</textElement>
				<textFieldExpression   class="java.util.Date"><![CDATA[$F{fdtrans_date}]]></textFieldExpression>
				</textField>
				<textField isStretchWithOverflow="false" pattern="#,##0.00" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						x="461"
						y="2"
						width="84"
						height="18"
						key="textField"/>
					<box></box>
					<textElement textAlignment="Right">
						<font fontName="Arial" size="12"/>
					</textElement>
				<textFieldExpression   class="java.math.BigDecimal"><![CDATA[$F{fcamount}]]></textFieldExpression>
				</textField>
			</band>
		</detail>
		<columnFooter>
			<band height="0"  isSplitAllowed="true" >
			</band>
		</columnFooter>
		<pageFooter>
			<band height="47"  isSplitAllowed="true" >
				<textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						x="237"
						y="9"
						width="100"
						height="18"
						key="textField-10"/>
					<box></box>
					<textElement>
						<font fontName="Arial" size="12"/>
					</textElement>
				<textFieldExpression   class="java.lang.String"><![CDATA[$P{username}]]></textFieldExpression>
				</textField>
				<textField isStretchWithOverflow="false" pattern="EEE, d MMM yyyy HH:mm:ss" isBlankWhenNull="false" evaluationTime="Report" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						x="340"
						y="9"
						width="205"
						height="18"
						key="textField-11"/>
					<box></box>
					<textElement textAlignment="Right">
						<font fontName="Arial" pdfFontName="Helvetica-Oblique" size="12" isItalic="true"/>
					</textElement>
				<textFieldExpression   class="java.util.Date"><![CDATA[new java.util.Date()]]></textFieldExpression>
				</textField>
			</band>
		</pageFooter>
		<summary>
			<band height="0"  isSplitAllowed="true" >
			</band>
		</summary>
</jasperReport>
