<!-- 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="10e72461-4ba1-4916-86f3-ba95107ae9d6">
	<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[import com.openkm.db.service.*;
import com.openkm.db.bean.*;
import com.openkm.util.ContextWrapper;
import org.springframework.web.context.WebApplicationContext;

WebApplicationContext cc = (WebApplicationContext) ContextWrapper.getContext();
AuthSrv authSrv = cc.getBean(AuthSrv.class);

List al = new ArrayList();
for (DbUser user : authSrv.findAllUsers(false)) {
  Map usr = new HashMap();
  usr.put("id", user.getId());
  usr.put("name", user.getName());
  usr.put("email", user.getEmail());
  usr.put("roles", user.getRoles().toString());
  al.add(usr);
}

return al;]]></query>
	<field name="name" class="java.lang.String">
		<description><![CDATA[name]]></description>
	</field>
	<field name="email" class="java.lang.String">
		<description><![CDATA[email]]></description>
	</field>
	<field name="id" class="java.lang.String">
		<description><![CDATA[id]]></description>
	</field>
	<background splitType="Stretch"/>
	<title height="44" splitType="Stretch">
		<element kind="image" uuid="0bdf0151-0a4e-4064-b890-9cce7d650456" 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="241b0ad9-b065-437c-b2c9-23022f36c421" key="textField-13" x="0" y="0" width="65" height="10" forecolor="#010101" fontName="Arial" fontSize="8.0" 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="28068920-bb0b-437c-b2d9-24b2e13bf8a3" key="textField-14" x="0" y="10" width="65" height="10" forecolor="#010101" fontName="Arial" fontSize="8.0" 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="f81855a1-65b8-45d4-8fc0-aa76153ace4f" key="line-3" x="-15" y="42" width="562" height="1" forecolor="#010101"/>
		<element kind="staticText" uuid="34b21096-6b28-44c3-91e0-a51d66dc8237" x="77" y="0" width="297" height="44" fontName="SansSerif" fontSize="22.0" bold="true" pdfEmbedded="false" hTextAlign="Center" vTextAlign="Middle">
			<text><![CDATA[Registered Users]]></text>
		</element>
	</title>
	<pageHeader splitType="Stretch"/>
	<columnHeader height="30" splitType="Stretch">
		<element kind="line" uuid="ebf1a163-1a3f-4d7f-9ac2-2051327cbb1e" key="line-4" x="0" y="28" width="140" height="1" forecolor="#010101"/>
		<element kind="line" uuid="315630bb-4699-4a28-9cb1-c7607be35d28" key="line-5" x="145" y="28" width="390" height="1" forecolor="#010101"/>
		<element kind="staticText" uuid="9d55dc7e-a6bd-4c95-aaf8-39bc2bf6e71e" x="0" y="12" width="127" height="14" fontName="SansSerif" bold="true" pdfEmbedded="false">
			<text><![CDATA[Id]]></text>
		</element>
		<element kind="staticText" uuid="adf98f51-c329-42e1-9650-dcac4e413ce8" x="155" y="12" width="100" height="14" fontName="SansSerif" bold="true" pdfEmbedded="false">
			<text><![CDATA[Name]]></text>
		</element>
		<element kind="staticText" uuid="7d235a9b-ce65-4c28-be1c-02f55c26b7ef" x="330" y="11" width="100" height="14" fontName="SansSerif" bold="true" pdfEmbedded="false">
			<text><![CDATA[Mail]]></text>
		</element>
	</columnHeader>
	<detail>
		<band height="18" splitType="Stretch">
			<element kind="textField" uuid="de265605-08d3-40f3-ab90-a1c4597cc3c0" key="textField" x="329" y="0" width="206" height="18" fontName="Arial" blankWhenNull="false">
				<expression><![CDATA[$F{email}]]></expression>
			</element>
			<element kind="textField" uuid="2a4870e2-b6b3-4a1e-9231-a62c592cdb2e" key="textField" x="0" y="0" width="127" height="18" fontName="Arial" blankWhenNull="false">
				<expression><![CDATA[$F{id}]]></expression>
			</element>
			<element kind="textField" uuid="cd8c52a2-cd52-411c-b46d-9d3836412173" key="textField" x="155" y="0" width="162" height="18" fontName="Arial" blankWhenNull="false">
				<expression><![CDATA[$F{name}]]></expression>
			</element>
		</band>
	</detail>
	<columnFooter splitType="Stretch"/>
	<pageFooter height="30" splitType="Stretch">
		<element kind="line" uuid="3507dc39-87c7-4b59-8c99-e03055f8b51d" key="line-2" x="-15" y="4" width="567" height="1" forecolor="#010101" backcolor="#FFFFFF"/>
	</pageFooter>
	<summary splitType="Stretch"/>
</jasperReport>
