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

	<field name="ftcompany_name" class="java.lang.String"/>
	<field name="ftitem_code" class="java.lang.String"/>
	<field name="ftitem_name" class="java.lang.String"/>
	<field name="fnsaldo_awal" class="java.lang.Double"/>
	<field name="fnmasuk" class="java.lang.Double"/>
	<field name="fnkeluar" class="java.lang.Double"/>
	<field name="fnsaldo_akhir" class="java.lang.Double"/>

	<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="g_awal" class="java.lang.Double" resetType="Group" resetGroup="g_company" calculation="Sum">
		<variableExpression><![CDATA[$F{fnsaldo_awal}]]></variableExpression>
	</variable>
	<variable name="g_masuk" class="java.lang.Double" resetType="Group" resetGroup="g_company" calculation="Sum">
		<variableExpression><![CDATA[$F{fnmasuk}]]></variableExpression>
	</variable>
	<variable name="g_keluar" class="java.lang.Double" resetType="Group" resetGroup="g_company" calculation="Sum">
		<variableExpression><![CDATA[$F{fnkeluar}]]></variableExpression>
	</variable>
	<variable name="g_akhir" class="java.lang.Double" resetType="Group" resetGroup="g_company" calculation="Sum">
		<variableExpression><![CDATA[$F{fnsaldo_akhir}]]></variableExpression>
	</variable>

		<group  name="g_company" >
			<groupExpression><![CDATA[$F{ftcompany_name}]]></groupExpression>
			<groupHeader>
			<band height="0"  isSplitAllowed="true" >
			</band>
			</groupHeader>
			<groupFooter>
			<band height="29"  isSplitAllowed="true" >
				<line direction="TopDown">
					<reportElement
						x="471"
						y="4"
						width="360"
						height="0"
						key="line-4"/>
					<graphicElement stretchType="NoStretch"/>
				</line>
				<textField isStretchWithOverflow="false" pattern="#,##0.00" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						x="481"
						y="6"
						width="91"
						height="18"
						key="textField"/>
					<box></box>
					<textElement textAlignment="Right">
						<font fontName="Arial" size="10"/>
					</textElement>
				<textFieldExpression   class="java.lang.Double"><![CDATA[$V{g_awal}]]></textFieldExpression>
				</textField>
				<textField isStretchWithOverflow="false" pattern="#,##0.00" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						x="572"
						y="6"
						width="91"
						height="18"
						key="textField"/>
					<box></box>
					<textElement textAlignment="Right">
						<font fontName="Arial" size="10"/>
					</textElement>
				<textFieldExpression   class="java.lang.Double"><![CDATA[$V{g_masuk}]]></textFieldExpression>
				</textField>
				<textField isStretchWithOverflow="false" pattern="#,##0.00" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						x="663"
						y="6"
						width="91"
						height="18"
						key="textField"/>
					<box></box>
					<textElement textAlignment="Right">
						<font fontName="Arial" size="10"/>
					</textElement>
				<textFieldExpression   class="java.lang.Double"><![CDATA[$V{g_keluar}]]></textFieldExpression>
				</textField>
				<textField isStretchWithOverflow="false" pattern="#,##0.00" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						x="754"
						y="6"
						width="83"
						height="18"
						key="textField"/>
					<box></box>
					<textElement textAlignment="Right">
						<font fontName="Arial" size="10"/>
					</textElement>
				<textFieldExpression   class="java.lang.Double"><![CDATA[$V{g_akhir}]]></textFieldExpression>
				</textField>
			</band>
			</groupFooter>
		</group>
		<background>
			<band height="0"  isSplitAllowed="true" >
			</band>
		</background>
		<title>
			<band height="1"  isSplitAllowed="true" >
			</band>
		</title>
		<pageHeader>
			<band height="86"  isSplitAllowed="true" >
				<textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						x="0"
						y="0"
						width="421"
						height="17"
						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="237"
						y="17"
						width="395"
						height="18"
						key="staticText-1"/>
					<box></box>
					<textElement textAlignment="Center">
						<font fontName="Arial" pdfFontName="Helvetica-Bold" size="12" isBold="true"/>
					</textElement>
				<text><![CDATA[LAPORAN PERSEDIAAN PER BARANG]]></text>
				</staticText>
				<line direction="TopDown">
					<reportElement
						x="0"
						y="55"
						width="837"
						height="1"
						key="line-1"/>
					<graphicElement stretchType="NoStretch"/>
				</line>
				<line direction="TopDown">
					<reportElement
						x="0"
						y="81"
						width="837"
						height="1"
						key="line-2"/>
					<graphicElement stretchType="NoStretch"/>
				</line>
				<staticText>
					<reportElement
						x="2"
						y="59"
						width="27"
						height="20"
						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="29"
						y="59"
						width="128"
						height="20"
						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="187"
						y="59"
						width="264"
						height="20"
						key="staticText-4"/>
					<box></box>
					<textElement>
						<font fontName="Arial" pdfFontName="Helvetica-Bold" size="12" isBold="true"/>
					</textElement>
				<text><![CDATA[Nama Barang]]></text>
				</staticText>
				<staticText>
					<reportElement
						x="481"
						y="59"
						width="91"
						height="20"
						key="staticText-5"/>
					<box></box>
					<textElement textAlignment="Right">
						<font fontName="Arial" pdfFontName="Helvetica-Bold" size="12" isBold="true"/>
					</textElement>
				<text><![CDATA[Awal]]></text>
				</staticText>
				<staticText>
					<reportElement
						x="572"
						y="59"
						width="91"
						height="20"
						key="staticText-6"/>
					<box></box>
					<textElement textAlignment="Right">
						<font fontName="Arial" pdfFontName="Helvetica-Bold" size="12" isBold="true"/>
					</textElement>
				<text><![CDATA[Masuk]]></text>
				</staticText>
				<staticText>
					<reportElement
						x="663"
						y="59"
						width="91"
						height="20"
						key="staticText-7"/>
					<box></box>
					<textElement textAlignment="Right">
						<font fontName="Arial" pdfFontName="Helvetica-Bold" size="12" isBold="true"/>
					</textElement>
				<text><![CDATA[Keluar]]></text>
				</staticText>
				<staticText>
					<reportElement
						x="754"
						y="59"
						width="83"
						height="20"
						key="staticText-8"/>
					<box></box>
					<textElement textAlignment="Right">
						<font fontName="Arial" pdfFontName="Helvetica-Bold" size="12" isBold="true"/>
					</textElement>
				<text><![CDATA[Akhir]]></text>
				</staticText>
				<staticText>
					<reportElement
						x="0"
						y="35"
						width="92"
						height="20"
						key="staticText-9"/>
					<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="98"
						y="35"
						width="92"
						height="18"
						key="textField-1"/>
					<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="190"
						y="35"
						width="25"
						height="17"
						key="staticText-10"/>
					<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="215"
						y="35"
						width="100"
						height="18"
						key="textField-2"/>
					<box></box>
					<textElement>
						<font fontName="Arial" size="12"/>
					</textElement>
				<textFieldExpression   class="java.util.Date"><![CDATA[$P{date_end}]]></textFieldExpression>
				</textField>
				<textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						x="570"
						y="-20"
						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="670"
						y="-20"
						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>
		</pageHeader>
		<columnHeader>
			<band height="3"  isSplitAllowed="true" >
			</band>
		</columnHeader>
		<detail>
			<band height="16"  isSplitAllowed="true" >
				<textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						x="0"
						y="0"
						width="29"
						height="16"
						key="textField"/>
					<box></box>
					<textElement>
						<font fontName="Arial" size="10"/>
					</textElement>
				<textFieldExpression   class="java.lang.Integer"><![CDATA[$V{urut}]]></textFieldExpression>
				</textField>
				<textField isStretchWithOverflow="true" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						x="29"
						y="0"
						width="146"
						height="16"
						key="textField"
						stretchType="RelativeToBandHeight"
						isPrintWhenDetailOverflows="true"/>
					<box></box>
					<textElement>
						<font fontName="Arial" size="10"/>
					</textElement>
				<textFieldExpression   class="java.lang.String"><![CDATA[$F{ftitem_code}]]></textFieldExpression>
				</textField>
				<textField isStretchWithOverflow="true" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						x="181"
						y="0"
						width="270"
						height="16"
						key="textField"
						stretchType="RelativeToBandHeight"
						isPrintWhenDetailOverflows="true"/>
					<box></box>
					<textElement>
						<font fontName="Arial" size="10"/>
					</textElement>
				<textFieldExpression   class="java.lang.String"><![CDATA[$F{ftitem_name}]]></textFieldExpression>
				</textField>
				<textField isStretchWithOverflow="false" pattern="#,##0.00" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						x="481"
						y="0"
						width="91"
						height="16"
						key="textField"/>
					<box></box>
					<textElement textAlignment="Right">
						<font fontName="Arial" size="10"/>
					</textElement>
				<textFieldExpression   class="java.lang.Double"><![CDATA[$F{fnsaldo_awal}]]></textFieldExpression>
				</textField>
				<textField isStretchWithOverflow="false" pattern="#,##0.00" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						x="572"
						y="0"
						width="90"
						height="16"
						key="textField"/>
					<box></box>
					<textElement textAlignment="Right">
						<font fontName="Arial" size="10"/>
					</textElement>
				<textFieldExpression   class="java.lang.Double"><![CDATA[$F{fnmasuk}]]></textFieldExpression>
				</textField>
				<textField isStretchWithOverflow="false" pattern="#,##0.00" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						x="663"
						y="0"
						width="91"
						height="16"
						key="textField"/>
					<box></box>
					<textElement textAlignment="Right">
						<font fontName="Arial" size="10"/>
					</textElement>
				<textFieldExpression   class="java.lang.Double"><![CDATA[$F{fnkeluar}]]></textFieldExpression>
				</textField>
				<textField isStretchWithOverflow="false" pattern="#,##0.00" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						x="754"
						y="0"
						width="83"
						height="16"
						key="textField"/>
					<box></box>
					<textElement textAlignment="Right">
						<font fontName="Arial" size="10"/>
					</textElement>
				<textFieldExpression   class="java.lang.Double"><![CDATA[$F{fnsaldo_akhir}]]></textFieldExpression>
				</textField>
			</band>
		</detail>
		<columnFooter>
			<band height="0"  isSplitAllowed="true" >
			</band>
		</columnFooter>
		<pageFooter>
			<band height="30"  isSplitAllowed="true" >
				<textField isStretchWithOverflow="false" pattern="EEE, d MMM yyyy HH:mm:ss" isBlankWhenNull="false" evaluationTime="Report" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						x="632"
						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="529"
						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="0"  isSplitAllowed="true" >
			</band>
		</summary>
</jasperReport>
