<?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="reportbb00_data_barang"
		 columnCount="1"
		 printOrder="Vertical"
		 orientation="Portrait"
		 pageWidth="842"
		 pageHeight="1048"
		 columnWidth="842"
		 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="ftitem_code" isForPrompting="true" class="java.lang.String"/>
	<parameter name="ftsupplier_name" isForPrompting="true" class="java.lang.String"/>
	<parameter name="username" isForPrompting="true" class="java.lang.String"/>
	<queryString><![CDATA[call spbbireport00_data_barang($P{ftitem_code})]]></queryString>

	<field name="ftcompany_name" class="java.lang.String"/>
	<field name="ftsupplier_name" class="java.lang.String"/>
	<field name="ftstock_group_name" class="java.lang.String"/>
	<field name="ftstock_group_name1" class="java.lang.String"/>
	<field name="ftitem_code" class="java.lang.String"/>
	<field name="ftitem_name" class="java.lang.String"/>
	<field name="fnqty_available" class="java.lang.Long"/>
	<field name="ftuom_code" class="java.lang.String"/>
	<field name="STATUS" class="java.lang.String"/>

	<sortField name="ftitem_code" />

	<variable name="urut" class="java.lang.Integer" resetType="Group" resetGroup="g_company" 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.Long" resetType="Group" resetGroup="sub_group" calculation="Sum">
		<variableExpression><![CDATA[$F{fnqty_available}]]></variableExpression>
	</variable>
	<variable name="grand_total" class="java.lang.Long" resetType="Report" calculation="Sum">
		<variableExpression><![CDATA[$V{total_qty}]]></variableExpression>
	</variable>

		<group  name="g_company" >
			<groupExpression><![CDATA[$F{ftcompany_name}]]></groupExpression>
			<groupHeader>
			<band height="1"  isSplitAllowed="true" >
			</band>
			</groupHeader>
			<groupFooter>
			<band height="0"  isSplitAllowed="true" >
			</band>
			</groupFooter>
		</group>
		<group  name="sub_group" >
			<groupExpression><![CDATA[$F{ftstock_group_name}]]></groupExpression>
			<groupHeader>
			<band height="15"  isSplitAllowed="true" >
				<textField isStretchWithOverflow="false" isBlankWhenNull="true" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						x="0"
						y="0"
						width="700"
						height="15"
						key="textField"/>
					<box>					<bottomPen lineWidth="1.0"/>
</box>
					<textElement>
						<font fontName="Arial" pdfFontName="Helvetica-Bold" size="10" isBold="true"/>
					</textElement>
				<textFieldExpression   class="java.lang.String"><![CDATA[$F{ftstock_group_name}]]></textFieldExpression>
				</textField>
			</band>
			</groupHeader>
			<groupFooter>
			<band height="24"  isSplitAllowed="true" >
				<textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						x="722"
						y="3"
						width="98"
						height="18"
						key="textField"/>
					<box></box>
					<textElement textAlignment="Right">
						<font fontName="Arial" pdfFontName="Helvetica-Bold" isBold="true"/>
					</textElement>
				<textFieldExpression   class="java.lang.Long"><![CDATA[$V{total_qty}]]></textFieldExpression>
				</textField>
				<staticText>
					<reportElement
						x="502"
						y="3"
						width="198"
						height="17"
						key="staticText-6"/>
					<box></box>
					<textElement textAlignment="Right">
						<font fontName="Arial" pdfFontName="Helvetica-Bold" size="12" isBold="true"/>
					</textElement>
				<text><![CDATA[Total]]></text>
				</staticText>
			</band>
			</groupFooter>
		</group>
		<group  name="ftitem_code" >
			<groupExpression><![CDATA[$F{ftitem_code}]]></groupExpression>
			<groupHeader>
			<band height="0"  isSplitAllowed="true" >
			</band>
			</groupHeader>
			<groupFooter>
			<band height="1"  isSplitAllowed="true" >
				<line direction="TopDown">
					<reportElement
						x="2"
						y="0"
						width="779"
						height="0"
						key="line-6"/>
					<graphicElement stretchType="NoStretch">
					<pen lineWidth="1.0" lineStyle="Dotted"/>
</graphicElement>
				</line>
			</band>
			</groupFooter>
		</group>
		<background>
			<band height="0"  isSplitAllowed="true" >
			</band>
		</background>
		<title>
			<band height="1"  isSplitAllowed="true" >
			</band>
		</title>
		<pageHeader>
			<band height="77"  isSplitAllowed="true" >
				<textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						x="0"
						y="0"
						width="359"
						height="18"
						key="textField"/>
					<box></box>
					<textElement>
						<font fontName="Arial" size="12"/>
					</textElement>
				<textFieldExpression   class="java.lang.String"><![CDATA[$F{ftcompany_name}]]></textFieldExpression>
				</textField>
				<staticText>
					<reportElement
						x="134"
						y="18"
						width="504"
						height="17"
						key="staticText-1"/>
					<box></box>
					<textElement textAlignment="Center">
						<font fontName="Arial" pdfFontName="Helvetica-Bold" size="12" isBold="true"/>
					</textElement>
				<text><![CDATA[DATA BARANG]]></text>
				</staticText>
				<staticText>
					<reportElement
						x="0"
						y="57"
						width="27"
						height="16"
						key="staticText-2"/>
					<box></box>
					<textElement>
						<font fontName="Arial" pdfFontName="Helvetica-Bold" size="12" isBold="true"/>
					</textElement>
				<text><![CDATA[No.]]></text>
				</staticText>
				<staticText>
					<reportElement
						x="42"
						y="57"
						width="92"
						height="16"
						key="staticText-3"/>
					<box></box>
					<textElement>
						<font fontName="Arial" pdfFontName="Helvetica-Bold" size="12" isBold="true"/>
					</textElement>
				<text><![CDATA[Kode Barang]]></text>
				</staticText>
				<staticText>
					<reportElement
						x="265"
						y="56"
						width="196"
						height="17"
						key="staticText-4"/>
					<box></box>
					<textElement>
						<font fontName="Arial" pdfFontName="Helvetica-Bold" size="12" isBold="true"/>
					</textElement>
				<text><![CDATA[Nama Barang]]></text>
				</staticText>
				<textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						x="581"
						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="681"
						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>
				<line direction="TopDown">
					<reportElement
						x="-2"
						y="54"
						width="830"
						height="0"
						key="line-4"/>
					<graphicElement stretchType="NoStretch"/>
				</line>
				<line direction="TopDown">
					<reportElement
						x="2"
						y="75"
						width="830"
						height="0"
						key="line-5"/>
					<graphicElement stretchType="NoStretch"/>
				</line>
				<staticText>
					<reportElement
						x="722"
						y="56"
						width="99"
						height="17"
						key="staticText-5"/>
					<box></box>
					<textElement textAlignment="Right">
						<font fontName="Arial" pdfFontName="Helvetica-Bold" size="12" isBold="true"/>
					</textElement>
				<text><![CDATA[Qty]]></text>
				</staticText>
			</band>
		</pageHeader>
		<columnHeader>
			<band height="0"  isSplitAllowed="true" >
			</band>
		</columnHeader>
		<detail>
			<band height="15"  isSplitAllowed="true" >
				<textField isStretchWithOverflow="false" isBlankWhenNull="true" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						x="0"
						y="0"
						width="29"
						height="15"
						key="textField"/>
					<box></box>
					<textElement verticalAlignment="Middle">
						<font fontName="Arial" size="10"/>
					</textElement>
				<textFieldExpression   class="java.lang.Integer"><![CDATA[$V{urut}]]></textFieldExpression>
				</textField>
				<textField isStretchWithOverflow="true" isBlankWhenNull="true" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						x="42"
						y="0"
						width="223"
						height="15"
						key="textField"
						stretchType="RelativeToBandHeight"
						isPrintWhenDetailOverflows="true"/>
					<box></box>
					<textElement verticalAlignment="Middle">
						<font fontName="Arial" size="10"/>
					</textElement>
				<textFieldExpression   class="java.lang.String"><![CDATA[$F{ftitem_code}]]></textFieldExpression>
				</textField>
				<textField isStretchWithOverflow="true" isBlankWhenNull="true" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						x="265"
						y="0"
						width="435"
						height="15"
						key="textField"
						stretchType="RelativeToBandHeight"
						isPrintWhenDetailOverflows="true"/>
					<box></box>
					<textElement verticalAlignment="Middle">
						<font fontName="Arial" size="10"/>
					</textElement>
				<textFieldExpression   class="java.lang.String"><![CDATA[$F{ftitem_name}]]></textFieldExpression>
				</textField>
				<textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						x="720"
						y="0"
						width="100"
						height="15"
						key="textField"/>
					<box></box>
					<textElement textAlignment="Right">
						<font fontName="Arial"/>
					</textElement>
				<textFieldExpression   class="java.lang.Long"><![CDATA[$F{fnqty_available}]]></textFieldExpression>
				</textField>
			</band>
		</detail>
		<columnFooter>
			<band height="0"  isSplitAllowed="true" >
			</band>
		</columnFooter>
		<pageFooter>
			<band height="51"  isSplitAllowed="true" >
				<textField isStretchWithOverflow="false" pattern="EEE, d MMM yyyy HH:mm:ss" isBlankWhenNull="false" evaluationTime="Report" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						x="622"
						y="17"
						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="519"
						y="17"
						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>
		<lastPageFooter>
			<band height="84"  isSplitAllowed="true" >
				<textField isStretchWithOverflow="false" pattern="EEE, d MMM yyyy HH:mm:ss" isBlankWhenNull="false" evaluationTime="Report" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						x="622"
						y="64"
						width="205"
						height="18"
						key="textField-1"/>
					<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="519"
						y="64"
						width="100"
						height="18"
						key="textField-2"/>
					<box></box>
					<textElement>
						<font fontName="Arial" size="12"/>
					</textElement>
				<textFieldExpression   class="java.lang.String"><![CDATA[$P{username}]]></textFieldExpression>
				</textField>
				<staticText>
					<reportElement
						x="502"
						y="8"
						width="198"
						height="17"
						key="staticText-7"/>
					<box></box>
					<textElement textAlignment="Right">
						<font fontName="Arial" pdfFontName="Helvetica-Bold" size="12" isBold="true"/>
					</textElement>
				<text><![CDATA[Grand Total]]></text>
				</staticText>
				<textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						x="722"
						y="8"
						width="92"
						height="17"
						key="textField"/>
					<box></box>
					<textElement textAlignment="Right">
						<font fontName="Arial" pdfFontName="Helvetica-Bold" isBold="true"/>
					</textElement>
				<textFieldExpression   class="java.lang.Long"><![CDATA[$V{grand_total}]]></textFieldExpression>
				</textField>
				<line direction="TopDown">
					<reportElement
						x="1"
						y="6"
						width="830"
						height="0"
						key="line-7"/>
					<graphicElement stretchType="NoStretch"/>
				</line>
			</band>
		</lastPageFooter>
		<summary>
			<band height="0"  isSplitAllowed="true" >
			</band>
		</summary>
</jasperReport>
