<?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="timeseriesproducts" pageWidth="842" pageHeight="595" orientation="Landscape" columnWidth="782" leftMargin="30" rightMargin="30" topMargin="20" bottomMargin="20" uuid="ae62c0dd-0e03-4d85-8886-4a714daf241c">
	<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="net.sf.jasperreports.engine.data.*"/>
	<style name="Crosstab Data Text" hAlign="Center"/>
	<parameter name="ARG" class="java.lang.Object" isForPrompting="false"/>
	<queryString>
		<![CDATA[]]>
	</queryString>
	<field name="code" class="java.lang.String"/>
	<field name="codetype" class="java.lang.String"/>
	<field name="prodref" class="java.lang.String"/>
	<field name="prodname" class="java.lang.String"/>
	<field name="datesold" class="java.util.Date"/>
	<field name="datestamp" class="java.util.Date"/>
	<field name="unitssold" class="java.lang.Double"/>
	<variable name="unitssold_1" class="java.lang.Double" resetType="Group" resetGroup="Product" calculation="Sum">
		<variableExpression><![CDATA[$F{unitssold}]]></variableExpression>
	</variable>
	<variable name="unitssold_2" class="java.lang.Double" calculation="Sum">
		<variableExpression><![CDATA[$F{unitssold}]]></variableExpression>
	</variable>
	<variable name="datesold_1" class="java.lang.Integer" calculation="Count">
		<variableExpression><![CDATA[$F{datesold}]]></variableExpression>
	</variable>
	<variable name="unitssold_3" class="java.lang.Double" calculation="Average">
		<variableExpression><![CDATA[$F{unitssold}]]></variableExpression>
	</variable>
	<group name="Product">
		<groupExpression><![CDATA[$F{code}]]></groupExpression>
		<groupHeader>
			<band/>
		</groupHeader>
		<groupFooter>
			<band/>
		</groupFooter>
	</group>
	<title>
		<band/>
	</title>
	<pageHeader>
		<band height="52">
			<staticText>
				<reportElement key="staticText-1" mode="Transparent" x="160" y="33" width="10" height="15" uuid="22d62740-35ba-49d5-aa03-d8a99aa84b3c"/>
				<box>
					<topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
					<leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
					<bottomPen lineWidth="0.0" lineColor="#000000"/>
					<rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#FFFFFF"/>
				</box>
				<textElement textAlignment="Center" verticalAlignment="Middle" rotation="None">
					<font fontName="SansSerif" size="10" isBold="false" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfFontName="Helvetica" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
					<paragraph lineSpacing="Single"/>
				</textElement>
				<text><![CDATA[-
]]></text>
			</staticText>
			<textField pattern="" isBlankWhenNull="false">
				<reportElement key="textField-title" mode="Transparent" x="0" y="0" width="375" height="30" forecolor="#33CCFF" backcolor="#FFFFFF" uuid="028ca162-2986-404a-a259-d017f1af34c3"/>
				<box>
					<topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
					<leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
					<bottomPen lineWidth="0.0" lineColor="#000000"/>
					<rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#FFFFFF"/>
				</box>
				<textElement textAlignment="Left" verticalAlignment="Top" rotation="None">
					<font fontName="SansSerif" size="14" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfFontName="Helvetica" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
					<paragraph lineSpacing="Single"/>
				</textElement>
				<textFieldExpression><![CDATA[$R{label.title.timeseries}]]></textFieldExpression>
			</textField>
			<textField pattern="" isBlankWhenNull="true">
				<reportElement key="textField-8" mode="Transparent" x="50" y="33" width="110" height="15" uuid="8e09d441-35b6-40e5-b051-9f2b9c3df0d1"/>
				<box>
					<topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
					<leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
					<bottomPen lineWidth="0.0" lineColor="#000000"/>
					<rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#FFFFFF"/>
				</box>
				<textElement textAlignment="Right" verticalAlignment="Middle" rotation="None">
					<font fontName="SansSerif" size="10" isBold="false" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfFontName="Helvetica" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
					<paragraph lineSpacing="Single"/>
				</textElement>
				<textFieldExpression><![CDATA[com.unicenta.format.Formats.TIMESTAMP.formatValue((java.util.Date)((Object[])((Object[])$P{ARG})[0])[1])]]></textFieldExpression>
			</textField>
			<textField pattern="" isBlankWhenNull="true">
				<reportElement key="textField-9" mode="Transparent" x="170" y="33" width="110" height="15" uuid="4f45c37e-1582-4440-9795-ff3adac2c8f8"/>
				<box>
					<topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
					<leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
					<bottomPen lineWidth="0.0" lineColor="#000000"/>
					<rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#FFFFFF"/>
				</box>
				<textElement textAlignment="Left" verticalAlignment="Middle" rotation="None">
					<font fontName="SansSerif" size="10" isBold="false" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfFontName="Helvetica" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
					<paragraph lineSpacing="Single"/>
				</textElement>
				<textFieldExpression><![CDATA[com.unicenta.format.Formats.TIMESTAMP.formatValue((java.util.Date)((Object[])((Object[])$P{ARG})[0])[3])]]></textFieldExpression>
			</textField>
			<rectangle radius="5">
				<reportElement key="rectangle-1" mode="Opaque" x="0" y="50" width="782" height="2" forecolor="#33CCFF" backcolor="#33CCFF" uuid="d83f73b6-53ac-42a4-a91b-3d5bd3f3bb5f"/>
				<graphicElement fill="Solid">
					<pen lineWidth="0.25" lineStyle="Solid"/>
				</graphicElement>
			</rectangle>
			<textField evaluationTime="Report" pattern="dd/MM/yyyy h.mm a" isBlankWhenNull="false">
				<reportElement key="textField" x="647" y="14" width="135" height="15" uuid="4f3dde59-4ec3-45f1-8f48-b5d6205e5b09"/>
				<textElement textAlignment="Right">
					<font fontName="SansSerif" size="10"/>
				</textElement>
				<textFieldExpression><![CDATA[new java.util.Date()]]></textFieldExpression>
			</textField>
			<textField pattern="" isBlankWhenNull="false">
				<reportElement key="textField-19" mode="Opaque" x="0" y="33" width="50" height="15" forecolor="#000000" backcolor="#FFFFFF" uuid="8eb3d3f7-d7ab-4410-b1e9-7afc0c94a174"/>
				<box>
					<topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
					<leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
					<bottomPen lineWidth="0.0" lineColor="#000000"/>
					<rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
				</box>
				<textElement textAlignment="Left" verticalAlignment="Middle" rotation="None">
					<font fontName="SansSerif" size="10" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfFontName="Helvetica-Bold" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
					<paragraph lineSpacing="Single"/>
				</textElement>
				<textFieldExpression><![CDATA[$R{label.period}]]></textFieldExpression>
			</textField>
			<textField pattern="" isBlankWhenNull="false">
				<reportElement key="textField-printed" mode="Opaque" x="647" y="0" width="135" height="15" forecolor="#000000" backcolor="#FFFFFF" uuid="e5d00830-cf6e-4d55-a80f-6334da1999d5"/>
				<box>
					<topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
					<leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
					<bottomPen lineWidth="0.0" lineColor="#000000"/>
					<rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
				</box>
				<textElement textAlignment="Right" verticalAlignment="Top" rotation="None">
					<font fontName="SansSerif" size="10" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfFontName="Helvetica-Bold" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
					<paragraph lineSpacing="Single"/>
				</textElement>
				<textFieldExpression><![CDATA[$R{label.printed}]]></textFieldExpression>
			</textField>
		</band>
	</pageHeader>
	<pageFooter>
		<band height="30" splitType="Stretch">
			<staticText>
				<reportElement key="staticText-5" mode="Opaque" x="749" y="10" width="10" height="15" forecolor="#000000" backcolor="#FFFFFF" uuid="ff2e30b6-21a5-43be-b404-9d4a2664eb55"/>
				<box>
					<topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
					<leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
					<bottomPen lineWidth="0.0" lineColor="#000000"/>
					<rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#FFFFFF"/>
				</box>
				<textElement textAlignment="Center" verticalAlignment="Top" rotation="None">
					<font fontName="SansSerif" size="10" isBold="false" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfFontName="Helvetica" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
					<paragraph lineSpacing="Single"/>
				</textElement>
				<text><![CDATA[/]]></text>
			</staticText>
			<line>
				<reportElement key="line-3" mode="Opaque" x="0" y="5" width="782" height="1" forecolor="#000000" backcolor="#FFFFFF" uuid="c3a6b3a2-3d23-4ab6-b9ee-3c3152e6f01f"/>
				<graphicElement fill="Solid">
					<pen lineWidth="0.25" lineStyle="Solid"/>
				</graphicElement>
			</line>
			<textField pattern="" isBlankWhenNull="false">
				<reportElement key="textField-6" mode="Opaque" x="729" y="10" width="20" height="15" forecolor="#000000" backcolor="#FFFFFF" uuid="e74532d6-1b7b-443a-9892-8ce12e51bfb3"/>
				<box>
					<topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
					<leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
					<bottomPen lineWidth="0.0" lineColor="#000000"/>
					<rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#FFFFFF"/>
				</box>
				<textElement textAlignment="Right" verticalAlignment="Top" rotation="None">
					<font fontName="SansSerif" size="10" isBold="false" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfFontName="Helvetica" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
					<paragraph lineSpacing="Single"/>
				</textElement>
				<textFieldExpression><![CDATA[$V{PAGE_NUMBER}]]></textFieldExpression>
			</textField>
			<textField evaluationTime="Report" pattern="" isBlankWhenNull="false">
				<reportElement key="textField-7" mode="Opaque" x="760" y="10" width="20" height="15" forecolor="#000000" backcolor="#FFFFFF" uuid="f05d38c1-39c0-4a49-97c3-707ce5e7236d"/>
				<box>
					<topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
					<leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
					<bottomPen lineWidth="0.0" lineColor="#000000"/>
					<rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#FFFFFF"/>
				</box>
				<textElement textAlignment="Left" verticalAlignment="Top" rotation="None">
					<font fontName="SansSerif" size="10" isBold="false" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfFontName="Helvetica" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
					<paragraph lineSpacing="Single"/>
				</textElement>
				<textFieldExpression><![CDATA[$V{PAGE_NUMBER}]]></textFieldExpression>
			</textField>
			<staticText>
				<reportElement x="0" y="10" width="139" height="15" uuid="e7722f7c-6a7e-4ab4-bd99-82481668943a"/>
				<textElement>
					<font fontName="SansSerif" size="8"/>
				</textElement>
				<text><![CDATA[rpt:sales_chart_timeseriesproduct]]></text>
			</staticText>
		</band>
	</pageFooter>
	<summary>
		<band height="390">
			<textField pattern="###0">
				<reportElement x="280" y="342" width="100" height="20" uuid="bb926352-5a8f-4e2b-8ff4-b0e2e360dd3a"/>
				<textElement verticalAlignment="Middle"/>
				<textFieldExpression><![CDATA[$V{unitssold_2}]]></textFieldExpression>
			</textField>
			<textField>
				<reportElement x="499" y="342" width="100" height="20" uuid="5fc36109-2562-461d-ac43-7395b100568e"/>
				<textElement verticalAlignment="Middle"/>
				<textFieldExpression><![CDATA[$V{datesold_1}]]></textFieldExpression>
			</textField>
			<textField pattern="" isBlankWhenNull="false">
				<reportElement key="textField-dayscount" mode="Opaque" x="171" y="342" width="100" height="20" forecolor="#000000" backcolor="#FFFFFF" uuid="3707efbb-c216-478f-a755-6bd902d08622"/>
				<box>
					<topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
					<leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
					<bottomPen lineWidth="0.0" lineColor="#000000"/>
					<rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
				</box>
				<textElement textAlignment="Right" verticalAlignment="Middle" rotation="None">
					<font fontName="SansSerif" size="12" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfFontName="Helvetica-Bold" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
					<paragraph lineSpacing="Single"/>
				</textElement>
				<textFieldExpression><![CDATA[$R{label.periodsales}]]></textFieldExpression>
			</textField>
			<textField pattern="" isBlankWhenNull="false">
				<reportElement key="textField-19" mode="Opaque" x="390" y="342" width="100" height="20" forecolor="#000000" backcolor="#FFFFFF" uuid="8376c946-daa1-4124-885c-a6c3691f0d4a"/>
				<box>
					<topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
					<leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
					<bottomPen lineWidth="0.0" lineColor="#000000"/>
					<rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
				</box>
				<textElement textAlignment="Right" verticalAlignment="Middle" rotation="None">
					<font fontName="SansSerif" size="12" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfFontName="Helvetica-Bold" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
					<paragraph lineSpacing="Single"/>
				</textElement>
				<textFieldExpression><![CDATA[$R{label.periodcount}]]></textFieldExpression>
			</textField>
			<timeSeriesChart>
				<chart isShowLegend="true" evaluationTime="Report">
					<reportElement isPrintRepeatedValues="false" x="10" y="11" width="760" height="317" uuid="71e63cd2-a36c-46ea-9c99-bf7622a1b1c3"/>
					<chartTitle position="Top"/>
					<chartSubtitle/>
					<chartLegend/>
				</chart>
				<timeSeriesDataset>
					<timeSeries>
						<seriesExpression><![CDATA[$F{prodname}]]></seriesExpression>
						<timePeriodExpression><![CDATA[$F{datestamp}]]></timePeriodExpression>
						<valueExpression><![CDATA[$F{unitssold}]]></valueExpression>
					</timeSeries>
				</timeSeriesDataset>
				<timeSeriesPlot>
					<plot>
						<seriesColor seriesOrder="0" color="#33CCFF"/>
						<seriesColor seriesOrder="1" color="#E9CDA2"/>
						<seriesColor seriesOrder="2" color="#8B9046"/>
						<seriesColor seriesOrder="3" color="#A6C756"/>
						<seriesColor seriesOrder="4" color="#F99518"/>
						<seriesColor seriesOrder="5" color="#698B0F"/>
						<seriesColor seriesOrder="6" color="#3543BC"/>
						<seriesColor seriesOrder="7" color="#3569C4"/>
						<seriesColor seriesOrder="8" color="#829973"/>
						<seriesColor seriesOrder="9" color="#D0C78F"/>
						<seriesColor seriesOrder="10" color="#1B99EE"/>
						<seriesColor seriesOrder="11" color="#62E4EC"/>
						<seriesColor seriesOrder="12" color="#5C3C7C"/>
						<seriesColor seriesOrder="13" color="#B49672"/>
						<seriesColor seriesOrder="14" color="#530A6D"/>
						<seriesColor seriesOrder="15" color="#55C11A"/>
						<seriesColor seriesOrder="16" color="#6DA654"/>
					</plot>
					<timeAxisFormat>
						<axisFormat/>
					</timeAxisFormat>
					<valueAxisFormat>
						<axisFormat/>
					</valueAxisFormat>
				</timeSeriesPlot>
			</timeSeriesChart>
		</band>
	</summary>
</jasperReport>
