<?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="Registered Users" pageWidth="595" pageHeight="842" whenNoDataType="AllSectionsNoDetail" columnWidth="535" leftMargin="30" rightMargin="30" topMargin="20" bottomMargin="20" whenResourceMissingType="Key">
	<property name="ireport.scriptlethandling" value="0"/>
	<property name="ireport.encoding" value="UTF-8"/>
	<property name="ireport.zoom" value="1.5"/>
	<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.*"/>
	<queryString>
		<![CDATA[select TNT_NAME, UI_USER, UI_SIZE/1048576 as UI_SIZE from OKM_TENANT, OKM_ENTITY_TENANT, OKM_USER_ITEMS where ETN_TENANT=TNT_ID and ETN_ENTITY=UI_USER and ETN_TYPE='user']]>
	</queryString>
	<field name="TNT_NAME" class="java.lang.String"/>
	<field name="UI_USER" class="java.lang.String"/>
	<field name="UI_SIZE" class="java.math.BigDecimal"/>
	<variable name="TenantSize" class="java.math.BigDecimal" resetType="Group" resetGroup="Tenant" calculation="Sum">
		<variableExpression><![CDATA[$F{UI_SIZE}]]></variableExpression>
	</variable>
	<group name="Tenant">
		<groupExpression><![CDATA[$F{TNT_NAME}]]></groupExpression>
		<groupHeader>
			<band height="56">
				<rectangle radius="10">
					<reportElement x="156" y="4" width="191" height="20" backcolor="#A4D4F5"/>
				</rectangle>
				<staticText>
					<reportElement x="217" y="36" width="100" height="14"/>
					<textElement>
						<font fontName="Arial" pdfFontName="unicode.ttf" pdfEncoding="Identity-H" isBold="true" isPdfEmbedded="false"/>
					</textElement>
					<text><![CDATA[Size]]></text>
				</staticText>
				<line>
					<reportElement key="line-5" x="22" y="52" width="390" height="1" forecolor="#010101"/>
				</line>
				<staticText>
					<reportElement x="164" y="9" width="48" height="14"/>
					<textElement>
						<font fontName="Arial" pdfFontName="unicode.ttf" pdfEncoding="Identity-H" isBold="true" isPdfEmbedded="false"/>
					</textElement>
					<text><![CDATA[Tenant:]]></text>
				</staticText>
				<textField isBlankWhenNull="false">
					<reportElement key="textField" x="212" y="9" width="125" height="14"/>
					<textElement>
						<font fontName="Arial" pdfFontName="unicode.ttf" pdfEncoding="Identity-H"/>
					</textElement>
					<textFieldExpression class="java.lang.String"><![CDATA[$F{TNT_NAME}]]></textFieldExpression>
				</textField>
				<staticText>
					<reportElement x="24" y="36" width="112" height="14"/>
					<textElement>
						<font fontName="Arial" pdfFontName="unicode.ttf" pdfEncoding="Identity-H" isBold="true" isPdfEmbedded="false"/>
					</textElement>
					<text><![CDATA[User]]></text>
				</staticText>
			</band>
		</groupHeader>
		<groupFooter>
			<band height="32">
				<staticText>
					<reportElement x="169" y="12" width="38" height="14"/>
					<textElement>
						<font fontName="Arial" pdfFontName="unicode.ttf" pdfEncoding="Identity-H" isBold="true" isPdfEmbedded="false"/>
					</textElement>
					<text><![CDATA[Total:]]></text>
				</staticText>
				<textField pattern="0.000 GB" isBlankWhenNull="false">
					<reportElement key="textField" x="212" y="12" width="105" height="14"/>
					<textElement>
						<font fontName="Arial" pdfFontName="unicode.ttf" pdfEncoding="Identity-H" isBold="true"/>
					</textElement>
					<textFieldExpression class="java.math.BigDecimal"><![CDATA[$V{TenantSize}.divide(new java.math.BigDecimal(1024))]]></textFieldExpression>
				</textField>
			</band>
		</groupFooter>
	</group>
	<background>
		<band splitType="Stretch"/>
	</background>
	<title>
		<band height="44" splitType="Stretch">
			<image>
				<reportElement key="image-1" x="374" y="0" width="150" height="35"/>
				<imageExpression class="java.lang.String"><![CDATA["http://localhost:8080/openkm/logo/report"]]></imageExpression>
			</image>
			<textField pattern="yyyy/MM/dd" isBlankWhenNull="false">
				<reportElement key="textField-13" x="0" y="0" width="65" height="10" forecolor="#010101"/>
				<box>
					<topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
					<leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
					<bottomPen lineWidth="0.0" lineColor="#000000"/>
					<rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
				</box>
				<textElement verticalAlignment="Middle">
					<font fontName="Arial" pdfFontName="unicode.ttf" pdfEncoding="Identity-H" size="8" isBold="true" isUnderline="false"/>
				</textElement>
				<textFieldExpression class="java.util.Date"><![CDATA[new Date()]]></textFieldExpression>
			</textField>
			<textField pattern="h.mm.ss a" isBlankWhenNull="false">
				<reportElement key="textField-14" x="0" y="10" width="65" height="10" forecolor="#010101"/>
				<box>
					<topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
					<leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
					<bottomPen lineWidth="0.0" lineColor="#000000"/>
					<rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
				</box>
				<textElement verticalAlignment="Middle">
					<font fontName="Arial" pdfFontName="unicode.ttf" pdfEncoding="Identity-H" size="8" isBold="true" isUnderline="false"/>
				</textElement>
				<textFieldExpression class="java.util.Date"><![CDATA[new Date()]]></textFieldExpression>
			</textField>
			<line>
				<reportElement key="line-3" x="-15" y="42" width="562" height="1" forecolor="#010101"/>
				<graphicElement fill="Solid"/>
			</line>
			<staticText>
				<reportElement x="77" y="0" width="297" height="44"/>
				<textElement textAlignment="Center" verticalAlignment="Middle">
					<font fontName="Arial" pdfFontName="unicode.ttf" pdfEncoding="Identity-H" size="22" isBold="true" isPdfEmbedded="false"/>
				</textElement>
				<text><![CDATA[Tenant User Quota]]></text>
			</staticText>
		</band>
	</title>
	<pageHeader>
		<band splitType="Stretch"/>
	</pageHeader>
	<columnHeader>
		<band height="7" splitType="Stretch"/>
	</columnHeader>
	<detail>
		<band height="18" splitType="Stretch">
			<textField pattern="0.00 MB" isBlankWhenNull="false">
				<reportElement key="textField" x="217" y="0" width="100" height="18"/>
				<textElement>
					<font fontName="Arial" pdfFontName="unicode.ttf" pdfEncoding="Identity-H"/>
				</textElement>
				<textFieldExpression class="java.math.BigDecimal"><![CDATA[$F{UI_SIZE}]]></textFieldExpression>
			</textField>
			<textField isBlankWhenNull="false">
				<reportElement key="textField" x="24" y="0" width="112" height="18"/>
				<textElement>
					<font fontName="Arial" pdfFontName="unicode.ttf" pdfEncoding="Identity-H"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{UI_USER}]]></textFieldExpression>
			</textField>
		</band>
	</detail>
	<columnFooter>
		<band splitType="Stretch"/>
	</columnFooter>
	<pageFooter>
		<band height="18" splitType="Stretch">
			<line>
				<reportElement key="line-2" x="-15" y="4" width="567" height="1" forecolor="#010101" backcolor="#FFFFFF"/>
				<graphicElement fill="Solid"/>
			</line>
		</band>
	</pageFooter>
	<summary>
		<band splitType="Stretch"/>
	</summary>
</jasperReport>
