<?xml version="1.0" encoding="UTF-8"?>
<jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" name="OpenFlashChartReport" pageWidth="595" pageHeight="842" whenNoDataType="AllSectionsNoDetail" columnWidth="535" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="cf881c83-e1c3-49f8-a553-917cee7fec1c">
	<property name="net.sf.jasperreports.export.pdf.version" value="7"/>
	<queryString>
		<![CDATA[SELECT ShipCountry, Freight, OrderDate FROM Orders Where ShipCountry LIKE '%r%' ORDER BY ShipCountry, OrderDate]]>
	</queryString>
	<field name="ShipCountry" class="java.lang.String"/>
	<field name="Freight" class="java.lang.Float"/>
	<field name="OrderDate" class="java.util.Date"/>
	<variable name="YearFormatter" class="java.text.DateFormat" calculation="System">
		<initialValueExpression><![CDATA[new java.text.SimpleDateFormat("yyyy")]]></initialValueExpression>
	</variable>
	<variable name="OrderYear" class="java.lang.String">
		<variableExpression><![CDATA[$V{YearFormatter}.format($F{OrderDate})]]></variableExpression>
	</variable>
	<variable name="CountryFreight" class="java.lang.Float" resetType="Group" resetGroup="Country" calculation="Sum">
		<variableExpression><![CDATA[$F{Freight}]]></variableExpression>
	</variable>
	<variable name="CountryYearFreight" class="java.lang.Float" resetType="Group" resetGroup="Year" calculation="Sum">
		<variableExpression><![CDATA[$F{Freight}]]></variableExpression>
	</variable>
	<group name="Country">
		<groupExpression><![CDATA[$F{ShipCountry}]]></groupExpression>
	</group>
	<group name="Year">
		<groupExpression><![CDATA[$V{OrderYear}]]></groupExpression>
	</group>
	<summary>
		<band height="800">
			<componentElement>
				<reportElement x="0" y="0" width="555" height="350" uuid="8c396772-0c2e-4ee8-bcfb-d9828923390e"/>
				<ofc:pieChart xmlns:ofc="http://jasperreports.sourceforge.net/openflashchart" xsi:schemaLocation="http://jasperreports.sourceforge.net/openflashchart http://jasperreports.sourceforge.net/xsd/openflashchart.xsd" evaluationTime="Report">
					<ofc:pieDataset>
						<dataset incrementType="Group" incrementGroup="Country"/>
						<ofc:keyExpression><![CDATA[$F{ShipCountry}]]></ofc:keyExpression>
						<ofc:valueExpression><![CDATA[$V{CountryFreight}]]></ofc:valueExpression>
					</ofc:pieDataset>
					<ofc:titleExpression><![CDATA["Pie Chart"]]></ofc:titleExpression>
				</ofc:pieChart>
			</componentElement>
			<componentElement>
				<reportElement x="0" y="400" width="555" height="350" uuid="206d4545-8a20-45fd-93a1-8acaa82a6741"/>
				<ofc:barChart xmlns:ofc="http://jasperreports.sourceforge.net/openflashchart" xsi:schemaLocation="http://jasperreports.sourceforge.net/openflashchart http://jasperreports.sourceforge.net/xsd/openflashchart.xsd" evaluationTime="Report">
					<ofc:barDataset>
						<dataset incrementType="Group" incrementGroup="Year"/>
						<ofc:barSeries>
							<ofc:seriesExpression><![CDATA[$F{ShipCountry}]]></ofc:seriesExpression>
							<ofc:categoryExpression><![CDATA[$V{OrderYear}]]></ofc:categoryExpression>
							<ofc:valueExpression><![CDATA[$V{CountryYearFreight}]]></ofc:valueExpression>
						</ofc:barSeries>
					</ofc:barDataset>
					<ofc:titleExpression><![CDATA["Bar Chart"]]></ofc:titleExpression>
				</ofc:barChart>
			</componentElement>
		</band>
	</summary>
</jasperReport>
