<?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="_cigraph" pageWidth="550" pageHeight="802" columnWidth="550" leftMargin="0" rightMargin="0" topMargin="0" bottomMargin="0">
	<property name="ireport.scriptlethandling" value="0"/>
	<property name="ireport.encoding" value="UTF-8"/>
	<property name="ireport.zoom" value="2.0"/>
	<property name="ireport.x" value="0"/>
	<property name="ireport.y" value="0"/>
	<import value="net.sf.jasperreports.engine.*"/>
	<import value="java.util.*"/>
	<import value="usda.weru.weps.reports.query.*"/>
	<import value="net.sf.jasperreports.engine.data.*"/>
	<parameter name="RUN_ID" class="java.lang.Integer" isForPrompting="false">
		<defaultValueExpression><![CDATA[Integer.valueOf(0)]]></defaultValueExpression>
	</parameter>
	<queryString>
		<![CDATA[SELECT
	ci."cycle",
	avg(ci."total") as "loss",
	min(ci."total") as "loss_min",
	max(ci."total") as "loss_max",
	max(ci."low") as "low",
	max(ci."running") as "running",
	max(ci."high") as "high"
FROM
	weps('ci') AS ci

WHERE
	ci."runid"=$P{RUN_ID}
GROUP BY
	ci."cycle"
ORDER BY
	ci."cycle"]]>
	</queryString>
	<field name="cycle" class="java.lang.Integer"/>
	<field name="loss" class="java.lang.Double"/>
	<field name="loss_min" class="java.lang.Double"/>
	<field name="loss_max" class="java.lang.Double"/>
	<field name="low" class="java.lang.Double"/>
	<field name="running" class="java.lang.Double"/>
	<field name="high" class="java.lang.Double"/>
	<variable name="US_UNITS" class="java.lang.Boolean" resetType="None">
		<variableExpression><![CDATA["US".equals(((WepsConnection)$P{REPORT_CONNECTION}).getUnits())]]></variableExpression>
	</variable>
	<columnFooter>
		<band height="332" splitType="Stretch">
			<xyLineChart>
				<chart customizerClass="usda.weru.weps.reports.ConfidenceIntervalChartCustomizer">
					<reportElement stretchType="RelativeToBandHeight" x="0" y="10" width="550" height="322"/>
					<chartTitle position="Top">
						<titleExpression><![CDATA["Cycle Gross Loss Confidence Interval"]]></titleExpression>
					</chartTitle>
					<chartSubtitle/>
					<chartLegend/>
				</chart>
				<xyDataset>
					<xySeries>
						<seriesExpression><![CDATA["low"]]></seriesExpression>
						<xValueExpression><![CDATA[$F{cycle}]]></xValueExpression>
						<yValueExpression><![CDATA[$F{low}]]></yValueExpression>
					</xySeries>
					<xySeries>
						<seriesExpression><![CDATA["running"]]></seriesExpression>
						<xValueExpression><![CDATA[$F{cycle}]]></xValueExpression>
						<yValueExpression><![CDATA[$F{running}]]></yValueExpression>
					</xySeries>
					<xySeries>
						<seriesExpression><![CDATA["high"]]></seriesExpression>
						<xValueExpression><![CDATA[$F{cycle}]]></xValueExpression>
						<yValueExpression><![CDATA[$F{high}]]></yValueExpression>
					</xySeries>
					<xySeries>
						<seriesExpression><![CDATA["loss"]]></seriesExpression>
						<xValueExpression><![CDATA[$F{cycle}]]></xValueExpression>
						<yValueExpression><![CDATA[$F{loss}]]></yValueExpression>
					</xySeries>
					<xySeries>
						<seriesExpression><![CDATA["loss_min"]]></seriesExpression>
						<xValueExpression><![CDATA[$F{cycle}]]></xValueExpression>
						<yValueExpression><![CDATA[$F{loss_min}]]></yValueExpression>
					</xySeries>
					<xySeries>
						<seriesExpression><![CDATA["loss_max"]]></seriesExpression>
						<xValueExpression><![CDATA[$F{cycle}]]></xValueExpression>
						<yValueExpression><![CDATA[$F{loss_max}]]></yValueExpression>
					</xySeries>
				</xyDataset>
				<linePlot isShowShapes="true">
					<plot/>
				</linePlot>
			</xyLineChart>
		</band>
	</columnFooter>
	<summary>
		<band splitType="Stretch"/>
	</summary>
</jasperReport>