<?xml version="1.0" encoding="UTF-8"?>
<jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" name="reportName" language="groovy" pageWidth="842" pageHeight="595" orientation="Landscape" whenNoDataType="NoDataSection" columnWidth="782" leftMargin="30" rightMargin="30" topMargin="12" bottomMargin="12" isSummaryNewPage="true" isSummaryWithPageHeaderAndFooter="true">
	<property name="ireport.scriptlethandling" value="0"/>
	<property name="ireport.encoding" value="UTF-8"/>
	<property name="ireport.zoom" value="1.0"/>
	<property name="ireport.x" value="0"/>
	<property name="ireport.y" value="0"/>
	<import value="net.sf.jasperreports.engine.*"/>
	<import value="java.util.*"/>
	<import value="net.sf.jasperreports.engine.data.*"/>
	<style name="Crosstab Data Text" isDefault="false" hAlign="Center"/>
	<style name="table" isDefault="false" fill="Solid" fontSize="12" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false">
		<box topPadding="0" leftPadding="0" bottomPadding="0" rightPadding="0">
			<pen lineWidth="0.0" lineColor="#000000"/>
			<topPen lineWidth="0.0"/>
			<leftPen lineWidth="0.0"/>
			<bottomPen lineWidth="0.0"/>
			<rightPen lineWidth="0.0"/>
		</box>
	</style>
	<style name="table_TH" isDefault="false" mode="Opaque" backcolor="#C7C7C7" fontSize="12" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false">
		<box topPadding="0" leftPadding="0" bottomPadding="0" rightPadding="0">
			<pen lineWidth="1.0" lineColor="#000000"/>
			<topPen lineWidth="1.0"/>
			<leftPen lineWidth="0.0"/>
			<bottomPen lineWidth="1.0"/>
			<rightPen lineWidth="0.0"/>
		</box>
	</style>
	<style name="table_CH" isDefault="false" mode="Opaque" backcolor="#FFFFFF" fontSize="12" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false">
		<box topPadding="0" leftPadding="0" bottomPadding="0" rightPadding="0">
			<pen lineWidth="1.0" lineColor="#000000"/>
			<topPen lineWidth="0.0"/>
			<leftPen lineWidth="0.0"/>
			<bottomPen lineWidth="1.0"/>
			<rightPen lineWidth="0.0"/>
		</box>
	</style>
	<style name="table_TD" isDefault="false" mode="Opaque" backcolor="#FFFFFF" fontSize="10" isBold="false" isItalic="false" isUnderline="false" isStrikeThrough="false">
		<box topPadding="0" leftPadding="0" bottomPadding="0" rightPadding="0">
			<pen lineWidth="1.0" lineColor="#000000"/>
			<topPen lineWidth="1.0"/>
			<leftPen lineWidth="0.0"/>
			<bottomPen lineWidth="1.0"/>
			<rightPen lineWidth="0.0"/>
		</box>
		<conditionalStyle>
			<conditionExpression><![CDATA[new Boolean($V{REPORT_COUNT}.intValue()%2==0)]]></conditionExpression>
			<style isDefault="false" style="table_TD" backcolor="#F7F7F7"/>
		</conditionalStyle>
	</style>
	<style name="table_CF" isDefault="false" mode="Opaque" backcolor="#EDEDED" fontSize="12" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false">
		<box topPadding="0" leftPadding="0" bottomPadding="0" rightPadding="0">
			<pen lineWidth="1.0"/>
			<topPen lineWidth="1.0"/>
			<leftPen lineWidth="0.0"/>
			<bottomPen lineWidth="1.0"/>
			<rightPen lineWidth="0.0"/>
		</box>
	</style>
	<style name="horizontalBorder" isDefault="false">
		<box>
			<leftPen lineWidth="0.0"/>
			<bottomPen lineWidth="0.5"/>
			<rightPen lineWidth="0.0"/>
		</box>
	</style>
	<subDataset name="dataset2_inventoryTypes">
		<field name="name" class="java.lang.String"/>
		<field name="value" class="java.math.BigDecimal"/>
	</subDataset>
	<subDataset name="dataset3_inventoryGroups">
		<field name="name" class="java.lang.String"/>
		<field name="value" class="java.math.BigDecimal"/>
	</subDataset>
	<parameter name="reportTitle" class="java.lang.String"/>
	<parameter name="currentUser" class="java.lang.String"/>
	<parameter name="logoUrl" class="java.lang.String"/>
	<queryString language="SQL">
		<![CDATA[]]>
	</queryString>
	<field name="summaryOfCalculationMethod" class="java.lang.String"/>
	<field name="inventoryItemCount" class="java.lang.Integer"/>
	<field name="errorMessage" class="java.lang.String"/>
	<field name="inventoryItemTotalValue" class="java.math.BigDecimal"/>
	<field name="currency" class="java.lang.String"/>
	<field name="inventoryTypes" class="java.util.List"/>
	<field name="inventoryGroups" class="java.util.List"/>
	<field name="site" class="java.lang.Object"/>
	<field name="groups" class="java.util.List"/>
	<background>
		<band splitType="Stretch"/>
	</background>
	<pageHeader>
		<band height="54" splitType="Stretch">
			<textField>
				<reportElement key="staticText-1" mode="Transparent" x="400" y="6" width="350" height="20" backcolor="#FFFFFF"/>
				<textElement textAlignment="Center" verticalAlignment="Top" markup="none">
					<font fontName="Serif" size="14"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$P{reportTitle}]]></textFieldExpression>
			</textField>
			<image>
				<reportElement x="0" y="0" width="340" height="50"/>
				<imageExpression class="java.net.URL"><![CDATA[new URL($P{logoUrl})]]></imageExpression>
			</image>
			<textField>
				<reportElement x="400" y="26" width="350" height="18"/>
				<textElement textAlignment="Center" verticalAlignment="Middle">
					<font fontName="Serif"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA["Site: "+$F{site}.name]]></textFieldExpression>
			</textField>
		</band>
	</pageHeader>
	<columnHeader>
		<band splitType="Stretch"/>
	</columnHeader>
	<detail>
		<band height="438" splitType="Stretch">
			<textField isStretchWithOverflow="true" isBlankWhenNull="true">
				<reportElement x="0" y="27" width="105" height="17" isPrintWhenDetailOverflows="true"/>
				<textElement verticalAlignment="Middle" markup="none">
					<font fontName="Serif" size="12" isBold="false"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA["Total Value("+$F{currency}+"): "]]></textFieldExpression>
			</textField>
			<textField isStretchWithOverflow="true" pattern="# ##0" isBlankWhenNull="true">
				<reportElement x="105" y="44" width="235" height="17" isPrintWhenDetailOverflows="true"/>
				<textElement verticalAlignment="Middle" markup="none">
					<font fontName="Serif"/>
				</textElement>
				<textFieldExpression class="java.lang.Integer"><![CDATA[$F{inventoryItemCount}]]></textFieldExpression>
			</textField>
			<textField isStretchWithOverflow="true" pattern="#,##0.00" isBlankWhenNull="true">
				<reportElement x="105" y="27" width="235" height="17" isPrintWhenDetailOverflows="true"/>
				<textElement verticalAlignment="Middle" markup="none">
					<font fontName="Serif" size="12" isBold="false"/>
				</textElement>
				<textFieldExpression class="java.math.BigDecimal"><![CDATA[$F{inventoryItemTotalValue}]]></textFieldExpression>
			</textField>
			<textField isStretchWithOverflow="true" isBlankWhenNull="true">
				<reportElement x="0" y="44" width="105" height="17" isPrintWhenDetailOverflows="true"/>
				<textElement verticalAlignment="Middle" markup="none">
					<font fontName="Serif"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA["Inventory Items: "]]></textFieldExpression>
			</textField>
			<textField isStretchWithOverflow="true">
				<reportElement x="0" y="105" width="340" height="31"/>
				<textElement>
					<font fontName="Serif"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{summaryOfCalculationMethod}]]></textFieldExpression>
			</textField>
			<textField>
				<reportElement mode="Opaque" x="0" y="72" width="340" height="29" forecolor="#FF0000" backcolor="#FFCCCC">
					<printWhenExpression><![CDATA[$F{errorMessage} != null ? true:false]]></printWhenExpression>
				</reportElement>
				<textElement textAlignment="Center" verticalAlignment="Middle">
					<font fontName="Serif" size="12" isBold="true"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{errorMessage}]]></textFieldExpression>
			</textField>
			<textField>
				<reportElement style="horizontalBorder" x="400" y="148" width="335" height="17"/>
				<textElement verticalAlignment="Middle">
					<font fontName="Serif" size="12" isBold="false"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA["Inventory Types"]]></textFieldExpression>
			</textField>
			<componentElement>
				<reportElement stretchType="RelativeToTallestObject" x="400" y="199" width="335" height="17" isPrintWhenDetailOverflows="true"/>
				<jr:list xmlns:jr="http://jasperreports.sourceforge.net/jasperreports/components" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports/components http://jasperreports.sourceforge.net/xsd/components.xsd" printOrder="Vertical">
					<datasetRun subDataset="dataset2_inventoryTypes">
						<dataSourceExpression><![CDATA[new net.sf.jasperreports.engine.data.JRBeanCollectionDataSource($F{inventoryTypes})]]></dataSourceExpression>
					</datasetRun>
					<jr:listContents height="17" width="335">
						<textField>
							<reportElement style="horizontalBorder" x="0" y="0" width="235" height="17"/>
							<textElement verticalAlignment="Middle">
								<font fontName="Serif"/>
							</textElement>
							<textFieldExpression class="java.lang.String"><![CDATA[$F{name}]]></textFieldExpression>
						</textField>
						<textField pattern="#,##0.00">
							<reportElement style="horizontalBorder" x="235" y="0" width="100" height="17"/>
							<textElement verticalAlignment="Middle">
								<font fontName="Serif"/>
							</textElement>
							<textFieldExpression class="java.math.BigDecimal"><![CDATA[$F{value}]]></textFieldExpression>
						</textField>
					</jr:listContents>
				</jr:list>
			</componentElement>
			<textField>
				<reportElement style="horizontalBorder" x="0" y="148" width="335" height="17"/>
				<textElement verticalAlignment="Middle">
					<font fontName="Serif" size="12" isBold="false"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA["Inventory Groups"]]></textFieldExpression>
			</textField>
			<componentElement>
				<reportElement stretchType="RelativeToTallestObject" x="0" y="199" width="335" height="17" isPrintWhenDetailOverflows="true"/>
				<jr:list xmlns:jr="http://jasperreports.sourceforge.net/jasperreports/components" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports/components http://jasperreports.sourceforge.net/xsd/components.xsd" printOrder="Vertical">
					<datasetRun subDataset="dataset3_inventoryGroups">
						<dataSourceExpression><![CDATA[new net.sf.jasperreports.engine.data.JRBeanCollectionDataSource($F{inventoryGroups})]]></dataSourceExpression>
					</datasetRun>
					<jr:listContents height="17" width="335">
						<textField>
							<reportElement style="horizontalBorder" x="0" y="0" width="235" height="17"/>
							<textElement verticalAlignment="Middle">
								<font fontName="Serif"/>
							</textElement>
							<textFieldExpression class="java.lang.String"><![CDATA[$F{name}]]></textFieldExpression>
						</textField>
						<textField pattern="#,##0.00">
							<reportElement style="horizontalBorder" x="235" y="0" width="100" height="17"/>
							<textElement verticalAlignment="Middle">
								<font fontName="Serif"/>
							</textElement>
							<textFieldExpression class="java.math.BigDecimal"><![CDATA[$F{value}]]></textFieldExpression>
						</textField>
					</jr:listContents>
				</jr:list>
			</componentElement>
			<textField>
				<reportElement style="horizontalBorder" x="0" y="165" width="235" height="17"/>
				<textElement verticalAlignment="Middle">
					<font fontName="Serif" size="12" isBold="false"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA["Name"]]></textFieldExpression>
			</textField>
			<textField>
				<reportElement style="horizontalBorder" x="235" y="165" width="100" height="17"/>
				<textElement verticalAlignment="Middle">
					<font fontName="Serif" size="12" isBold="false"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA["Value("+$F{currency}+")"]]></textFieldExpression>
			</textField>
			<textField>
				<reportElement style="horizontalBorder" x="635" y="165" width="100" height="17"/>
				<textElement verticalAlignment="Middle">
					<font fontName="Serif" size="12" isBold="false"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA["Value("+$F{currency}+")"]]></textFieldExpression>
			</textField>
			<textField>
				<reportElement style="horizontalBorder" x="400" y="165" width="235" height="17"/>
				<textElement verticalAlignment="Middle">
					<font fontName="Serif" size="12" isBold="false"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA["Name"]]></textFieldExpression>
			</textField>
			<textField isStretchWithOverflow="true" isBlankWhenNull="true">
				<reportElement style="horizontalBorder" x="0" y="182" width="235" height="17" isPrintWhenDetailOverflows="true"/>
				<textElement verticalAlignment="Middle" markup="none">
					<font fontName="Serif" size="10" isBold="false"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA["Total Value:"]]></textFieldExpression>
			</textField>
			<textField isStretchWithOverflow="true" pattern="#,##0.00" isBlankWhenNull="true">
				<reportElement style="horizontalBorder" x="235" y="182" width="100" height="17" isPrintWhenDetailOverflows="true"/>
				<textElement verticalAlignment="Middle" markup="none">
					<font fontName="Serif" size="10" isBold="false"/>
				</textElement>
				<textFieldExpression class="java.math.BigDecimal"><![CDATA[$F{inventoryItemTotalValue}]]></textFieldExpression>
			</textField>
			<textField isStretchWithOverflow="true" isBlankWhenNull="true">
				<reportElement style="horizontalBorder" x="400" y="182" width="235" height="17" isPrintWhenDetailOverflows="true"/>
				<textElement verticalAlignment="Middle" markup="none">
					<font fontName="Serif" size="10" isBold="false"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA["Total Value:"]]></textFieldExpression>
			</textField>
			<textField isStretchWithOverflow="true" pattern="#,##0.00" isBlankWhenNull="true">
				<reportElement style="horizontalBorder" x="635" y="182" width="100" height="17" isPrintWhenDetailOverflows="true"/>
				<textElement verticalAlignment="Middle" markup="none">
					<font fontName="Serif" size="10" isBold="false"/>
				</textElement>
				<textFieldExpression class="java.math.BigDecimal"><![CDATA[$F{inventoryItemTotalValue}]]></textFieldExpression>
			</textField>
		</band>
	</detail>
	<columnFooter>
		<band splitType="Stretch"/>
	</columnFooter>
	<pageFooter>
		<band height="28" splitType="Stretch">
			<textField>
				<reportElement x="0" y="14" width="50" height="12"/>
				<textElement markup="none">
					<font fontName="Serif" size="8"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA["By: "]]></textFieldExpression>
			</textField>
			<textField>
				<reportElement x="0" y="2" width="50" height="12"/>
				<textElement markup="none">
					<font fontName="Serif" size="8"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA["Generated: "]]></textFieldExpression>
			</textField>
			<textField>
				<reportElement x="50" y="14" width="200" height="12"/>
				<textElement markup="none">
					<font fontName="Serif" size="8"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$P{currentUser}]]></textFieldExpression>
			</textField>
			<textField pattern="dd-MMM-yyyy">
				<reportElement x="50" y="2" width="200" height="12"/>
				<textElement>
					<font fontName="Serif" size="8"/>
				</textElement>
				<textFieldExpression class="java.util.Date"><![CDATA[new java.util.Date()]]></textFieldExpression>
			</textField>
			<textField>
				<reportElement x="662" y="14" width="80" height="12"/>
				<textElement textAlignment="Right">
					<font fontName="Serif" size="8"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA["Page "+$V{PAGE_NUMBER}+" of"]]></textFieldExpression>
			</textField>
			<textField evaluationTime="Report">
				<reportElement x="742" y="14" width="40" height="12"/>
				<textElement>
					<font fontName="Serif" size="8"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[" " + $V{PAGE_NUMBER}]]></textFieldExpression>
			</textField>
		</band>
	</pageFooter>
	<lastPageFooter>
		<band height="28">
			<textField>
				<reportElement x="50" y="14" width="200" height="12"/>
				<textElement markup="none">
					<font fontName="Serif" size="8"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$P{currentUser}]]></textFieldExpression>
			</textField>
			<textField>
				<reportElement x="0" y="2" width="50" height="12"/>
				<textElement markup="none">
					<font fontName="Serif" size="8"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA["Generated: "]]></textFieldExpression>
			</textField>
			<textField>
				<reportElement x="0" y="14" width="50" height="12"/>
				<textElement markup="none">
					<font fontName="Serif" size="8"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA["By: "]]></textFieldExpression>
			</textField>
			<textField pattern="dd-MMM-yyyy">
				<reportElement x="50" y="2" width="200" height="12"/>
				<textElement>
					<font fontName="Serif" size="8"/>
				</textElement>
				<textFieldExpression class="java.util.Date"><![CDATA[new java.util.Date()]]></textFieldExpression>
			</textField>
			<textField evaluationTime="Report">
				<reportElement x="742" y="14" width="40" height="12"/>
				<textElement>
					<font fontName="Serif" size="8"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[" " + $V{PAGE_NUMBER}]]></textFieldExpression>
			</textField>
			<textField>
				<reportElement x="662" y="14" width="80" height="12"/>
				<textElement textAlignment="Right">
					<font fontName="Serif" size="8"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA["Page "+$V{PAGE_NUMBER}+" of"]]></textFieldExpression>
			</textField>
		</band>
	</lastPageFooter>
	<noData>
		<band height="85" splitType="Stretch">
			<textField>
				<reportElement x="0" y="35" width="782" height="50"/>
				<textElement textAlignment="Center" markup="none">
					<font fontName="Serif" size="14" isBold="true"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA["No data to display. \n"+
"Please run report again."]]></textFieldExpression>
			</textField>
			<textField>
				<reportElement key="staticText-1" x="0" y="0" width="782" height="35"/>
				<textElement textAlignment="Center" markup="none">
					<font fontName="Serif" size="20"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$P{reportTitle}]]></textFieldExpression>
			</textField>
		</band>
	</noData>
</jasperReport>
