<!-- Created with Jaspersoft Studio version 7.0.3.final using JasperReports Library version 7.0.3-41034ca841d452f3305ba55b9042260aaa1ab5dd  -->
<jasperReport name="Registered Users" language="java" pageWidth="595" pageHeight="842" whenNoDataType="AllSectionsNoDetail" columnWidth="535" leftMargin="30" rightMargin="30" topMargin="20" bottomMargin="20" whenResourceMissingType="Key" uuid="3369b706-b522-412b-abed-84ca104df3a0">
	<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>net.sf.jasperreports.engine.*</import>
	<import>java.util.*</import>
	<import>net.sf.jasperreports.engine.data.*</import>
	<query language="sql"><![CDATA[SELECT t.TNT_NAME AS TNT_NAME, nb.NBS_AUTHOR AS UI_USER, SUM(COALESCE(nv.NV_SIZE, 0)) / 1048576 AS UI_SIZE FROM okm_node_base nb JOIN okm_node_version nv ON nv.NV_PARENT = nb.NBS_UUID JOIN okm_tenant t ON nb.NBS_TENANT = t.TNT_ID WHERE nb.NBS_AUTHOR IS NOT NULL GROUP BY t.TNT_NAME, nb.NBS_AUTHOR ORDER BY UI_SIZE DESC;
	]]></query>
	<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" resetType="Group" calculation="Sum" resetGroup="Tenant" class="java.math.BigDecimal">
		<expression><![CDATA[$F{UI_SIZE}]]></expression>
	</variable>
	<group name="Tenant">
		<expression><![CDATA[$F{TNT_NAME}]]></expression>
		<groupHeader>
			<band height="56">
				<element kind="rectangle" uuid="ac5256cd-d963-4168-871f-9abfde0f7ff1" x="156" y="4" width="191" height="20" backcolor="#A4D4F5" radius="10"/>
				<element kind="staticText" uuid="0d82d560-0b0e-4b1b-9956-d0fc1cfa63e7" x="217" y="36" width="100" height="14" fontName="Arial" pdfFontName="unicode.ttf" pdfEncoding="Identity-H" bold="true" pdfEmbedded="false">
					<text><![CDATA[Size]]></text>
				</element>
				<element kind="line" uuid="855db4cb-f28e-4a43-a255-ba2be7f0d5bf" key="line-5" x="22" y="52" width="390" height="1" forecolor="#010101"/>
				<element kind="staticText" uuid="e0e2f934-5cc2-40ee-842e-445fadd57439" x="164" y="9" width="48" height="14" fontName="Arial" pdfFontName="unicode.ttf" pdfEncoding="Identity-H" bold="true" pdfEmbedded="false">
					<text><![CDATA[Tenant:]]></text>
				</element>
				<element kind="textField" uuid="96d60698-9f43-451c-9c5f-a22b4e476fdc" key="textField" x="212" y="9" width="125" height="14" fontName="Arial" pdfFontName="unicode.ttf" pdfEncoding="Identity-H" blankWhenNull="false">
					<expression><![CDATA[$F{TNT_NAME}]]></expression>
				</element>
				<element kind="staticText" uuid="f0da4893-14ce-45a1-b4e5-e3186e6f6339" x="24" y="36" width="112" height="14" fontName="Arial" pdfFontName="unicode.ttf" pdfEncoding="Identity-H" bold="true" pdfEmbedded="false">
					<text><![CDATA[User]]></text>
				</element>
			</band>
		</groupHeader>
		<groupFooter>
			<band height="32">
				<element kind="staticText" uuid="98892a16-889f-4ac0-b87f-b76d93d47ad8" x="169" y="12" width="38" height="14" fontName="Arial" pdfFontName="unicode.ttf" pdfEncoding="Identity-H" bold="true" pdfEmbedded="false">
					<text><![CDATA[Total:]]></text>
				</element>
				<element kind="textField" uuid="e73df1f7-2a2b-4e20-8896-d4ab01c5b7d1" key="textField" x="212" y="12" width="105" height="14" fontName="Arial" pdfFontName="unicode.ttf" pdfEncoding="Identity-H" pattern="0.000 GB" blankWhenNull="false" bold="true">
					<expression><![CDATA[$V{TenantSize}.divide(new java.math.BigDecimal(1024))]]></expression>
				</element>
			</band>
		</groupFooter>
	</group>
	<background splitType="Stretch"/>
	<title height="44" splitType="Stretch">
		<element kind="image" uuid="a51e7700-7c81-44ec-8713-5fdc053557c4" key="image-1" x="374" y="0" width="150" height="35">
			<expression><![CDATA["http://localhost:8080/openkm/logo/report"]]></expression>
		</element>
		<element kind="textField" uuid="5f9ddd40-713c-448f-8096-c31e88f0cdc3" key="textField-13" x="0" y="0" width="65" height="10" forecolor="#010101" fontName="Arial" fontSize="8.0" pdfFontName="unicode.ttf" pdfEncoding="Identity-H" pattern="yyyy/MM/dd" blankWhenNull="false" underline="false" bold="true" vTextAlign="Middle">
			<expression><![CDATA[new Date()]]></expression>
			<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>
		</element>
		<element kind="textField" uuid="500961b0-b909-4f30-b4f9-f75c1dadee64" key="textField-14" x="0" y="10" width="65" height="10" forecolor="#010101" fontName="Arial" fontSize="8.0" pdfFontName="unicode.ttf" pdfEncoding="Identity-H" pattern="h.mm.ss a" blankWhenNull="false" underline="false" bold="true" vTextAlign="Middle">
			<expression><![CDATA[new Date()]]></expression>
			<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>
		</element>
		<element kind="line" uuid="53aba71c-5508-4eab-8832-0429224182e6" key="line-3" x="-15" y="42" width="562" height="1" forecolor="#010101"/>
		<element kind="staticText" uuid="18813173-537e-4a04-8deb-f659bf1e523e" x="77" y="0" width="297" height="44" fontName="Arial" fontSize="22.0" pdfFontName="unicode.ttf" pdfEncoding="Identity-H" bold="true" pdfEmbedded="false" hTextAlign="Center" vTextAlign="Middle">
			<text><![CDATA[Tenant User Quota]]></text>
		</element>
	</title>
	<pageHeader splitType="Stretch"/>
	<columnHeader height="7" splitType="Stretch"/>
	<detail>
		<band height="18" splitType="Stretch">
			<element kind="textField" uuid="9bab0bf0-081d-40bd-bbd1-5284312fceea" key="textField" x="217" y="0" width="100" height="18" fontName="Arial" pdfFontName="unicode.ttf" pdfEncoding="Identity-H" pattern="0.00 MB" blankWhenNull="false">
				<expression><![CDATA[$F{UI_SIZE}]]></expression>
			</element>
			<element kind="textField" uuid="73412edf-6e8c-40b7-8337-d448b7bd17e8" key="textField" x="24" y="0" width="112" height="18" fontName="Arial" pdfFontName="unicode.ttf" pdfEncoding="Identity-H" blankWhenNull="false">
				<expression><![CDATA[$F{UI_USER}]]></expression>
			</element>
		</band>
	</detail>
	<columnFooter splitType="Stretch"/>
	<pageFooter height="18" splitType="Stretch">
		<element kind="line" uuid="76084458-008a-43d4-b63d-35dc52fc8328" key="line-2" x="-15" y="4" width="567" height="1" forecolor="#010101" backcolor="#FFFFFF"/>
	</pageFooter>
	<summary splitType="Stretch"/>
</jasperReport>
