<jasperReport name="BarChartReport" language="java" columnCount="2" pageWidth="595" pageHeight="842" columnWidth="270" columnSpacing="15" leftMargin="20" rightMargin="20" topMargin="30" bottomMargin="30" uuid="c1a45e09-476e-4a66-b581-cf2277f40a24">
	<property name="com.jaspersoft.studio.data.defaultdataadapter" value="Sample DB"/>
	<property name="net.sf.jasperreports.chart.render.type" value="svg"/>
	<property name="net.sf.jasperreports.image.dpi" value="150"/>
	<style name="Sans_Normal" default="true" fontName="DejaVu Sans" fontSize="8.0" bold="false" italic="false" underline="false" strikeThrough="false"/>
	<style name="Sans_Bold" fontName="DejaVu Sans" fontSize="8.0" bold="true" italic="false" underline="false" strikeThrough="false"/>
	<style name="Sans_Italic" fontName="DejaVu Sans" fontSize="8.0" bold="false" italic="true" underline="false" strikeThrough="false"/>
	<style name="Serif_Normal" fontName="DejaVu Serif" fontSize="10.0" bold="false" italic="false" underline="false" strikeThrough="false"/>
	<style name="Serif_Bold" fontName="DejaVu Serif" fontSize="10.0" bold="true" italic="false" underline="false" strikeThrough="false"/>
	<parameter name="ReportTitle" class="java.lang.String">
		<defaultValueExpression><![CDATA["Bar Chart Report"]]></defaultValueExpression>
	</parameter>
	<parameter name="MaxOrderID" class="java.lang.Integer">
		<defaultValueExpression><![CDATA[12500]]></defaultValueExpression>
	</parameter>
	<query language="sql"><![CDATA[SELECT * FROM Orders WHERE OrderID <= $P{MaxOrderID} ORDER BY ShipCountry]]></query>
	<field name="ShippedDate" class="java.sql.Timestamp"/>
	<field name="ShipCountry" class="java.lang.String"/>
	<field name="RequiredDate" class="java.sql.Timestamp"/>
	<field name="CustomerID" class="java.lang.String"/>
	<field name="OrderID" class="java.lang.Integer"/>
	<field name="ShipName" class="java.lang.String"/>
	<field name="ShipVia" class="java.lang.Integer"/>
	<field name="ShipPostalCode" class="java.lang.String"/>
	<field name="OrderDate" class="java.sql.Timestamp"/>
	<field name="ShipCity" class="java.lang.String"/>
	<field name="ShipAddress" class="java.lang.String"/>
	<field name="EmployeeID" class="java.lang.Integer"/>
	<field name="ShipRegion" class="java.lang.String"/>
	<field name="Freight" class="java.lang.Double"/>
	<variable name="FirstLetter" resetType="None" class="java.lang.String">
		<expression><![CDATA[$F{ShipCountry}.substring(0, 1).toUpperCase()]]></expression>
	</variable>
	<variable name="FirstLetterCount" resetType="Group" incrementType="Group" calculation="Count" resetGroup="ChartGroup" incrementGroup="FirstLetterGroup" class="java.lang.Integer">
		<expression><![CDATA[Boolean.TRUE]]></expression>
	</variable>
	<variable name="FirstLetterMin" resetType="Group" calculation="Lowest" resetGroup="ChartGroup" class="java.lang.String">
		<expression><![CDATA[$V{FirstLetter}]]></expression>
	</variable>
	<variable name="FirstLetterMax" resetType="Group" calculation="Highest" resetGroup="ChartGroup" class="java.lang.String">
		<expression><![CDATA[$V{FirstLetter}]]></expression>
	</variable>
	<variable name="FreightSumChartGroup" resetType="Group" calculation="Sum" resetGroup="ChartGroup" class="java.lang.Double">
		<expression><![CDATA[$F{Freight}]]></expression>
	</variable>
	<variable name="FreightSumCountryGroup" resetType="Group" calculation="Sum" resetGroup="CountryGroup" class="java.lang.Double">
		<expression><![CDATA[$F{Freight}]]></expression>
	</variable>
	<variable name="FreightSumColumn" resetType="Column" calculation="Sum" class="java.lang.Double">
		<expression><![CDATA[$F{Freight}]]></expression>
	</variable>
	<variable name="FreightSumPage" resetType="Page" calculation="Sum" class="java.lang.Double">
		<expression><![CDATA[$F{Freight}]]></expression>
	</variable>
	<variable name="FreightSumReport" calculation="Sum" class="java.lang.Double">
		<expression><![CDATA[$F{Freight}]]></expression>
	</variable>
	<variable name="DateHighestCountryGroup" resetType="Group" calculation="Highest" resetGroup="CountryGroup" class="java.sql.Timestamp">
		<expression><![CDATA[$F{OrderDate}]]></expression>
	</variable>
	<variable name="RegionCountCountryGroup" resetType="Group" calculation="Count" resetGroup="CountryGroup" class="java.lang.Integer">
		<expression><![CDATA[$F{ShipRegion}]]></expression>
	</variable>
	<group name="ChartGroup" minHeightToStartNewPage="200" startNewColumn="true">
		<expression><![CDATA[($V{FirstLetterCount} - 1) / 3]]></expression>
		<groupHeader>
			<band height="250">
				<element kind="rectangle" uuid="5d667f9e-57db-4b41-b7dc-e20c80540b8d" x="0" y="14" width="270" height="11" forecolor="#FFDDDD" backcolor="#FFDDDD"/>
				<element kind="staticText" uuid="211c4477-596e-4753-8b41-fd2489e11936" mode="Opaque" x="0" y="14" width="130" height="11" forecolor="#FF0000" backcolor="#FFDDDD" underline="true" style="Sans_Italic">
					<text><![CDATA[Countries Starting With Letter :]]></text>
				</element>
				<element kind="textField" uuid="fa8b5f75-a1ca-4ecc-bfa7-661d81056c67" mode="Opaque" x="130" y="14" width="20" height="11" forecolor="#FF0000" backcolor="#FFDDDD" evaluationTime="Group" evaluationGroup="ChartGroup" hTextAlign="Right" style="Sans_Bold">
					<expression><![CDATA[$V{FirstLetterMin}]]></expression>
				</element>
				<element kind="staticText" uuid="e678016b-dc56-4286-aef1-58028a2e0b6b" mode="Opaque" x="150" y="14" width="20" height="11" forecolor="#FF0000" backcolor="#FFDDDD" underline="true" hTextAlign="Center" style="Sans_Italic">
					<text><![CDATA[to]]></text>
				</element>
				<element kind="textField" uuid="f64fae59-8f1e-429e-995a-6359a920c091" mode="Opaque" x="170" y="14" width="20" height="11" forecolor="#FF0000" backcolor="#FFDDDD" evaluationTime="Group" evaluationGroup="ChartGroup" style="Sans_Bold">
					<expression><![CDATA[$V{FirstLetterMax}]]></expression>
				</element>
				<element kind="chart" chartType="bar" uuid="a220a3ef-6bb2-4a4d-8bd3-5bda467cc036" positionType="Float" x="0" y="50" width="270" height="175" evaluationTime="Group" customizerClass="net.sf.jasperreports.samples.charts.BarChartCustomizer" evaluationGroup="ChartGroup">
					<dataset kind="category" incrementType="Group" resetGroup="ChartGroup" incrementGroup="CountryGroup" resetType="Group">
						<series>
							<seriesExpression><![CDATA["Double Freight"]]></seriesExpression>
							<categoryExpression><![CDATA[$F{ShipCountry}]]></categoryExpression>
							<valueExpression><![CDATA[$V{FreightSumCountryGroup} * 2d]]></valueExpression>
							<labelExpression><![CDATA[]]></labelExpression>
						</series>
						<series>
							<seriesExpression><![CDATA["Normal Freight"]]></seriesExpression>
							<categoryExpression><![CDATA[$F{ShipCountry}]]></categoryExpression>
							<valueExpression><![CDATA[$V{FreightSumCountryGroup}]]></valueExpression>
						</series>
						<series>
							<seriesExpression><![CDATA["Half Freight"]]></seriesExpression>
							<categoryExpression><![CDATA[$F{ShipCountry}]]></categoryExpression>
							<valueExpression><![CDATA[$V{FreightSumCountryGroup} / 2d]]></valueExpression>
						</series>
					</dataset>
					<plot showTickMarks="true" showTickLabels="true">
						<itemLabel color="#000000" backgroundColor="#FFFFFF"/>
					</plot>
				</element>
			</band>
		</groupHeader>
		<groupFooter>
			<band height="25">
				<element kind="line" uuid="07849db7-e17c-4358-94d6-c3255002b11d" x="0" y="0" width="270" height="1" forecolor="#FF0000"/>
				<element kind="staticText" uuid="b5a21c0f-2bcf-424e-8cf4-204a33b6310a" x="0" y="1" width="45" height="11" forecolor="#FF0000" hTextAlign="Right" style="Sans_Bold">
					<text><![CDATA[Count :]]></text>
				</element>
				<element kind="textField" uuid="3f0d0c1e-dec6-40aa-b6f3-1bce7ac6e6e9" x="45" y="1" width="25" height="11" forecolor="#FF0000" hTextAlign="Right" style="Sans_Bold">
					<expression><![CDATA[$V{ChartGroup_COUNT}]]></expression>
				</element>
				<element kind="staticText" uuid="e9988008-1771-4e92-a1c8-66465725b288" x="70" y="1" width="140" height="11" forecolor="#FF0000" hTextAlign="Right" style="Sans_Bold">
					<text><![CDATA[Total :]]></text>
				</element>
				<element kind="textField" uuid="ea5b1caf-d5f5-42ad-adf9-1f27a6ada3fa" x="210" y="1" width="60" height="11" forecolor="#FF0000" pattern="0.00" hTextAlign="Right" style="Sans_Bold">
					<expression><![CDATA[$V{FreightSumChartGroup}]]></expression>
				</element>
			</band>
		</groupFooter>
	</group>
	<group name="FirstLetterGroup">
		<expression><![CDATA[$V{FirstLetter}]]></expression>
	</group>
	<group name="CountryGroup">
		<expression><![CDATA[$F{ShipCountry}]]></expression>
		<groupHeader>
			<band height="15">
				<element kind="line" uuid="87cdf58f-bc3b-4035-83db-f2ede058c4c4" x="0" y="14" width="270" height="1"/>
				<element kind="textField" uuid="94941e6f-ae36-44e2-ae44-761a43fde446" x="10" y="2" width="150" height="11" style="Sans_Bold">
					<expression><![CDATA[$F{ShipCountry}]]></expression>
				</element>
				<element kind="textField" uuid="bda9737a-cd79-4d0d-baa8-42859d144563" x="170" y="2" width="100" height="11" evaluationTime="Group" pattern="EEE, MMM d, yyyy" evaluationGroup="CountryGroup" hTextAlign="Right" style="Sans_Bold">
					<expression><![CDATA[$V{DateHighestCountryGroup}]]></expression>
				</element>
			</band>
		</groupHeader>
		<groupFooter>
			<band height="15">
				<element kind="rectangle" uuid="9c427e20-9903-475c-9179-ed6fb233e038" x="0" y="0" width="270" height="11" forecolor="#C0C0C0" backcolor="#C0C0C0"/>
				<element kind="staticText" uuid="a95f6805-e801-48b5-b70e-541f03dd6c3e" mode="Opaque" x="0" y="0" width="45" height="11" backcolor="#C0C0C0" hTextAlign="Right" style="Sans_Bold">
					<text><![CDATA[Count :]]></text>
				</element>
				<element kind="textField" uuid="a7af9720-11f1-4288-a2a2-56f9df6baa9e" mode="Opaque" x="45" y="0" width="25" height="11" backcolor="#C0C0C0" hTextAlign="Right" style="Sans_Bold">
					<expression><![CDATA[$V{CountryGroup_COUNT}]]></expression>
				</element>
				<element kind="staticText" uuid="94a5fd1d-b2eb-4619-a4ed-35d23b1ec4f4" mode="Opaque" x="70" y="0" width="140" height="11" backcolor="#C0C0C0" hTextAlign="Right" style="Sans_Bold">
					<text><![CDATA[Total :]]></text>
				</element>
				<element kind="textField" uuid="6db23a10-65cb-42a9-b0e9-8aa5f098f48e" mode="Opaque" x="210" y="0" width="60" height="11" backcolor="#C0C0C0" pattern="0.00" hTextAlign="Right" style="Sans_Bold">
					<expression><![CDATA[$V{FreightSumCountryGroup}]]></expression>
				</element>
			</band>
		</groupFooter>
	</group>
	<title height="50">
		<element kind="elementGroup"/>
		<element kind="staticText" uuid="bec40f72-5a2e-4643-9986-757949881a62" x="0" y="0" width="555" height="35" fontSize="22.0" hTextAlign="Center" style="Serif_Bold">
			<text><![CDATA[Bar Chart Report]]></text>
			<box style="Serif_Bold">
				<topPen lineWidth="0.5"/>
			</box>
		</element>
	</title>
	<columnHeader height="11">
		<element kind="rectangle" uuid="86f6cac0-1787-4f3a-9206-70906f573c1b" x="0" y="0" width="270" height="11" backcolor="#333333"/>
		<element kind="staticText" uuid="e8437213-ff1e-4d08-bc90-26f5999438a5" mode="Opaque" x="0" y="0" width="40" height="11" forecolor="#FFFFFF" backcolor="#333333" hTextAlign="Center" style="Sans_Bold">
			<text><![CDATA[Order]]></text>
		</element>
		<element kind="staticText" uuid="8416e4fe-1d32-4800-a241-4b268149f635" mode="Opaque" x="40" y="0" width="145" height="11" forecolor="#FFFFFF" backcolor="#333333" hTextAlign="Center" style="Sans_Bold">
			<text><![CDATA[Name, City]]></text>
		</element>
		<element kind="staticText" uuid="f509f1c1-043d-44bd-80e9-2263e21ca377" mode="Opaque" x="185" y="0" width="50" height="11" forecolor="#FFFFFF" backcolor="#333333" style="Sans_Bold">
			<text><![CDATA[Date]]></text>
		</element>
		<element kind="staticText" uuid="c5a850d2-0cfc-4375-8a05-59df1abd67ae" mode="Opaque" x="235" y="0" width="35" height="11" forecolor="#FFFFFF" backcolor="#333333" hTextAlign="Right" style="Sans_Bold">
			<text><![CDATA[Freight]]></text>
		</element>
	</columnHeader>
	<detail>
		<band height="13">
			<element kind="textField" uuid="f08a12b8-605e-4b04-8089-c012492be72a" x="1" y="0" width="35" height="11" hTextAlign="Right">
				<expression><![CDATA[$F{OrderID}]]></expression>
			</element>
			<element kind="textField" uuid="db9d553f-0fd2-4cf3-ad2f-000bde9efe82" positionType="Float" x="40" y="0" width="110" height="11" textAdjust="StretchHeight">
				<expression><![CDATA[$F{ShipName} + ", " + $F{ShipCity}]]></expression>
			</element>
			<element kind="textField" uuid="4583d109-d2d7-4e1b-9376-2db432c97d71" x="155" y="0" width="25" height="11" blankWhenNull="true">
				<expression><![CDATA[$F{ShipRegion}]]></expression>
			</element>
			<element kind="textField" uuid="40b5bfa4-8ef4-41af-8b95-d4b8400a8cf9" x="185" y="0" width="50" height="11" pattern="dd/MM/yyyy">
				<expression><![CDATA[$F{OrderDate}]]></expression>
			</element>
			<element kind="textField" uuid="d6450f59-72f7-4fe7-b61d-06a2cb68fbd1" x="235" y="0" width="35" height="11" pattern="0.00" hTextAlign="Right">
				<expression><![CDATA[$F{Freight}]]></expression>
			</element>
			<element kind="line" uuid="0a1a6e03-3cca-438b-8c6b-5eb30e558d4c" positionType="Float" x="0" y="12" width="270" height="1" forecolor="#808080">
				<pen lineWidth="0.5"/>
			</element>
		</band>
	</detail>
	<columnFooter height="11">
		<element kind="rectangle" uuid="43589919-1357-4216-8651-3d965a5c3ee6" x="0" y="0" width="270" height="11" backcolor="#333333"/>
		<element kind="staticText" uuid="45582f6b-78a7-46ef-b958-46c0d6244da0" mode="Opaque" x="0" y="0" width="45" height="11" forecolor="#FFFFFF" backcolor="#333333" hTextAlign="Right" style="Sans_Bold">
			<text><![CDATA[Count :]]></text>
		</element>
		<element kind="textField" uuid="73a4572d-bffd-4d07-9a3b-7cfef85888d7" mode="Opaque" x="45" y="0" width="25" height="11" forecolor="#FFFFFF" backcolor="#333333" hTextAlign="Right" style="Sans_Bold">
			<expression><![CDATA[$V{COLUMN_COUNT}]]></expression>
		</element>
		<element kind="staticText" uuid="63be8324-fd5c-41c9-af73-33d0408d8768" mode="Opaque" x="70" y="0" width="140" height="11" forecolor="#FFFFFF" backcolor="#333333" hTextAlign="Right" style="Sans_Bold">
			<text><![CDATA[Total :]]></text>
		</element>
		<element kind="textField" uuid="0205335c-9d26-425d-add5-6b0e441386b5" mode="Opaque" x="210" y="0" width="60" height="11" forecolor="#FFFFFF" backcolor="#333333" pattern="0.00" hTextAlign="Right" style="Sans_Bold">
			<expression><![CDATA[$V{FreightSumColumn}]]></expression>
		</element>
	</columnFooter>
	<pageFooter height="30">
		<element kind="rectangle" uuid="8907e310-f754-4ef6-9647-250e7f6f90a4" mode="Transparent" x="0" y="5" width="555" height="25"/>
		<element kind="staticText" uuid="f399ac50-c31d-4470-a812-d3c4c4b0bab5" x="5" y="10" width="50" height="20" fontSize="14.0" hTextAlign="Right">
			<text><![CDATA[Count :]]></text>
		</element>
		<element kind="textField" uuid="6cf9f759-896d-4db9-a209-83900616e7a3" x="55" y="10" width="45" height="20" fontSize="14.0" hTextAlign="Right">
			<expression><![CDATA[$V{PAGE_COUNT}]]></expression>
		</element>
		<element kind="staticText" uuid="99d4ca3c-4006-4395-9c1d-bf5d91432aca" x="430" y="10" width="50" height="20" fontSize="14.0" hTextAlign="Right">
			<text><![CDATA[Total :]]></text>
		</element>
		<element kind="textField" uuid="ed9db097-c607-4dee-8a35-70d0e12d9220" x="480" y="10" width="70" height="20" fontSize="14.0" pattern="0.00" hTextAlign="Right">
			<expression><![CDATA[$V{FreightSumPage}]]></expression>
		</element>
		<element kind="textField" uuid="5fe0e27a-6b6c-4e5f-844d-38e080b7948f" x="200" y="10" width="75" height="20" fontSize="14.0" hTextAlign="Right">
			<expression><![CDATA[$V{PAGE_NUMBER}]]></expression>
		</element>
		<element kind="staticText" uuid="8f3495a7-e68a-458a-9d0e-8864cdbda76f" x="275" y="10" width="5" height="20" fontSize="14.0" hTextAlign="Center">
			<text><![CDATA[/]]></text>
		</element>
		<element kind="textField" uuid="7c56b5b5-8293-40f1-99aa-b08071e1cb89" x="280" y="10" width="75" height="20" fontSize="14.0" evaluationTime="Report">
			<expression><![CDATA[$V{PAGE_NUMBER}]]></expression>
		</element>
	</pageFooter>
</jasperReport>
