<jasperReport name="HibernateQueryReport" language="java" pageWidth="595" pageHeight="842" whenNoDataType="AllSectionsNoDetail" columnWidth="515" leftMargin="40" rightMargin="40" topMargin="50" bottomMargin="50" uuid="b6fa8934-e8ea-49e9-9afa-c819a25021d0">
	<property name="com.jaspersoft.studio.data.defaultdataadapter" value="hibernate/data/HibernateDataAdapter.jrdax"/>
	<import>net.sf.jasperreports.engine.data.JRBeanCollectionDataSource</import>
	<style name="Sans_Normal" default="true" fontName="DejaVu Sans" fontSize="12.0"/>
	<style name="Sans_Bold" fontName="DejaVu Sans" fontSize="12.0" bold="true"/>
	<style name="Sans_Italic" fontName="DejaVu Sans" fontSize="12.0" italic="true"/>
	<parameter name="ReportTitle" class="java.lang.String">
		<defaultValueExpression><![CDATA["Address Report"]]></defaultValueExpression>
	</parameter>
	<parameter name="CityFilter" class="java.util.List">
		<defaultValueExpression><![CDATA[Arrays.asList("Boston","Chicago","Oslo")]]></defaultValueExpression>
	</parameter>
	<parameter name="OrderClause" class="java.lang.String">
		<defaultValueExpression><![CDATA["city"]]></defaultValueExpression>
	</parameter>
	<query language="hql"><![CDATA[from Address address where city not in ($P{CityFilter}) order by $P!{OrderClause}]]></query>
	<field name="id" class="java.lang.Long"/>
	<field name="firstName" class="java.lang.String"/>
	<field name="lastName" class="java.lang.String"/>
	<field name="street" class="java.lang.String"/>
	<field name="city" class="java.lang.String"/>
	<field name="documents" class="java.util.Set"/>
	<variable name="CityNumber" resetType="Group" calculation="System" resetGroup="CityGroup" class="java.lang.Integer">
		<initialValueExpression><![CDATA[$V{CityNumber} == null ? 1 : ($V{CityNumber} + 1)]]></initialValueExpression>
	</variable>
	<group name="CityGroup" minHeightToStartNewPage="100">
		<expression><![CDATA[$F{city}]]></expression>
		<groupHeader>
			<band height="20">
				<element kind="rectangle" uuid="a1032bea-79de-4531-b0be-6918f90672f3" x="0" y="4" width="515" height="15" forecolor="#C0C0C0" backcolor="#C0C0C0"/>
				<element kind="textField" uuid="79001ed6-bca9-4bb4-80f3-346eb11cac59" mode="Opaque" x="0" y="4" width="515" height="15" backcolor="#C0C0C0" hTextAlign="Left" style="Sans_Bold">
					<expression><![CDATA["  " + String.valueOf($V{CityNumber}) + ". " + String.valueOf($F{city})]]></expression>
				</element>
				<element kind="line" uuid="af7d8e0a-9521-4d09-91a8-cf602eeef9b5" x="0" y="19" width="515" height="1"/>
			</band>
		</groupHeader>
	</group>
	<title height="50">
		<element kind="line" uuid="b6c5c6aa-aea8-4d6e-bfe7-6b39d30d2a96" x="0" y="0" width="515" height="1" forecolor="#000000"/>
		<element kind="textField" uuid="7d18d071-cddb-431d-972e-0fea37d52b7a" x="0" y="10" width="515" height="30" fontSize="22.0" blankWhenNull="true" hTextAlign="Center" style="Sans_Normal">
			<paragraph lineSpacing="Single" style="Sans_Normal"/>
			<expression><![CDATA[$P{ReportTitle}]]></expression>
		</element>
	</title>
	<pageHeader height="20">
		<element kind="frame" uuid="bf08dcba-7a5b-4e75-8419-77a72254f252" mode="Opaque" x="0" y="5" width="515" height="15" backcolor="#333333">
			<element kind="staticText" uuid="5cb958c6-33fc-41f6-bd94-b95512ec8bde" x="0" y="0" width="50" height="15" forecolor="#FFFFFF" hTextAlign="Right" style="Sans_Bold">
				<text><![CDATA[ID]]></text>
			</element>
			<element kind="staticText" uuid="27933181-7b7b-4ae1-a14b-1fca6bc8fbad" x="55" y="0" width="205" height="15" forecolor="#FFFFFF" style="Sans_Bold">
				<text><![CDATA[Name]]></text>
			</element>
			<element kind="staticText" uuid="fc7d0557-7a35-4db1-912e-b6de887f0bc6" x="260" y="0" width="155" height="15" forecolor="#FFFFFF" style="Sans_Bold">
				<text><![CDATA[Street]]></text>
			</element>
		</element>
	</pageHeader>
	<detail>
		<band height="41">
			<element kind="textField" uuid="598e223f-5690-47a6-97ba-15e6de7543d6" x="0" y="4" width="50" height="15" hTextAlign="Right">
				<expression><![CDATA[$F{id}]]></expression>
			</element>
			<element kind="textField" uuid="32967f2a-d027-45cc-a56e-45d56bf018f9" positionType="Float" x="55" y="4" width="200" height="15" textAdjust="StretchHeight">
				<expression><![CDATA[$F{firstName} + " " + $F{lastName}]]></expression>
			</element>
			<element kind="textField" uuid="0f9b2ed5-c93b-46f4-bccd-5887dc3ff6aa" positionType="Float" x="260" y="4" width="155" height="15" textAdjust="StretchHeight">
				<expression><![CDATA[$F{street}]]></expression>
			</element>
			<element kind="subreport" uuid="6fe34132-df3c-4302-8c28-d2f5536bcead" x="65" y="21" width="50" height="20" removeLineWhenBlank="true">
				<dataSourceExpression><![CDATA[new JRBeanCollectionDataSource($F{documents})]]></dataSourceExpression>
				<expression><![CDATA["DocumentsReport.jasper"]]></expression>
			</element>
		</band>
	</detail>
	<pageFooter height="40">
		<printWhenExpression><![CDATA[!$P{IS_IGNORE_PAGINATION}]]></printWhenExpression>
		<element kind="line" uuid="9ff4c76c-1adc-43d4-9988-436f0ca4329b" x="0" y="10" width="515" height="1"/>
		<element kind="textField" uuid="a1219ed2-8d70-41f3-a7fd-13689c2b26d5" x="200" y="20" width="80" height="15" hTextAlign="Right">
			<expression><![CDATA["Page " + String.valueOf($V{PAGE_NUMBER}) + " of"]]></expression>
		</element>
		<element kind="textField" uuid="9047573e-61fe-4980-8a5b-1af47a63d309" x="280" y="20" width="75" height="15" evaluationTime="Report" hTextAlign="Left">
			<expression><![CDATA[" " + String.valueOf($V{PAGE_NUMBER})]]></expression>
		</element>
	</pageFooter>
	<summary height="60">
		<element kind="textField" uuid="c57ceeda-9111-4442-8e24-ee8cb798051f" x="175" y="20" width="165" height="15" textAdjust="StretchHeight" hTextAlign="Center" style="Sans_Italic">
			<expression><![CDATA["There were " +
					String.valueOf($V{REPORT_COUNT}) +
					" address records on this report."]]></expression>
		</element>
	</summary>
</jasperReport>
