<jasperReport name="StackedBarChartReport" language="java" columnCount="2" pageWidth="595" pageHeight="842" columnWidth="270" columnSpacing="15" leftMargin="20" rightMargin="20" topMargin="30" bottomMargin="30" uuid="81dfe7be-1f0f-4c6d-a207-97d29480bf36">
	<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["Stacked Bar Chart Report"]]></defaultValueExpression>
	</parameter>
	<parameter name="MaxOrderID" class="java.lang.Integer">
		<description><![CDATA[]]></description>
		<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="2e69a060-30c1-4173-b6ef-ec945a0ca331" x="0" y="14" width="270" height="11" forecolor="#FFDDDD" backcolor="#FFDDDD"/>
				<element kind="staticText" uuid="03d8ffcd-da83-4449-b7c7-569643b3183c" 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="e0ccd88a-9253-4a45-87dc-5556ba9bec9d" 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="9256996a-ff6c-46ec-b4d9-89e38e3f11ea" 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="d8b6604b-cd7d-4dae-90c9-efce7faab9eb" 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="stackedBar" uuid="6ad66afa-03e8-48fa-a7fe-b63511457709" positionType="Float" x="0" y="50" width="270" height="175" evaluationTime="Group" 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>
							<labelExpression><![CDATA[]]></labelExpression>
						</series>
						<series>
							<seriesExpression><![CDATA["Half Freight"]]></seriesExpression>
							<categoryExpression><![CDATA[$F{ShipCountry}]]></categoryExpression>
							<valueExpression><![CDATA[$V{FreightSumCountryGroup} / 2d]]></valueExpression>
							<labelExpression><![CDATA[]]></labelExpression>
						</series>
					</dataset>
					<plot>
						<itemLabel color="#000000" backgroundColor="#FFFFFF"/>
					</plot>
				</element>
			</band>
		</groupHeader>
		<groupFooter>
			<band height="25">
				<element kind="line" uuid="cbe8e66e-78b9-46b8-a808-ca9773a2e027" x="0" y="0" width="270" height="1" forecolor="#FF0000"/>
				<element kind="staticText" uuid="947b932c-39f5-4589-b3ba-77d41a76563f" x="0" y="1" width="45" height="11" forecolor="#FF0000" hTextAlign="Right" style="Sans_Bold">
					<text><![CDATA[Count :]]></text>
				</element>
				<element kind="textField" uuid="934ccd9f-1117-4c35-8cc3-c530c639d23e" 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="81af2e57-33be-4cc5-90ad-88deb77baa21" x="70" y="1" width="140" height="11" forecolor="#FF0000" hTextAlign="Right" style="Sans_Bold">
					<text><![CDATA[Total :]]></text>
				</element>
				<element kind="textField" uuid="3710dab1-6ce3-4942-b844-6bd253fccf04" 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="ef20a9e1-51b0-40ee-a1f2-f21968419e98" x="0" y="14" width="270" height="1"/>
				<element kind="textField" uuid="258c6dd0-cbbe-45f4-a4e2-e44ac98f0575" x="10" y="2" width="150" height="11" style="Sans_Bold">
					<expression><![CDATA[$F{ShipCountry}]]></expression>
				</element>
				<element kind="textField" uuid="2a5f1b85-e77a-4563-9968-ff644ee64f75" 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="7bce3c41-1687-453e-810e-7073ca5943b7" x="0" y="0" width="270" height="11" forecolor="#C0C0C0" backcolor="#C0C0C0"/>
				<element kind="staticText" uuid="76963dc3-c308-4223-8186-27659f2fdefa" 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="7a011038-b8d8-4260-85e4-30c2cc931718" 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="251cf259-c447-4a0d-86a7-8c066f59f5fb" 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="ce9dc5ce-5de1-425a-8f8c-b94d333c360a" 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="cb7339fd-40bf-49e9-baa5-caeaebf19a39" x="0" y="0" width="555" height="35" fontSize="22.0" hTextAlign="Center" style="Serif_Bold">
			<text><![CDATA[Stacked Bar Chart Report]]></text>
			<box style="Serif_Bold">
				<topPen lineWidth="0.5"/>
			</box>
		</element>
	</title>
	<columnHeader height="11">
		<element kind="rectangle" uuid="53093d2c-bbec-49f7-98c8-1fc3bc6ed1cb" x="0" y="0" width="270" height="11" backcolor="#333333"/>
		<element kind="staticText" uuid="f218ae63-b584-4032-a9bf-24c8f3e820e9" 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="6dac6e91-530a-498c-8fa0-e8c7a907f9bb" 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="a97a1bf3-fa48-4063-9b90-cd9bf97d0033" 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="6e7766e6-5041-476b-a91d-85a602c4d209" 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="015d8a05-abcb-40cf-acd3-4f15a047cf81" x="1" y="0" width="35" height="11" hTextAlign="Right">
				<expression><![CDATA[$F{OrderID}]]></expression>
			</element>
			<element kind="textField" uuid="4b0422fd-1a4a-4985-ab4a-4be716086be5" positionType="Float" x="40" y="0" width="110" height="11" textAdjust="StretchHeight">
				<expression><![CDATA[$F{ShipName} + ", " + $F{ShipCity}]]></expression>
			</element>
			<element kind="textField" uuid="5edd1369-1409-4c60-92a5-bcb0d6898d70" x="155" y="0" width="25" height="11" blankWhenNull="true">
				<expression><![CDATA[$F{ShipRegion}]]></expression>
			</element>
			<element kind="textField" uuid="2675e4ed-b100-4c69-b2ed-ccd565bb55b9" x="185" y="0" width="50" height="11" pattern="dd/MM/yyyy">
				<expression><![CDATA[$F{OrderDate}]]></expression>
			</element>
			<element kind="textField" uuid="4b24304f-f138-4c56-a70c-98499b67ea38" x="235" y="0" width="35" height="11" pattern="0.00" hTextAlign="Right">
				<expression><![CDATA[$F{Freight}]]></expression>
			</element>
			<element kind="line" uuid="0ec36adb-5d6e-4e81-8d2a-a9b5a76d1262" 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="c34f77a2-c115-443f-a59c-fb0fbe803ea3" x="0" y="0" width="270" height="11" backcolor="#333333"/>
		<element kind="staticText" uuid="6cbe16f1-3527-4659-b0ec-e59b19d07c17" 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="1bbaad03-2659-463e-9d39-42371af966cf" 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="2afa1ef7-d50a-4bc5-ae92-2e1a4f44245a" 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="c0000d53-4d7d-4563-b90e-9ea4043b2a27" 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="35067457-edd2-4aac-8ae2-a97ddd5f9108" mode="Transparent" x="0" y="5" width="555" height="25"/>
		<element kind="staticText" uuid="a13f6507-f091-4b8e-ab7a-308aaa74b4be" x="5" y="10" width="50" height="20" fontSize="14.0" hTextAlign="Right">
			<text><![CDATA[Count :]]></text>
		</element>
		<element kind="textField" uuid="f1916e79-a548-46bc-8b9f-981efbf88f6d" x="55" y="10" width="45" height="20" fontSize="14.0" hTextAlign="Right">
			<expression><![CDATA[$V{PAGE_COUNT}]]></expression>
		</element>
		<element kind="staticText" uuid="b67d4059-7683-43f8-acef-96a5bb9bbc7a" x="430" y="10" width="50" height="20" fontSize="14.0" hTextAlign="Right">
			<text><![CDATA[Total :]]></text>
		</element>
		<element kind="textField" uuid="e0bd3810-a3fd-4ea3-9d42-6dbde171a27c" 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="dec20be8-da99-4567-9253-4ea22db1f54c" x="200" y="10" width="75" height="20" fontSize="14.0" hTextAlign="Right">
			<expression><![CDATA[$V{PAGE_NUMBER}]]></expression>
		</element>
		<element kind="staticText" uuid="e4ef2f75-072c-48b3-a78a-c5105650a236" x="275" y="10" width="5" height="20" fontSize="14.0" hTextAlign="Center">
			<text><![CDATA[/]]></text>
		</element>
		<element kind="textField" uuid="20e62609-03de-4460-9172-e4c1f233d654" x="280" y="10" width="75" height="20" fontSize="14.0" evaluationTime="Report">
			<expression><![CDATA[$V{PAGE_NUMBER}]]></expression>
		</element>
	</pageFooter>
</jasperReport>
