<jasperReport name="XYBarChartTimePeriodReport" language="java" columnCount="2" pageWidth="595" pageHeight="842" columnWidth="270" columnSpacing="15" leftMargin="20" rightMargin="20" topMargin="30" bottomMargin="30" uuid="8d516102-e340-41a4-9331-84a86e33ca19">
	<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["XY Bar Chart with Time Period Dataset 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} AND ShippedDate IS NOT NULL 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="2444cce7-2ee5-48b0-9a64-cb4cca51d83c" x="0" y="14" width="270" height="11" forecolor="#FFDDDD" backcolor="#FFDDDD"/>
				<element kind="staticText" uuid="1ad58c61-7c16-444b-9bbc-774b910c7c31" 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="80e63f57-76b8-4b86-9b9e-1b43addafef8" 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="2067631b-e62b-42ca-ab29-16e5c54e26fa" x="0" y="0" width="270" height="1" forecolor="#FF0000"/>
				<element kind="staticText" uuid="2ba550f5-ce8f-4ca6-9470-4c192704fa92" x="0" y="1" width="45" height="11" forecolor="#FF0000" hTextAlign="Right" style="Sans_Bold">
					<text><![CDATA[Count :]]></text>
				</element>
				<element kind="textField" uuid="f8bd8c46-4ad4-49f3-9777-29037d7f6a7a" 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="b9520cb7-582c-4227-b88e-07b368afed74" x="70" y="1" width="140" height="11" forecolor="#FF0000" hTextAlign="Right" style="Sans_Bold">
					<text><![CDATA[Total :]]></text>
				</element>
				<element kind="textField" uuid="7f1439bc-4f48-47f1-a603-f73ecd52fb3b" 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="225">
				<element kind="line" uuid="d33f9050-f9c2-4b34-9a27-19df6d1add51" x="0" y="14" width="270" height="1"/>
				<element kind="textField" uuid="027b22da-3b15-4dfa-83c2-9becaa70d482" x="10" y="2" width="150" height="11" style="Sans_Bold">
					<expression><![CDATA[$F{ShipCountry}]]></expression>
				</element>
				<element kind="textField" uuid="a66591ab-f89a-427f-a327-73f58c82c2b0" 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="xyBar" uuid="6880ddee-d5d1-45d4-8460-33e417584f96" positionType="Float" x="0" y="25" width="270" height="175" evaluationTime="Group" evaluationGroup="CountryGroup">
					<dataset kind="timePeriod" resetGroup="CountryGroup" resetType="Group">
						<series>
							<seriesExpression><![CDATA["Half Freight"]]></seriesExpression>
							<startDateExpression><![CDATA[$F{OrderDate}]]></startDateExpression>
							<endDateExpression><![CDATA[$F{ShippedDate}]]></endDateExpression>
							<valueExpression><![CDATA[$F{Freight} / 2d]]></valueExpression>
						</series>
						<series>
							<seriesExpression><![CDATA["Normal Freight"]]></seriesExpression>
							<startDateExpression><![CDATA[$F{OrderDate}]]></startDateExpression>
							<endDateExpression><![CDATA[$F{ShippedDate}]]></endDateExpression>
							<valueExpression><![CDATA[$F{Freight}]]></valueExpression>
						</series>
						<series>
							<seriesExpression><![CDATA["Double Freight"]]></seriesExpression>
							<startDateExpression><![CDATA[$F{OrderDate}]]></startDateExpression>
							<endDateExpression><![CDATA[$F{ShippedDate}]]></endDateExpression>
							<valueExpression><![CDATA[$F{Freight} * 2d]]></valueExpression>
						</series>
					</dataset>
					<plot showTickMarks="true" showTickLabels="true">
						<itemLabel color="#000000" backgroundColor="#FFFFFF"/>
					</plot>
				</element>
			</band>
		</groupHeader>
		<groupFooter>
			<band height="15">
				<element kind="rectangle" uuid="28d81aaa-2b80-4590-b26a-7d483e14adee" x="0" y="0" width="270" height="11" forecolor="#C0C0C0" backcolor="#C0C0C0"/>
				<element kind="staticText" uuid="0f418867-309c-425c-b7c2-f15c80892d7d" 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="7da4af1e-ef08-4f9f-90be-164d8771cd2b" 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="b419c562-20e8-4176-ab77-3da03c8185e0" 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="7457c91c-6779-4b97-a54c-3f98f121d3f1" 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="b5232937-49e7-4c4a-a7fa-1c94d112063a" x="0" y="0" width="555" height="35" fontSize="22.0" hTextAlign="Center" style="Serif_Bold">
			<text><![CDATA[XY Bar Chart  with Time Period Dataset Report]]></text>
			<box style="Serif_Bold">
				<topPen lineWidth="0.5"/>
			</box>
		</element>
	</title>
	<columnHeader height="11">
		<element kind="rectangle" uuid="5f522186-4fe7-4f2d-b284-925db8df2fc9" x="0" y="0" width="270" height="11" backcolor="#333333"/>
		<element kind="staticText" uuid="9db3c3c5-8e41-4a6c-af6e-79134d22aa61" 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="dac4c4aa-02e8-4a3d-9777-fe4d9311d6ce" 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="e44fa486-e6b3-45c7-9a74-5ee97295a639" 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="61f27d21-6933-4400-b4cf-d0c6f3d4f386" 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="a0a07b3b-cd47-4340-a397-3a78f7c5ebd0" x="1" y="0" width="35" height="11" hTextAlign="Right">
				<expression><![CDATA[$F{OrderID}]]></expression>
			</element>
			<element kind="textField" uuid="66d92a01-1a86-4391-9318-1d2797053a9b" positionType="Float" x="40" y="0" width="110" height="11" textAdjust="StretchHeight">
				<expression><![CDATA[$F{ShipName} + ", " + $F{ShipCity}]]></expression>
			</element>
			<element kind="textField" uuid="570de6f0-3582-4264-b82a-110ed26f70cd" x="155" y="0" width="25" height="11" blankWhenNull="true">
				<expression><![CDATA[$F{ShipRegion}]]></expression>
			</element>
			<element kind="textField" uuid="bd2d0e15-692e-4e4a-9e2b-3d5d78dd1fc5" x="185" y="0" width="50" height="11" pattern="dd/MM/yyyy">
				<expression><![CDATA[$F{OrderDate}]]></expression>
			</element>
			<element kind="textField" uuid="dd488085-52d3-4772-a02e-d1d2b3a1ab80" x="235" y="0" width="35" height="11" pattern="0.00" hTextAlign="Right">
				<expression><![CDATA[$F{Freight}]]></expression>
			</element>
			<element kind="line" uuid="6c9e5fb3-a487-4cf1-8e7f-13d45c52f17e" 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="c18c0fc9-ff35-4aad-9451-9c984b0dcaa4" x="0" y="0" width="270" height="11" backcolor="#333333"/>
		<element kind="staticText" uuid="23d1c05e-da7a-4e43-9281-75e95c6437c5" 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="98731026-cadd-46a3-aa8b-8e19663e1814" 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="98517b06-84ea-468f-8404-9546d9943aeb" 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="18d5c363-7a4b-4c6b-8e34-0ec8c3f2e88c" 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="bce6d3e1-1126-4e7b-ba06-2503ebc2f52d" mode="Transparent" x="0" y="5" width="555" height="25"/>
		<element kind="staticText" uuid="f1e877d3-8fde-41c4-a161-26baca03afc8" x="5" y="10" width="50" height="20" fontSize="14.0" hTextAlign="Right">
			<text><![CDATA[Count :]]></text>
		</element>
		<element kind="textField" uuid="d6a29e47-b3f6-47d7-805a-d9aebc30a2dc" x="55" y="10" width="45" height="20" fontSize="14.0" hTextAlign="Right">
			<expression><![CDATA[$V{PAGE_COUNT}]]></expression>
		</element>
		<element kind="staticText" uuid="412b6a84-eb84-49f9-98f6-eef76d0fefb4" x="430" y="10" width="50" height="20" fontSize="14.0" hTextAlign="Right">
			<text><![CDATA[Total :]]></text>
		</element>
		<element kind="textField" uuid="0f5ece26-9a2d-46af-8a73-3b609ff24cbf" 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="a94944de-7112-4b5c-9040-0d7cceafbc3d" x="200" y="10" width="75" height="20" fontSize="14.0" hTextAlign="Right">
			<expression><![CDATA[$V{PAGE_NUMBER}]]></expression>
		</element>
		<element kind="staticText" uuid="debeb83d-01e7-401c-9628-fb4b94e73a40" x="275" y="10" width="5" height="20" fontSize="14.0" hTextAlign="Center">
			<text><![CDATA[/]]></text>
		</element>
		<element kind="textField" uuid="b55c77ec-a148-4fa5-9868-dbf7a36ca371" x="280" y="10" width="75" height="20" fontSize="14.0" evaluationTime="Report">
			<expression><![CDATA[$V{PAGE_NUMBER}]]></expression>
		</element>
	</pageFooter>
</jasperReport>
