<jasperReport name="CandlestickChartReport" language="java" columnCount="2" pageWidth="595" pageHeight="842" columnWidth="270" columnSpacing="15" leftMargin="20" rightMargin="20" topMargin="30" bottomMargin="30" uuid="60e942ff-7831-4189-b34f-1ffab1ebd537">
	<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["Candlestick 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="FreightSumFirstLetterGroup" resetType="Group" calculation="Sum" resetGroup="FirstLetterGroup" 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="FirstLetterGroup" minHeightToStartNewPage="200" startNewColumn="true">
		<expression><![CDATA[$V{FirstLetter}]]></expression>
		<groupHeader>
			<band height="25">
				<element kind="rectangle" uuid="d3150459-e485-42b5-8cb2-db868a471b1e" x="0" y="14" width="270" height="11" forecolor="#FFDDDD" backcolor="#FFDDDD"/>
				<element kind="staticText" uuid="316ba565-f6bd-453a-9338-0bdac1b72dcf" 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="3ecc773d-db29-48f9-9f90-d0bd28cc54ea" mode="Opaque" x="130" y="14" width="140" height="11" forecolor="#FF0000" backcolor="#FFDDDD" style="Sans_Bold">
					<expression><![CDATA[$V{FirstLetter}]]></expression>
				</element>
			</band>
		</groupHeader>
		<groupFooter>
			<band height="25">
				<element kind="line" uuid="7df7ed2a-ac07-4648-a24b-36b67d83f536" x="0" y="0" width="270" height="1" forecolor="#FF0000"/>
				<element kind="staticText" uuid="a52df3e9-dc20-4a61-8663-06e7165b7d71" x="0" y="1" width="45" height="11" forecolor="#FF0000" hTextAlign="Right" style="Sans_Bold">
					<text><![CDATA[Count :]]></text>
				</element>
				<element kind="textField" uuid="80c2c602-e5c9-461c-81e2-ce10feaa29ed" x="45" y="1" width="25" height="11" forecolor="#FF0000" hTextAlign="Right" style="Sans_Bold">
					<expression><![CDATA[$V{FirstLetterGroup_COUNT}]]></expression>
				</element>
				<element kind="staticText" uuid="702a0066-9d5b-49fb-be57-dbbdf6e26833" x="70" y="1" width="140" height="11" forecolor="#FF0000" hTextAlign="Right" style="Sans_Bold">
					<text><![CDATA[Total :]]></text>
				</element>
				<element kind="textField" uuid="6e2255c5-8874-4a1d-a27a-c3977592e255" x="210" y="1" width="60" height="11" forecolor="#FF0000" pattern="0.00" hTextAlign="Right" style="Sans_Bold">
					<expression><![CDATA[$V{FreightSumFirstLetterGroup}]]></expression>
				</element>
			</band>
		</groupFooter>
	</group>
	<group name="CountryGroup">
		<expression><![CDATA[$F{ShipCountry}]]></expression>
		<groupHeader>
			<band height="200">
				<element kind="line" uuid="d27f2966-4619-40f7-b95e-abbc3cd04e01" x="0" y="14" width="270" height="1"/>
				<element kind="textField" uuid="898de496-c5fc-4145-9cc3-d6e7fecc20d2" x="10" y="2" width="150" height="11" style="Sans_Bold">
					<expression><![CDATA[$F{ShipCountry}]]></expression>
				</element>
				<element kind="textField" uuid="91c0559d-db66-4760-9347-710e9e24182c" 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>
				<element kind="chart" chartType="candlestick" uuid="eca7eecd-b7f9-456f-af3c-3127700ef43a" positionType="Float" x="0" y="25" width="270" height="175" evaluationTime="Group" evaluationGroup="CountryGroup">
					<dataset kind="highLow" incrementType="Group" resetGroup="CountryGroup" incrementGroup="CountryGroup" resetType="Group">
						<seriesExpression><![CDATA["Freight"]]></seriesExpression>
						<dateExpression><![CDATA[$V{DateHighestCountryGroup}]]></dateExpression>
						<highExpression><![CDATA[$V{FreightSumCountryGroup} * 1.6d]]></highExpression>
						<lowExpression><![CDATA[$V{FreightSumCountryGroup} * 0.4d]]></lowExpression>
						<openExpression><![CDATA[$V{FreightSumCountryGroup} * 0.7d]]></openExpression>
						<closeExpression><![CDATA[$V{FreightSumCountryGroup} * 1.4d]]></closeExpression>
						<volumeExpression><![CDATA[$V{FreightSumCountryGroup} * 0.5d]]></volumeExpression>
					</dataset>
					<plot showVolume="true"/>
				</element>
			</band>
		</groupHeader>
		<groupFooter>
			<band height="15">
				<element kind="rectangle" uuid="d9551d4e-9192-4a1d-8df4-c739ad3349c9" x="0" y="0" width="270" height="11" forecolor="#C0C0C0" backcolor="#C0C0C0"/>
				<element kind="staticText" uuid="ac6e4445-cc68-4175-95da-489e81a95d4d" 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="84f61de3-12e9-4381-bc46-dd64db041417" 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="bc57993a-6e67-468b-a44d-49fa6662a19b" 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="cabfd59c-54bd-4835-8d1f-50fd3d820c4e" 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="750a5fa0-06c4-4475-ac3d-978545ee910d" x="0" y="0" width="555" height="35" fontSize="22.0" hTextAlign="Center" style="Serif_Bold">
			<text><![CDATA[Candlestick Chart Report]]></text>
			<box style="Serif_Bold">
				<topPen lineWidth="0.5"/>
			</box>
		</element>
	</title>
	<columnHeader height="11">
		<element kind="rectangle" uuid="e0d32dea-3559-4b9c-900f-2862e6b18aff" x="0" y="0" width="270" height="11" backcolor="#333333"/>
		<element kind="staticText" uuid="ef739ab7-c58e-453f-b7f5-a4a8d8a4b56e" 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="35e0de3c-4e08-4a34-849f-cceef3a5d30e" 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="41580ceb-fb36-4543-a02e-04e6ad9920d2" 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="f5ba9fa6-1772-4c93-9bd2-aea85fe14154" 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="40147aa5-dd88-4fe2-bde1-37c6346b44d3" x="1" y="0" width="35" height="11" hTextAlign="Right">
				<expression><![CDATA[$F{OrderID}]]></expression>
			</element>
			<element kind="textField" uuid="e3ba74a0-5c39-4301-a113-6e1ca7a34c24" positionType="Float" x="40" y="0" width="110" height="11" textAdjust="StretchHeight">
				<expression><![CDATA[$F{ShipName} + ", " + $F{ShipCity}]]></expression>
			</element>
			<element kind="textField" uuid="9c07f2cd-a9c6-454a-9c4b-b14c0d82e094" x="155" y="0" width="25" height="11" blankWhenNull="true">
				<expression><![CDATA[$F{ShipRegion}]]></expression>
			</element>
			<element kind="textField" uuid="6eb6a088-7d3a-4ae5-b45e-36e01361a78d" x="185" y="0" width="50" height="11" pattern="dd/MM/yyyy">
				<expression><![CDATA[$F{OrderDate}]]></expression>
			</element>
			<element kind="textField" uuid="c79c8c01-03eb-4f24-8718-4e6e4e201446" x="235" y="0" width="35" height="11" pattern="0.00" hTextAlign="Right">
				<expression><![CDATA[$F{Freight}]]></expression>
			</element>
			<element kind="line" uuid="4955c511-9b58-4a40-a2d3-3803868aa7c4" 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="b101ab9b-a860-4e21-8457-85d1ae43f27c" x="0" y="0" width="270" height="11" backcolor="#333333"/>
		<element kind="staticText" uuid="a8c6e7cb-c2d1-449b-b048-7287044e233a" 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="7e11b4a2-ef2e-47cc-a455-05395fb6ac93" 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="e8eddd48-9963-4d76-a56f-6af318c489ed" 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="e9864bf1-3dd0-4cdb-ab16-af55a7410f95" 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="41a1e586-1125-4ee4-b586-0fdc72a36980" mode="Transparent" x="0" y="5" width="555" height="25"/>
		<element kind="staticText" uuid="57d1cdd8-e5a3-4a0e-85c8-27427bb90f2d" x="5" y="10" width="50" height="20" fontSize="14.0" hTextAlign="Right">
			<text><![CDATA[Count :]]></text>
		</element>
		<element kind="textField" uuid="af3e394d-d842-4fac-9574-3adcae2da550" x="55" y="10" width="45" height="20" fontSize="14.0" hTextAlign="Right">
			<expression><![CDATA[$V{PAGE_COUNT}]]></expression>
		</element>
		<element kind="staticText" uuid="5d22e5c0-9885-476d-8e4a-2fe079fae8e1" x="430" y="10" width="50" height="20" fontSize="14.0" hTextAlign="Right">
			<text><![CDATA[Total :]]></text>
		</element>
		<element kind="textField" uuid="1692184e-5e94-4178-84e2-9608d1969265" 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="3b8c0dc7-9ffe-4afb-a24f-53fdc176dacf" x="200" y="10" width="75" height="20" fontSize="14.0" hTextAlign="Right">
			<expression><![CDATA[$V{PAGE_NUMBER}]]></expression>
		</element>
		<element kind="staticText" uuid="41b6877b-b484-49df-b96b-3cafe5ad943e" x="275" y="10" width="5" height="20" fontSize="14.0" hTextAlign="Center">
			<text><![CDATA[/]]></text>
		</element>
		<element kind="textField" uuid="00964e29-17e8-493d-b5dd-f778e2638c31" x="280" y="10" width="75" height="20" fontSize="14.0" evaluationTime="Report">
			<expression><![CDATA[$V{PAGE_NUMBER}]]></expression>
		</element>
	</pageFooter>
</jasperReport>
