<?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="report24_rekap_per_lokasi"
		 columnCount="1"
		 printOrder="Vertical"
		 orientation="Landscape"
		 pageWidth="1500"
		 pageHeight="400"
		 columnWidth="1440"
		 columnSpacing="0"
		 leftMargin="30"
		 rightMargin="30"
		 topMargin="20"
		 bottomMargin="20"
		 whenNoDataType="AllSectionsNoDetail"
		 isTitleNewPage="false"
		 isSummaryNewPage="false"
		 isIgnorePagination="true">
	<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="ftitem_code" isForPrompting="true" class="java.lang.String"/>
	<parameter name="ftlocation_code" isForPrompting="true" class="java.lang.String"/>
	<parameter name="username" isForPrompting="true" class="java.lang.String"/>
	<queryString><![CDATA[call spireport24_rekap_per_lokasi($P{ftitem_code},$P{ftlocation_code},$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="ftpart_no" class="java.lang.String"/>
	<field name="ftlocation_code" class="java.lang.String"/>
	<field name="ftlocation_name" class="java.lang.String"/>
	<field name="fnsaldo_akhir" class="java.lang.Double"/>

	<variable name="urut" class="java.lang.Integer" resetType="Group" resetGroup="g_ftcompany_name" calculation="Count">
		<variableExpression><![CDATA[new java.lang.Integer(0) ]]></variableExpression>
		<initialValueExpression><![CDATA[new java.lang.Integer(1) ]]></initialValueExpression>
	</variable>

		<group  name="g_ftcompany_name" >
			<groupExpression><![CDATA[$F{ftcompany_name}]]></groupExpression>
			<groupHeader>
			<band height="0"  isSplitAllowed="true" >
			</band>
			</groupHeader>
			<groupFooter>
			<band height="0"  isSplitAllowed="true" >
			</band>
			</groupFooter>
		</group>
		<background>
			<band height="0"  isSplitAllowed="true" >
			</band>
		</background>
		<title>
			<band height="1"  isSplitAllowed="true" >
			</band>
		</title>
		<pageHeader>
			<band height="52"  isSplitAllowed="true" >
				<textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						x="0"
						y="0"
						width="480"
						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="0"
						y="17"
						width="480"
						height="18"
						key="staticText-1"/>
					<box></box>
					<textElement textAlignment="Right">
						<font fontName="Arial" pdfFontName="Helvetica-Bold" size="12" isBold="true"/>
					</textElement>
				<text><![CDATA[LAPORAN REKAP STOCK PER LOKASI]]></text>
				</staticText>
				<textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						x="0"
						y="35"
						width="480"
						height="17"
						key="textField-1"/>
					<box></box>
					<textElement>
						<font fontName="Arial" size="12"/>
					</textElement>
				<textFieldExpression   class="java.lang.String"><![CDATA["Periode s/d : " + new SimpleDateFormat("dd-MMM-yyyy").format($P{date_end})]]></textFieldExpression>
				</textField>
			</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="0"  isSplitAllowed="true" >
			</band>
		</pageFooter>
		<summary>
			<band height="100"  isSplitAllowed="false" >
				<crosstab >
					<reportElement
						x="0"
						y="0"
						width="1500"
						height="50"
						key="crosstab-1"
						positionType="Float"/>
					<crosstabDataset isDataPreSorted="true" >
						<dataset >
						</dataset>
					</crosstabDataset>
					<crosstabHeaderCell>						<cellContents mode="Transparent">
					<box></box>
				<staticText>
					<reportElement
						x="0"
						y="0"
						width="80"
						height="25"
						key="staticText-11"/>
					<box></box>
					<textElement textAlignment="Left" verticalAlignment="Middle">
						<font fontName="SansSerif" size="12" isBold="true"/>
					</textElement>
				<text><![CDATA[KODE BARANG]]></text>
				</staticText>
				<staticText>
					<reportElement
						x="80"
						y="0"
						width="400"
						height="25"
						key="staticText-10"/>
					<box></box>
					<textElement textAlignment="Left" verticalAlignment="Middle">
						<font fontName="SansSerif" size="12" isBold="true"/>
					</textElement>
				<text><![CDATA[NAMA BARANG]]></text>
				</staticText>
						</cellContents>
					</crosstabHeaderCell>					<rowGroup name="ftitem_code" width="80" totalPosition="End">
						<bucket>
							<bucketExpression class="java.lang.String"><![CDATA[$F{ftitem_code}]]></bucketExpression>
						</bucket>
						<crosstabRowHeader>
						<cellContents mode="Transparent">
					<box></box>
				<textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						x="0"
						y="0"
						width="80"
						height="30"
						key="textField"/>
					<box></box>
					<textElement textAlignment="Left" verticalAlignment="Middle">
						<font/>
					</textElement>
				<textFieldExpression   class="java.lang.String"><![CDATA[$V{ftitem_code}]]></textFieldExpression>
				</textField>
						</cellContents>
						</crosstabRowHeader>
						<crosstabTotalRowHeader>
						<cellContents mode="Transparent">
					<box></box>
				<textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						x="0"
						y="0"
						width="480"
						height="30"
						key="textField"/>
					<box></box>
					<textElement textAlignment="Center" verticalAlignment="Middle">
						<font isBold="true"/>
					</textElement>
				<textFieldExpression   class="java.lang.String"><![CDATA["TOTAL QTY LOKASI"]]></textFieldExpression>
				</textField>
						</cellContents>
						</crosstabTotalRowHeader>
					</rowGroup>
					<rowGroup name="ftitem_name" width="400">
						<bucket>
							<bucketExpression class="java.lang.String"><![CDATA[$F{ftitem_name}]]></bucketExpression>
						</bucket>
						<crosstabRowHeader>
						<cellContents mode="Transparent">
					<box></box>
				<textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						x="0"
						y="0"
						width="400"
						height="30"
						key="textField-11"/>
					<box></box>
					<textElement textAlignment="Left" verticalAlignment="Middle">
						<font/>
					</textElement>
				<textFieldExpression   class="java.lang.String"><![CDATA[$V{ftitem_name}]]></textFieldExpression>
				</textField>
						</cellContents>
						</crosstabRowHeader>
					</rowGroup>
					<columnGroup name="ftlocation_code" height="25" totalPosition="End" headerPosition="Center">
						<bucket>
							<bucketExpression class="java.lang.String"><![CDATA[$F{ftlocation_code}]]></bucketExpression>
						</bucket>
						<crosstabColumnHeader>
						<cellContents mode="Transparent">
					<box></box>
				<textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						x="0"
						y="0"
						width="50"
						height="25"
						key="textField"/>
					<box></box>
					<textElement textAlignment="Right" verticalAlignment="Middle">
						<font size="12" isBold="true"/>
					</textElement>
				<textFieldExpression   class="java.lang.String"><![CDATA[$V{ftlocation_code}]]></textFieldExpression>
				</textField>
						</cellContents>
						</crosstabColumnHeader>
						<crosstabTotalColumnHeader>
						<cellContents mode="Transparent">
					<box></box>
				<textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						x="0"
						y="0"
						width="80"
						height="25"
						key="textField"/>
					<box></box>
					<textElement textAlignment="Right" verticalAlignment="Middle">
						<font size="12" isBold="true"/>
					</textElement>
				<textFieldExpression   class="java.lang.String"><![CDATA["TOTAL"]]></textFieldExpression>
				</textField>
						</cellContents>
						</crosstabTotalColumnHeader>
					</columnGroup>

					<measure name="fnsaldo_akhir_Sum" class="java.lang.Double" calculation="Sum">
						<measureExpression><![CDATA[$F{fnsaldo_akhir}]]></measureExpression>
					</measure>
					<crosstabCell width="50" height="30">
						<cellContents mode="Transparent">
					<box></box>
				<textField isStretchWithOverflow="false" pattern="#,##0.00" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						x="0"
						y="0"
						width="50"
						height="30"
						key="textField"/>
					<box></box>
					<textElement textAlignment="Right" verticalAlignment="Middle">
						<font/>
					</textElement>
				<textFieldExpression   class="java.lang.Double"><![CDATA[$V{fnsaldo_akhir_Sum}]]></textFieldExpression>
				</textField>
						</cellContents>
					</crosstabCell>
					<crosstabCell width="80" height="30" columnTotalGroup="ftlocation_code">
						<cellContents mode="Transparent">
					<box></box>
				<textField isStretchWithOverflow="false" pattern="#,##0.00" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						x="0"
						y="0"
						width="80"
						height="30"
						key="textField"/>
					<box></box>
					<textElement textAlignment="Right" verticalAlignment="Middle">
						<font isBold="true"/>
					</textElement>
				<textFieldExpression   class="java.lang.Double"><![CDATA[$V{fnsaldo_akhir_Sum}]]></textFieldExpression>
				</textField>
						</cellContents>
					</crosstabCell>
					<crosstabCell width="50" height="30" rowTotalGroup="ftitem_code">
						<cellContents mode="Transparent">
					<box></box>
				<textField isStretchWithOverflow="false" pattern="#,##0.00" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						x="0"
						y="0"
						width="50"
						height="30"
						key="textField"/>
					<box></box>
					<textElement textAlignment="Right" verticalAlignment="Middle">
						<font isBold="true"/>
					</textElement>
				<textFieldExpression   class="java.lang.Double"><![CDATA[$V{fnsaldo_akhir_Sum}]]></textFieldExpression>
				</textField>
						</cellContents>
					</crosstabCell>
					<crosstabCell width="80" height="30" rowTotalGroup="ftitem_code" columnTotalGroup="ftlocation_code">
						<cellContents mode="Transparent">
					<box></box>
				<textField isStretchWithOverflow="false" pattern="#,##0.00" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						x="0"
						y="0"
						width="80"
						height="30"
						key="textField"/>
					<box></box>
					<textElement textAlignment="Right" verticalAlignment="Middle">
						<font isBold="true"/>
					</textElement>
				<textFieldExpression   class="java.lang.Double"><![CDATA[$V{fnsaldo_akhir_Sum}]]></textFieldExpression>
				</textField>
						</cellContents>
					</crosstabCell>
					<crosstabCell width="50" height="0" rowTotalGroup="ftitem_name">
						<cellContents mode="Transparent">
					<box></box>
						</cellContents>
					</crosstabCell>
					<crosstabCell width="80" height="0" rowTotalGroup="ftitem_name" columnTotalGroup="ftlocation_code">
						<cellContents mode="Transparent">
					<box></box>
						</cellContents>
					</crosstabCell>
					<whenNoDataCell>						<cellContents mode="Transparent">
					<box></box>
						</cellContents>
					</whenNoDataCell>					</crosstab>
			</band>
		</summary>
</jasperReport>
