<?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="report13_stock_keluar_DO_per_stock_group"
		 columnCount="1"
		 printOrder="Vertical"
		 orientation="Portrait"
		 pageWidth="842"
		 pageHeight="1275"
		 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="date_end" isForPrompting="true" class="java.util.Date"/>
	<parameter name="date_from" isForPrompting="true" class="java.util.Date"/>
	<parameter name="subgroup_code" isForPrompting="true" class="java.lang.String"/>
	<queryString><![CDATA[call spireport13_stock_keluar_do_presubgroup($P{subgroup_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="ftstock_subgroup_code" class="java.lang.String"/>
	<field name="ftstock_subgroup_name" class="java.lang.String"/>
	<field name="ftdecal_code" class="java.lang.String"/>
	<field name="ftdecal_name" class="java.lang.String"/>
	<field name="fnqty" class="java.lang.Double"/>

	<sortField name="ftstock_group_code" />
	<sortField name="ftstock_subgroup_code" />
	<sortField name="ftdecal_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="Group" resetGroup="g_group" 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>
	<variable name="totak_subgroup_qty" class="java.lang.Double" resetType="Group" resetGroup="g_subgroup" calculation="Sum">
		<variableExpression><![CDATA[$F{fnqty}]]></variableExpression>
	</variable>
	<variable name="total_subgroup" class="java.lang.String" resetType="Report" calculation="Nothing">
		<variableExpression><![CDATA["Total "+$F{ftstock_subgroup_name}+" :"]]></variableExpression>
	</variable>

		<group  name="g_group" >
			<groupExpression><![CDATA[$F{ftstock_group_code}]]></groupExpression>
			<groupHeader>
			<band height="18"  isSplitAllowed="true" >
				<textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						x="0"
						y="0"
						width="354"
						height="14"
						key="textField"/>
					<box></box>
					<textElement>
						<font fontName="Arial" size="12"/>
					</textElement>
				<textFieldExpression   class="java.lang.String"><![CDATA[$F{ftstock_group_name}]]></textFieldExpression>
				</textField>
				<line direction="TopDown">
					<reportElement
						x="0"
						y="14"
						width="214"
						height="1"
						key="line-5"/>
					<graphicElement stretchType="NoStretch"/>
				</line>
			</band>
			</groupHeader>
			<groupFooter>
			<band height="25"  isSplitAllowed="true" >
				<textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						x="0"
						y="5"
						width="372"
						height="18"
						key="textField"/>
					<box></box>
					<textElement textAlignment="Right">
						<font fontName="Arial" size="12"/>
					</textElement>
				<textFieldExpression   class="java.lang.String"><![CDATA[$V{total_group}]]></textFieldExpression>
				</textField>
				<textField isStretchWithOverflow="false" pattern="#,##0" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						x="379"
						y="5"
						width="81"
						height="18"
						key="textField"/>
					<box></box>
					<textElement textAlignment="Right">
						<font fontName="Arial" size="12"/>
					</textElement>
				<textFieldExpression   class="java.lang.Double"><![CDATA[$V{total_group_qty}]]></textFieldExpression>
				</textField>
				<line direction="TopDown">
					<reportElement
						x="263"
						y="2"
						width="193"
						height="0"
						key="line-9"/>
					<graphicElement stretchType="NoStretch"/>
				</line>
			</band>
			</groupFooter>
		</group>
		<group  name="g_subgroup" >
			<groupExpression><![CDATA[$F{ftstock_subgroup_code}]]></groupExpression>
			<groupHeader>
			<band height="19"  isSplitAllowed="true" >
				<textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						x="58"
						y="0"
						width="354"
						height="16"
						key="textField"/>
					<box></box>
					<textElement>
						<font fontName="Arial" size="12"/>
					</textElement>
				<textFieldExpression   class="java.lang.String"><![CDATA[$F{ftstock_subgroup_name}]]></textFieldExpression>
				</textField>
				<line direction="TopDown">
					<reportElement
						x="58"
						y="17"
						width="193"
						height="0"
						key="line-6"/>
					<graphicElement stretchType="NoStretch"/>
				</line>
			</band>
			</groupHeader>
			<groupFooter>
			<band height="23"  isSplitAllowed="true" >
				<line direction="TopDown">
					<reportElement
						x="263"
						y="2"
						width="193"
						height="0"
						key="line-10"/>
					<graphicElement stretchType="NoStretch"/>
				</line>
				<textField isStretchWithOverflow="false" pattern="#,##0" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						x="381"
						y="6"
						width="77"
						height="15"
						key="textField"/>
					<box></box>
					<textElement textAlignment="Right">
						<font fontName="Arial" size="12"/>
					</textElement>
				<textFieldExpression   class="java.lang.Double"><![CDATA[$V{totak_subgroup_qty}]]></textFieldExpression>
				</textField>
				<textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						x="0"
						y="5"
						width="372"
						height="16"
						key="textField"/>
					<box></box>
					<textElement textAlignment="Right">
						<font fontName="Arial" size="12"/>
					</textElement>
				<textFieldExpression   class="java.lang.String"><![CDATA[$V{total_subgroup}]]></textFieldExpression>
				</textField>
			</band>
			</groupFooter>
		</group>
		<background>
			<band height="0"  isSplitAllowed="true" >
			</band>
		</background>
		<title>
			<band height="1"  isSplitAllowed="true" >
				<textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						x="344"
						y="-19"
						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="444"
						y="-19"
						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="76"  isSplitAllowed="true" >
				<staticText>
					<reportElement
						x="100"
						y="27"
						width="583"
						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="2"
						width="327"
						height="18"
						key="textField"/>
					<box></box>
					<textElement>
						<font fontName="Arial" size="12"/>
					</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="50"
						width="100"
						height="18"
						key="textField-1"/>
					<box></box>
					<textElement>
						<font fontName="Arial" size="12"/>
					</textElement>
				<textFieldExpression   class="java.util.Date"><![CDATA[$P{date_end}]]></textFieldExpression>
				</textField>
				<staticText>
					<reportElement
						x="189"
						y="50"
						width="25"
						height="17"
						key="staticText-8"/>
					<box></box>
					<textElement textAlignment="Center">
						<font fontName="Arial" size="12"/>
					</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="50"
						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="-1"
						y="50"
						width="92"
						height="18"
						key="staticText-9"/>
					<box></box>
					<textElement textAlignment="Right">
						<font fontName="Arial" size="12"/>
					</textElement>
				<text><![CDATA[Periode transaksi :]]></text>
				</staticText>
				<line direction="TopDown">
					<reportElement
						x="0"
						y="73"
						width="470"
						height="0"
						key="line-7"/>
					<graphicElement stretchType="NoStretch"/>
				</line>
			</band>
		</pageHeader>
		<columnHeader>
			<band height="0"  isSplitAllowed="true" >
			</band>
		</columnHeader>
		<detail>
			<band height="16"  isSplitAllowed="true" >
				<textField isStretchWithOverflow="false" pattern="###0" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						x="84"
						y="0"
						width="30"
						height="16"
						key="textField"/>
					<box></box>
					<textElement textAlignment="Right">
						<font fontName="Arial" size="11"/>
					</textElement>
				<textFieldExpression   class="java.lang.Integer"><![CDATA[$V{urut}]]></textFieldExpression>
				</textField>
				<textField isStretchWithOverflow="false" pattern="#,##0" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						x="387"
						y="0"
						width="73"
						height="16"
						key="textField"/>
					<box></box>
					<textElement textAlignment="Right">
						<font fontName="Arial" size="12"/>
					</textElement>
				<textFieldExpression   class="java.lang.Double"><![CDATA[$F{fnqty}]]></textFieldExpression>
				</textField>
				<textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						x="125"
						y="0"
						width="262"
						height="16"
						key="textField"/>
					<box></box>
					<textElement>
						<font fontName="Arial" size="12"/>
					</textElement>
				<textFieldExpression   class="java.lang.String"><![CDATA[$F{ftdecal_name}]]></textFieldExpression>
				</textField>
			</band>
		</detail>
		<columnFooter>
			<band height="0"  isSplitAllowed="true" >
			</band>
		</columnFooter>
		<pageFooter>
			<band height="0"  isSplitAllowed="true" >
			</band>
		</pageFooter>
		<lastPageFooter>
			<band height="28"  isSplitAllowed="true" >
				<line direction="TopDown">
					<reportElement
						x="263"
						y="1"
						width="193"
						height="0"
						key="line-8"/>
					<graphicElement stretchType="NoStretch"/>
				</line>
				<textField isStretchWithOverflow="false" pattern="#,##0" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						x="379"
						y="6"
						width="80"
						height="18"
						key="textField"/>
					<box></box>
					<textElement textAlignment="Right">
						<font fontName="Arial" size="12"/>
					</textElement>
				<textFieldExpression   class="java.lang.Double"><![CDATA[$V{tot_qty}]]></textFieldExpression>
				</textField>
				<staticText>
					<reportElement
						x="134"
						y="6"
						width="237"
						height="17"
						key="staticText-10"/>
					<box></box>
					<textElement textAlignment="Right">
						<font fontName="Arial" size="12"/>
					</textElement>
				<text><![CDATA[Grand Total :]]></text>
				</staticText>
			</band>
		</lastPageFooter>
		<summary>
			<band height="0"  isSplitAllowed="true" >
			</band>
		</summary>
</jasperReport>
