<?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="report05_per_jenis_per_stock_detail"
		 columnCount="1"
		 printOrder="Vertical"
		 orientation="Portrait"
		 pageWidth="910"
		 pageHeight="1360"
		 columnWidth="910"
		 columnSpacing="0"
		 leftMargin="0"
		 rightMargin="0"
		 topMargin="0"
		 bottomMargin="0"
		 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"/>
	<parameter name="stock_group" isForPrompting="true" class="java.lang.String"/>
	<queryString><![CDATA[call spsreport05_per_jenis_dan_item_detail($P{date_from},$P{date_end},$P{stock_group})]]></queryString>

	<field name="ftcompany_name" class="java.lang.String"/>
	<field name="fdtrans_date" class="java.sql.Date"/>
	<field name="fnid" class="java.lang.Integer"/>
	<field name="ftbranch_code" class="java.lang.String"/>
	<field name="ftdo_no" class="java.lang.String"/>
	<field name="fnindex" class="java.lang.Integer"/>
	<field name="ftitem_code" class="java.lang.String"/>
	<field name="ftitem_name" class="java.lang.String"/>
	<field name="ftprint_name" class="java.lang.String"/>
	<field name="ftbatch_code" class="java.lang.String"/>
	<field name="ftstock_category_code" class="java.lang.String"/>
	<field name="ftuom_code" class="java.lang.String"/>
	<field name="ftuom_code_alt" class="java.lang.String"/>
	<field name="ftwarehouse_code" class="java.lang.String"/>
	<field name="ftlocation_code" class="java.lang.String"/>
	<field name="fnqty_available" class="java.lang.Double"/>
	<field name="fnqty_available_alt" class="java.lang.Double"/>
	<field name="fnqty_so" class="java.lang.Double"/>
	<field name="fnqty_so_alt" class="java.lang.Double"/>
	<field name="fnqty" class="java.lang.Double"/>
	<field name="fnqty_base" class="java.lang.Double"/>
	<field name="ftdescription" class="java.lang.String"/>
	<field name="fnstatus" class="java.lang.Integer"/>
	<field name="ffformula" class="java.lang.Double"/>
	<field name="fnuse_barcode" class="java.lang.Integer"/>
	<field name="fnunique_barcode" class="java.lang.Integer"/>
	<field name="ftcreated_user" class="java.lang.String"/>
	<field name="fdcreated_date" class="java.sql.Timestamp"/>
	<field name="ftmodified_user" class="java.lang.String"/>
	<field name="fdmodified_date" class="java.sql.Timestamp"/>
	<field name="ftitem_namex" class="java.lang.String"/>
	<field name="ftstock_group_code" class="java.lang.String"/>
	<field name="ftstock_group_name" class="java.lang.String"/>
	<field name="ftsales_invoice_no" class="java.lang.String"/>

	<sortField name="ftstock_group_code" />

	<variable name="urut" class="java.lang.Integer" resetType="Group" resetGroup="g_ftstock_group_code" calculation="Count">
		<variableExpression><![CDATA[new java.lang.Integer(0) ]]></variableExpression>
		<initialValueExpression><![CDATA[new java.lang.Integer(1) ]]></initialValueExpression>
	</variable>
	<variable name="total_qty" class="java.lang.Double" resetType="Group" resetGroup="g_ftstock_group_code" calculation="Sum">
		<variableExpression><![CDATA[$F{fnqty}]]></variableExpression>
	</variable>
	<variable name="grandtotal_qty" class="java.lang.Double" resetType="Report" calculation="Sum">
		<variableExpression><![CDATA[$F{fnqty}]]></variableExpression>
	</variable>

		<group  name="g_ftstock_group_code" >
			<groupExpression><![CDATA[$F{ftstock_group_code}]]></groupExpression>
			<groupHeader>
			<band height="30"  isSplitAllowed="true" >
				<textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						x="2"
						y="0"
						width="313"
						height="30"
						key="textField"/>
					<box>					<bottomPen lineWidth="0.5" lineStyle="Solid"/>
</box>
					<textElement textAlignment="Left" verticalAlignment="Middle">
						<font fontName="Arial" size="12"/>
					</textElement>
				<textFieldExpression   class="java.lang.String"><![CDATA[$F{ftstock_group_name}]]></textFieldExpression>
				</textField>
			</band>
			</groupHeader>
			<groupFooter>
			<band height="34"  isSplitAllowed="true" >
				<textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						x="0"
						y="0"
						width="802"
						height="21"
						key="textField-6"/>
					<box>					<topPen lineWidth="0.5" lineStyle="Solid"/>
</box>
					<textElement textAlignment="Right">
						<font fontName="Arial" size="12" isBold="true"/>
					</textElement>
				<textFieldExpression   class="java.lang.String"><![CDATA["Total : "]]></textFieldExpression>
				</textField>
				<textField isStretchWithOverflow="false" pattern="#,##0.00" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						x="802"
						y="0"
						width="101"
						height="21"
						key="textField-7"/>
					<box>					<topPen lineWidth="0.5" lineStyle="Solid"/>
</box>
					<textElement textAlignment="Right">
						<font fontName="Arial" size="12" isBold="true"/>
					</textElement>
				<textFieldExpression   class="java.lang.Double"><![CDATA[$V{total_qty}]]></textFieldExpression>
				</textField>
			</band>
			</groupFooter>
		</group>
		<background>
			<band height="0"  isSplitAllowed="true" >
			</band>
		</background>
		<title>
			<band height="0"  isSplitAllowed="true" >
			</band>
		</title>
		<pageHeader>
			<band height="64"  isSplitAllowed="true" >
				<staticText>
					<reportElement
						x="0"
						y="21"
						width="903"
						height="24"
						key="staticText-1"/>
					<box></box>
					<textElement textAlignment="Center">
						<font fontName="Arial" pdfFontName="Helvetica-Bold" size="12" isBold="true"/>
					</textElement>
				<text><![CDATA[LAPORAN DO PER STOCK GROUP]]></text>
				</staticText>
				<textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						x="0"
						y="0"
						width="315"
						height="21"
						key="textField-1"/>
					<box></box>
					<textElement>
						<font fontName="Arial" pdfFontName="Helvetica" size="12" isBold="false"/>
					</textElement>
				<textFieldExpression   class="java.lang.String"><![CDATA[$F{ftcompany_name}]]></textFieldExpression>
				</textField>
				<staticText>
					<reportElement
						x="0"
						y="45"
						width="109"
						height="19"
						key="staticText-2"/>
					<box></box>
					<textElement textAlignment="Right">
						<font fontName="Arial" size="12"/>
					</textElement>
				<text><![CDATA[Periode : ]]></text>
				</staticText>
				<textField isStretchWithOverflow="false" pattern="dd-MMM-yyyy" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						x="109"
						y="45"
						width="92"
						height="19"
						key="textField-2"/>
					<box></box>
					<textElement textAlignment="Right">
						<font fontName="Arial" pdfFontName="Helvetica" size="12" isBold="false" isStrikeThrough="false" />
					</textElement>
				<textFieldExpression   class="java.util.Date"><![CDATA[$P{date_from}]]></textFieldExpression>
				</textField>
				<textField isStretchWithOverflow="false" pattern="dd-MMM-yyyy" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						x="201"
						y="45"
						width="114"
						height="19"
						key="textField-3"/>
					<box></box>
					<textElement>
						<font fontName="Arial" size="12"/>
					</textElement>
				<textFieldExpression   class="java.lang.String"><![CDATA[" s/d " + new SimpleDateFormat("dd-MMM-yyyy").format($P{date_end})]]></textFieldExpression>
				</textField>
				<textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						x="315"
						y="0"
						width="486"
						height="21"
						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="801"
						y="0"
						width="102"
						height="21"
						key="textField"/>
					<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="20"  isSplitAllowed="true" >
				<staticText>
					<reportElement
						x="0"
						y="0"
						width="28"
						height="20"
						key="staticText-4"/>
					<box>					<topPen lineWidth="0.5" lineStyle="Solid"/>
					<bottomPen lineWidth="0.5" lineStyle="Solid"/>
</box>
					<textElement>
						<font fontName="Arial" pdfFontName="Helvetica-Bold" size="12" isBold="true"/>
					</textElement>
				<text><![CDATA[No.]]></text>
				</staticText>
				<staticText>
					<reportElement
						x="28"
						y="0"
						width="81"
						height="20"
						key="staticText-5"/>
					<box>					<topPen lineWidth="0.5" lineStyle="Solid"/>
					<bottomPen lineWidth="0.5" lineStyle="Solid"/>
</box>
					<textElement>
						<font fontName="Arial" pdfFontName="Helvetica-Bold" size="12" isBold="true"/>
					</textElement>
				<text><![CDATA[Tgl. DO]]></text>
				</staticText>
				<staticText>
					<reportElement
						x="109"
						y="0"
						width="92"
						height="20"
						key="staticText-6"/>
					<box>					<topPen lineWidth="0.5" lineStyle="Solid"/>
					<bottomPen lineWidth="0.5" lineStyle="Solid"/>
</box>
					<textElement>
						<font fontName="Arial" pdfFontName="Helvetica-Bold" size="12" isBold="true"/>
					</textElement>
				<text><![CDATA[No. DO]]></text>
				</staticText>
				<staticText>
					<reportElement
						x="315"
						y="0"
						width="114"
						height="20"
						key="staticText-11"/>
					<box>					<topPen lineWidth="0.5" lineStyle="Solid"/>
					<bottomPen lineWidth="0.5" lineStyle="Solid"/>
</box>
					<textElement>
						<font fontName="Arial" pdfFontName="Helvetica-Bold" size="12" isBold="true"/>
					</textElement>
				<text><![CDATA[Kode Barang]]></text>
				</staticText>
				<staticText>
					<reportElement
						x="429"
						y="0"
						width="373"
						height="20"
						key="staticText-12"/>
					<box>					<topPen lineWidth="0.5" lineStyle="Solid"/>
					<bottomPen lineWidth="0.5" lineStyle="Solid"/>
</box>
					<textElement>
						<font fontName="Arial" pdfFontName="Helvetica-Bold" size="12" isBold="true"/>
					</textElement>
				<text><![CDATA[Nama Barang]]></text>
				</staticText>
				<staticText>
					<reportElement
						x="802"
						y="0"
						width="101"
						height="20"
						key="staticText-13"/>
					<box>					<topPen lineWidth="0.5" lineStyle="Solid"/>
					<bottomPen lineWidth="0.5" lineStyle="Solid"/>
</box>
					<textElement textAlignment="Right">
						<font fontName="Arial" pdfFontName="Helvetica-Bold" size="12" isBold="true"/>
					</textElement>
				<text><![CDATA[Qty]]></text>
				</staticText>
				<staticText>
					<reportElement
						x="201"
						y="0"
						width="114"
						height="20"
						key="staticText-14"/>
					<box>					<topPen lineWidth="0.5" lineStyle="Solid"/>
					<bottomPen lineWidth="0.5" lineStyle="Solid"/>
</box>
					<textElement>
						<font fontName="Arial" pdfFontName="Helvetica-Bold" size="12" isBold="true"/>
					</textElement>
				<text><![CDATA[No. Invoice]]></text>
				</staticText>
			</band>
		</columnHeader>
		<detail>
			<band height="18"  isSplitAllowed="true" >
				<textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						x="0"
						y="0"
						width="28"
						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="109"
						y="0"
						width="92"
						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" pattern="dd-MMM-yy" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						x="28"
						y="0"
						width="81"
						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" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						x="315"
						y="0"
						width="114"
						height="18"
						key="textField"/>
					<box></box>
					<textElement>
						<font fontName="Arial" size="12"/>
					</textElement>
				<textFieldExpression   class="java.lang.String"><![CDATA[$F{ftitem_code}]]></textFieldExpression>
				</textField>
				<textField isStretchWithOverflow="false" pattern="#,##0.00" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						x="802"
						y="0"
						width="101"
						height="18"
						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="true" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						x="429"
						y="0"
						width="373"
						height="18"
						key="textField"
						stretchType="RelativeToBandHeight"
						isPrintWhenDetailOverflows="true"/>
					<box></box>
					<textElement>
						<font fontName="Arial" size="12"/>
					</textElement>
				<textFieldExpression   class="java.lang.String"><![CDATA[$F{ftitem_namex}]]></textFieldExpression>
				</textField>
				<textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						x="201"
						y="0"
						width="114"
						height="18"
						key="textField-8"/>
					<box></box>
					<textElement>
						<font fontName="Arial" size="12"/>
					</textElement>
				<textFieldExpression   class="java.lang.String"><![CDATA[$F{ftsales_invoice_no}]]></textFieldExpression>
				</textField>
			</band>
		</detail>
		<columnFooter>
			<band height="0"  isSplitAllowed="true" >
			</band>
		</columnFooter>
		<pageFooter>
			<band height="32"  isSplitAllowed="true" >
				<textField isStretchWithOverflow="false" pattern="EEE, d MMM yyyy HH:mm:ss" isBlankWhenNull="false" evaluationTime="Report" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						x="429"
						y="14"
						width="474"
						height="18"
						key="textField-4"/>
					<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="0"
						y="14"
						width="429"
						height="18"
						key="textField-5"/>
					<box></box>
					<textElement textAlignment="Right">
						<font fontName="Arial" pdfFontName="Helvetica-Oblique" size="12" isItalic="true"/>
					</textElement>
				<textFieldExpression   class="java.lang.String"><![CDATA[$P{username}]]></textFieldExpression>
				</textField>
			</band>
		</pageFooter>
		<lastPageFooter>
			<band height="49"  isSplitAllowed="true" >
				<textField isStretchWithOverflow="false" pattern="EEE, d MMM yyyy HH:mm:ss" isBlankWhenNull="false" evaluationTime="Report" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						x="429"
						y="21"
						width="474"
						height="28"
						key="textField-9"/>
					<box></box>
					<textElement textAlignment="Right" verticalAlignment="Bottom">
						<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="0"
						y="21"
						width="429"
						height="28"
						key="textField-10"/>
					<box></box>
					<textElement textAlignment="Right" verticalAlignment="Bottom">
						<font fontName="Arial" pdfFontName="Helvetica-Oblique" size="12" isItalic="true"/>
					</textElement>
				<textFieldExpression   class="java.lang.String"><![CDATA[$P{username}]]></textFieldExpression>
				</textField>
				<textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						x="0"
						y="0"
						width="802"
						height="21"
						key="textField-11"/>
					<box>					<topPen lineWidth="0.5" lineStyle="Solid"/>
</box>
					<textElement textAlignment="Right">
						<font fontName="Arial" size="12" isBold="true"/>
					</textElement>
				<textFieldExpression   class="java.lang.String"><![CDATA["Grand Total : "]]></textFieldExpression>
				</textField>
				<textField isStretchWithOverflow="false" pattern="#,##0.00" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						x="802"
						y="0"
						width="101"
						height="21"
						key="textField-12"/>
					<box>					<topPen lineWidth="0.5" lineStyle="Solid"/>
</box>
					<textElement textAlignment="Right">
						<font fontName="Arial" size="12" isBold="true"/>
					</textElement>
				<textFieldExpression   class="java.lang.Double"><![CDATA[$V{grandtotal_qty}]]></textFieldExpression>
				</textField>
			</band>
		</lastPageFooter>
		<summary>
			<band height="0"  isSplitAllowed="true" >
			</band>
		</summary>
</jasperReport>
