<?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="report15_stock_keluar_DO_per_stock_group_percustomer"
		 columnCount="1"
		 printOrder="Vertical"
		 orientation="Portrait"
		 pageWidth="842"
		 pageHeight="1077"
		 columnWidth="782"
		 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="group_code" isForPrompting="true" class="java.lang.String"/>
	<parameter name="customer_code" isForPrompting="true" class="java.lang.String"/>
	<parameter name="date_end" isForPrompting="true" class="java.util.Date"/>
	<parameter name="date_from" isForPrompting="true" class="java.util.Date"/>
	<parameter name="username" isForPrompting="true" class="java.lang.String"/>
	<queryString><![CDATA[call spireport15_stock_keluar_do_presubgroup_percustomer($P{group_code},$P{customer_code},$P{date_from},$P{date_end})]]></queryString>

	<field name="ftcompany_name" class="java.lang.String"/>
	<field name="ftstock_group_code" class="java.lang.String"/>
	<field name="ftstock_group_name" class="java.lang.String"/>
	<field name="ftcustomer_code" class="java.lang.String"/>
	<field name="ftcustomer_name" class="java.lang.String"/>
	<field name="fnqty" class="java.lang.Double"/>

	<sortField name="ftstock_group_code" />

	<variable name="urut" class="java.lang.Integer" resetType="Report" calculation="Count">
		<variableExpression><![CDATA[new java.lang.Integer(0) ]]></variableExpression>
		<initialValueExpression><![CDATA[new java.lang.Integer(1) ]]></initialValueExpression>
	</variable>
	<variable name="tot_qty" class="java.lang.Double" resetType="Report" calculation="Sum">
		<variableExpression><![CDATA[$F{fnqty}]]></variableExpression>
	</variable>
	<variable name="total_group_qty" class="java.lang.Double" resetType="Report" calculation="Sum">
		<variableExpression><![CDATA[$F{fnqty}]]></variableExpression>
	</variable>
	<variable name="total_group" class="java.lang.String" resetType="Report" calculation="Nothing">
		<variableExpression><![CDATA["Total "+$F{ftstock_group_name}+ " :"]]></variableExpression>
	</variable>
		<background>
			<band height="0"  isSplitAllowed="true" >
			</band>
		</background>
		<title>
			<band height="68"  isSplitAllowed="true" >
				<staticText>
					<reportElement
						x="0"
						y="25"
						width="782"
						height="18"
						key="staticText-7"/>
					<box></box>
					<textElement textAlignment="Center">
						<font fontName="Arial" pdfFontName="Helvetica-Bold" size="12" isBold="true"/>
					</textElement>
				<text><![CDATA[LAPORAN PENJUALAN PER SUBGROUP DAN DECAL]]></text>
				</staticText>
				<textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						x="0"
						y="0"
						width="327"
						height="18"
						key="textField"/>
					<box></box>
					<textElement>
						<font fontName="Arial" size="11"/>
					</textElement>
				<textFieldExpression   class="java.lang.String"><![CDATA[$F{ftcompany_name}]]></textFieldExpression>
				</textField>
				<textField isStretchWithOverflow="false" pattern="dd-MMM-yyyy" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						x="214"
						y="48"
						width="100"
						height="18"
						key="textField-1"/>
					<box></box>
					<textElement>
						<font fontName="Arial" size="11"/>
					</textElement>
				<textFieldExpression   class="java.util.Date"><![CDATA[$P{date_end}]]></textFieldExpression>
				</textField>
				<staticText>
					<reportElement
						x="189"
						y="48"
						width="25"
						height="17"
						key="staticText-8"/>
					<box></box>
					<textElement textAlignment="Center">
						<font fontName="Arial" size="11"/>
					</textElement>
				<text><![CDATA[s/d]]></text>
				</staticText>
				<textField isStretchWithOverflow="false" pattern="dd-MMM-yyyy" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						x="97"
						y="48"
						width="92"
						height="18"
						key="textField-2"/>
					<box></box>
					<textElement>
						<font fontName="Arial" pdfFontName="Helvetica" size="11" isBold="false" isStrikeThrough="false" />
					</textElement>
				<textFieldExpression   class="java.util.Date"><![CDATA[$P{date_from}]]></textFieldExpression>
				</textField>
				<staticText>
					<reportElement
						x="-1"
						y="48"
						width="92"
						height="18"
						key="staticText-9"/>
					<box></box>
					<textElement textAlignment="Right">
						<font fontName="Arial" size="11"/>
					</textElement>
				<text><![CDATA[Periode transaksi :]]></text>
				</staticText>
				<textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						x="578"
						y="0"
						width="100"
						height="18"
						key="textField"/>
					<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="678"
						y="0"
						width="100"
						height="18"
						key="textField"/>
					<box></box>
					<textElement>
						<font fontName="Arial" size="12"/>
					</textElement>
				<textFieldExpression   class="java.lang.String"><![CDATA["" + $V{PAGE_NUMBER} + ""]]></textFieldExpression>
				</textField>
			</band>
		</title>
		<pageHeader>
			<band height="0"  isSplitAllowed="true" >
			</band>
		</pageHeader>
		<columnHeader>
			<band height="0"  isSplitAllowed="true" >
			</band>
		</columnHeader>
		<detail>
			<band height="0"  isSplitAllowed="true" >
			</band>
		</detail>
		<columnFooter>
			<band height="0"  isSplitAllowed="true" >
			</band>
		</columnFooter>
		<pageFooter>
			<band height="25"  isSplitAllowed="true" >
				<textField isStretchWithOverflow="false" pattern="EEE, d MMM yyyy HH:mm:ss" isBlankWhenNull="false" evaluationTime="Report" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						x="560"
						y="6"
						width="205"
						height="18"
						key="textField-3"/>
					<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>
				<textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						x="457"
						y="6"
						width="100"
						height="18"
						key="textField-4"/>
					<box></box>
					<textElement>
						<font fontName="Arial" size="12"/>
					</textElement>
				<textFieldExpression   class="java.lang.String"><![CDATA[$P{username}]]></textFieldExpression>
				</textField>
			</band>
		</pageFooter>
		<summary>
			<band height="73"  isSplitAllowed="true" >
				<elementGroup><!--  Start: 1 !-->
				<crosstab >
					<reportElement
						x="0"
						y="0"
						width="774"
						height="67"
						key="crosstab-1"
						stretchType="RelativeToTallestObject"
						isPrintWhenDetailOverflows="true"/>
					<crosstabHeaderCell>						<cellContents mode="Transparent">
					<box>					<topPen lineWidth="1.0"/>
					<bottomPen lineWidth="1.0"/>
</box>
				<textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						x="0"
						y="0"
						width="110"
						height="25"
						key="textField-3"/>
					<box></box>
					<textElement textAlignment="Left" verticalAlignment="Middle">
						<font fontName="Arial" pdfFontName="Helvetica-Bold" size="11" isBold="true"/>
					</textElement>
				<textFieldExpression   class="java.lang.String"><![CDATA["Group"]]></textFieldExpression>
				</textField>
						</cellContents>
					</crosstabHeaderCell>					<rowGroup name="ftstock_group_name" width="112" totalPosition="End">
						<bucket>
							<bucketExpression class="java.lang.String"><![CDATA[$F{ftstock_group_name}]]></bucketExpression>
						</bucket>
						<crosstabRowHeader>
						<cellContents mode="Transparent">
					<box></box>
				<textField isStretchWithOverflow="true" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						x="0"
						y="0"
						width="112"
						height="22"
						key="textField"
						stretchType="RelativeToBandHeight"/>
					<box></box>
					<textElement textAlignment="Left" verticalAlignment="Top">
						<font fontName="Arial" size="11"/>
					</textElement>
				<textFieldExpression   class="java.lang.String"><![CDATA[$V{ftstock_group_name}]]></textFieldExpression>
				</textField>
						</cellContents>
						</crosstabRowHeader>
						<crosstabTotalRowHeader>
						<cellContents mode="Transparent">
					<box></box>
				<staticText>
					<reportElement
						x="1"
						y="2"
						width="209"
						height="30"
						key="staticText-10"/>
					<box></box>
					<textElement textAlignment="Right" verticalAlignment="Middle">
						<font fontName="Arial" pdfFontName="Helvetica-Bold" size="11" isBold="true"/>
					</textElement>
				<text><![CDATA[TOTAL :]]></text>
				</staticText>
						</cellContents>
						</crosstabTotalRowHeader>
					</rowGroup>
					<rowGroup name="ftstock_group_code" width="100">
						<bucket>
							<bucketExpression class="java.lang.String"><![CDATA[]]></bucketExpression>
						</bucket>
						<crosstabRowHeader>
						<cellContents mode="Transparent">
					<box></box>
						</cellContents>
						</crosstabRowHeader>
					</rowGroup>
					<columnGroup name="ftcustomer_name" height="38" totalPosition="End" headerPosition="Center">
						<bucket>
							<bucketExpression class="java.lang.String"><![CDATA[$F{ftcustomer_name}]]></bucketExpression>
						</bucket>
						<crosstabColumnHeader>
						<cellContents mode="Transparent">
					<box>					<topPen lineWidth="1.0"/>
					<bottomPen lineWidth="1.0"/>
</box>
				<textField isStretchWithOverflow="true" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						x="0"
						y="0"
						width="62"
						height="37"
						key="textField"
						stretchType="RelativeToBandHeight"/>
					<box></box>
					<textElement textAlignment="Right" verticalAlignment="Middle">
						<font fontName="Arial" pdfFontName="Helvetica-Bold" size="11" isBold="true"/>
					</textElement>
				<textFieldExpression   class="java.lang.String"><![CDATA[$V{ftcustomer_name}]]></textFieldExpression>
				</textField>
						</cellContents>
						</crosstabColumnHeader>
						<crosstabTotalColumnHeader>
						<cellContents mode="Transparent">
					<box>					<topPen lineWidth="1.0"/>
					<bottomPen lineWidth="1.0"/>
</box>
				<textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						x="0"
						y="0"
						width="64"
						height="25"
						key="textField"/>
					<box></box>
					<textElement textAlignment="Right" verticalAlignment="Middle">
						<font fontName="Arial" pdfFontName="Helvetica-Bold" size="11" isBold="true"/>
					</textElement>
				<textFieldExpression   class="java.lang.String"><![CDATA["TOTAL"]]></textFieldExpression>
				</textField>
						</cellContents>
						</crosstabTotalColumnHeader>
					</columnGroup>

					<measure name="fnqty_Sum" class="java.lang.Double" calculation="Sum">
						<measureExpression><![CDATA[$F{fnqty}]]></measureExpression>
					</measure>
					<crosstabCell width="62" height="23">
						<cellContents mode="Transparent">
					<box></box>
				<textField isStretchWithOverflow="false" pattern="###0" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						x="0"
						y="0"
						width="62"
						height="23"
						key="textField"/>
					<box></box>
					<textElement textAlignment="Right" verticalAlignment="Middle">
						<font fontName="Arial" size="11"/>
					</textElement>
				<textFieldExpression   class="java.lang.Double"><![CDATA[$V{fnqty_Sum}]]></textFieldExpression>
				</textField>
						</cellContents>
					</crosstabCell>
					<crosstabCell width="64" height="23" columnTotalGroup="ftcustomer_name">
						<cellContents mode="Transparent">
					<box></box>
				<textField isStretchWithOverflow="false" pattern="###0" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						x="0"
						y="0"
						width="64"
						height="23"
						key="textField"/>
					<box></box>
					<textElement textAlignment="Right" verticalAlignment="Middle">
						<font fontName="Arial" size="11"/>
					</textElement>
				<textFieldExpression   class="java.lang.Double"><![CDATA[$V{fnqty_Sum}]]></textFieldExpression>
				</textField>
						</cellContents>
					</crosstabCell>
					<crosstabCell width="62" height="33" rowTotalGroup="ftstock_group_name">
						<cellContents mode="Transparent">
					<box>					<topPen lineWidth="0.0"/>
					<bottomPen lineWidth="1.0"/>
</box>
				<textField isStretchWithOverflow="false" pattern="###0" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						x="0"
						y="0"
						width="62"
						height="33"
						key="textField"/>
					<box></box>
					<textElement textAlignment="Right" verticalAlignment="Middle">
						<font fontName="Arial" pdfFontName="Helvetica-Bold" size="11" isBold="true"/>
					</textElement>
				<textFieldExpression   class="java.lang.Double"><![CDATA[$V{fnqty_Sum}]]></textFieldExpression>
				</textField>
						</cellContents>
					</crosstabCell>
					<crosstabCell width="64" height="33" rowTotalGroup="ftstock_group_name" columnTotalGroup="ftcustomer_name">
						<cellContents mode="Transparent">
					<box>					<topPen lineWidth="0.0"/>
					<bottomPen lineWidth="1.0"/>
</box>
				<textField isStretchWithOverflow="false" pattern="###0" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						x="0"
						y="0"
						width="64"
						height="33"
						key="textField"/>
					<box></box>
					<textElement textAlignment="Right" verticalAlignment="Middle">
						<font fontName="Arial" pdfFontName="Helvetica-Bold" size="11" isBold="true"/>
					</textElement>
				<textFieldExpression   class="java.lang.Double"><![CDATA[$V{fnqty_Sum}]]></textFieldExpression>
				</textField>
						</cellContents>
					</crosstabCell>
					<crosstabCell width="62" height="0" rowTotalGroup="ftstock_group_code">
						<cellContents mode="Transparent">
					<box></box>
						</cellContents>
					</crosstabCell>
					<crosstabCell width="64" height="0" rowTotalGroup="ftstock_group_code" columnTotalGroup="ftcustomer_name">
						<cellContents mode="Transparent">
					<box></box>
						</cellContents>
					</crosstabCell>
					<whenNoDataCell>						<cellContents mode="Transparent">
					<box></box>
						</cellContents>
					</whenNoDataCell>					</crosstab>
				</elementGroup><!-- End 1 !-->
			</band>
		</summary>
</jasperReport>
