<?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="parameters_and_variables" language="groovy" pageWidth="595" pageHeight="842" whenNoDataType="AllSectionsNoDetail" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20">
	<property name="ireport.zoom" value="1.0"/>
	<property name="ireport.x" value="0"/>
	<property name="ireport.y" value="0"/>
	<property name="ireport.callouts" value="##Thu Jan 21 15:56:08 CET 2010\ncallouts.4.text=Use the Sample Database (HSQLDB test) datasource to run this report.\nTo run the database, select Help &gt; Samples &gt; Run Sample Database.\ncallouts.4.bounds=24,344,220,78\ncallouts.1.text=FREIGHT_IN_REPORT is a variable used to sum the field FREIGHT.\ncallouts.3.pins=226,165;\ncallouts.3.bounds=396,125,150,75\ncallouts.2.text=FREIGHT_IN_REPORT is a variable used to sum the field FREIGHT. The variable value is reset for each page.\ncallouts.2.bounds=602,160,150,88\ncallouts.1.pins=563,295;\ncallouts.1.bounds=385,336,150,75\ncallouts.3.text=Country is a parameter. The value is provided by the user.\ncallouts.2.pins=554,253;"/>
	<parameter name="Country" class="java.lang.String">
		<parameterDescription><![CDATA[I.e. Italy]]></parameterDescription>
	</parameter>
	<queryString>
		<![CDATA[select * from orders where shipcountry like $P{Country}]]>
	</queryString>
	<field name="ORDERID" class="java.lang.Integer">
		<fieldDescription><![CDATA[]]></fieldDescription>
	</field>
	<field name="CUSTOMERID" class="java.lang.String">
		<fieldDescription><![CDATA[]]></fieldDescription>
	</field>
	<field name="EMPLOYEEID" class="java.lang.Integer">
		<fieldDescription><![CDATA[]]></fieldDescription>
	</field>
	<field name="ORDERDATE" class="java.sql.Timestamp">
		<fieldDescription><![CDATA[]]></fieldDescription>
	</field>
	<field name="REQUIREDDATE" class="java.sql.Timestamp">
		<fieldDescription><![CDATA[]]></fieldDescription>
	</field>
	<field name="SHIPPEDDATE" class="java.sql.Timestamp">
		<fieldDescription><![CDATA[]]></fieldDescription>
	</field>
	<field name="SHIPVIA" class="java.lang.Integer">
		<fieldDescription><![CDATA[]]></fieldDescription>
	</field>
	<field name="FREIGHT" class="java.math.BigDecimal">
		<fieldDescription><![CDATA[]]></fieldDescription>
	</field>
	<field name="SHIPNAME" class="java.lang.String">
		<fieldDescription><![CDATA[]]></fieldDescription>
	</field>
	<field name="SHIPADDRESS" class="java.lang.String">
		<fieldDescription><![CDATA[]]></fieldDescription>
	</field>
	<field name="SHIPCITY" class="java.lang.String">
		<fieldDescription><![CDATA[]]></fieldDescription>
	</field>
	<field name="SHIPREGION" class="java.lang.String">
		<fieldDescription><![CDATA[]]></fieldDescription>
	</field>
	<field name="SHIPPOSTALCODE" class="java.lang.String">
		<fieldDescription><![CDATA[]]></fieldDescription>
	</field>
	<field name="SHIPCOUNTRY" class="java.lang.String">
		<fieldDescription><![CDATA[]]></fieldDescription>
	</field>
	<variable name="FREIGHT_IN_PAGE" class="java.math.BigDecimal" resetType="Page" calculation="Sum">
		<variableExpression><![CDATA[$F{FREIGHT}]]></variableExpression>
	</variable>
	<variable name="FREIGHT_IN_REPORT" class="java.math.BigDecimal" calculation="Sum">
		<variableExpression><![CDATA[$F{FREIGHT}]]></variableExpression>
	</variable>
	<background>
		<band splitType="Stretch"/>
	</background>
	<title>
		<band height="188" splitType="Stretch">
			<staticText>
				<reportElement x="0" y="0" width="555" height="31"/>
				<textElement textAlignment="Center" verticalAlignment="Top">
					<font size="20" isBold="false"/>
				</textElement>
				<text><![CDATA[Parameters and Variables]]></text>
			</staticText>
			<staticText>
				<reportElement x="0" y="31" width="555" height="65"/>
				<textElement textAlignment="Justified" verticalAlignment="Top">
					<font size="14"/>
				</textElement>
				<text><![CDATA[Parameters are objects provided by the user that can be used inside the report in several ways, in example to filter a query or provide the url for an image.
Variables are used to perform calculations, like totals, counts, etc...]]></text>
			</staticText>
			<staticText>
				<reportElement x="0" y="118" width="100" height="19"/>
				<textElement/>
				<text><![CDATA[Orders for country:]]></text>
			</staticText>
			<textField>
				<reportElement x="0" y="137" width="228" height="39"/>
				<textElement>
					<font size="26"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$P{Country}]]></textFieldExpression>
			</textField>
		</band>
	</title>
	<pageHeader>
		<band splitType="Stretch"/>
	</pageHeader>
	<columnHeader>
		<band height="20" splitType="Stretch">
			<staticText>
				<reportElement x="281" y="0" width="158" height="20"/>
				<textElement markup="none">
					<font size="14" isBold="true"/>
				</textElement>
				<text><![CDATA[City]]></text>
			</staticText>
			<staticText>
				<reportElement x="100" y="0" width="171" height="20"/>
				<textElement markup="none">
					<font size="14" isBold="true"/>
				</textElement>
				<text><![CDATA[Name]]></text>
			</staticText>
			<staticText>
				<reportElement x="0" y="0" width="100" height="20"/>
				<textElement markup="none">
					<font size="14" isBold="true"/>
				</textElement>
				<text><![CDATA[Date]]></text>
			</staticText>
			<staticText>
				<reportElement x="455" y="0" width="100" height="20"/>
				<textElement markup="none">
					<font size="14" isBold="true"/>
				</textElement>
				<text><![CDATA[Freight]]></text>
			</staticText>
		</band>
	</columnHeader>
	<detail>
		<band height="29" splitType="Stretch">
			<textField>
				<reportElement x="0" y="2" width="100" height="20"/>
				<textElement>
					<font size="12"/>
				</textElement>
				<textFieldExpression class="java.sql.Timestamp"><![CDATA[$F{ORDERDATE}]]></textFieldExpression>
			</textField>
			<textField>
				<reportElement x="100" y="2" width="171" height="20"/>
				<textElement>
					<font size="12"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{SHIPNAME}]]></textFieldExpression>
			</textField>
			<textField>
				<reportElement x="281" y="2" width="158" height="20"/>
				<textElement>
					<font size="12"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{SHIPCITY}]]></textFieldExpression>
			</textField>
			<textField>
				<reportElement x="455" y="2" width="100" height="20"/>
				<textElement>
					<font size="12"/>
				</textElement>
				<textFieldExpression class="java.math.BigDecimal"><![CDATA[$F{FREIGHT}]]></textFieldExpression>
			</textField>
			<line>
				<reportElement x="0" y="24" width="555" height="1" forecolor="#CCCCCC"/>
			</line>
		</band>
	</detail>
	<columnFooter>
		<band splitType="Stretch"/>
	</columnFooter>
	<pageFooter>
		<band height="22" splitType="Stretch">
			<textField pattern="###0.00;-###0.00">
				<reportElement mode="Opaque" x="395" y="0" width="160" height="20" backcolor="#FFC9C9"/>
				<box leftPadding="4" rightPadding="4"/>
				<textElement>
					<font size="12"/>
				</textElement>
				<textFieldExpression class="java.math.BigDecimal"><![CDATA[$V{FREIGHT_IN_PAGE}]]></textFieldExpression>
			</textField>
			<staticText>
				<reportElement mode="Opaque" x="0" y="0" width="395" height="20" backcolor="#FFC9C9"/>
				<textElement textAlignment="Right">
					<font size="12"/>
				</textElement>
				<text><![CDATA[Total freight in this page:]]></text>
			</staticText>
		</band>
	</pageFooter>
	<summary>
		<band height="38" splitType="Stretch">
			<staticText>
				<reportElement mode="Opaque" x="0" y="10" width="395" height="20" backcolor="#E7CEAE"/>
				<textElement textAlignment="Right">
					<font size="12"/>
				</textElement>
				<text><![CDATA[Total freight in this report:]]></text>
			</staticText>
			<textField pattern="###0.00;-###0.00">
				<reportElement mode="Opaque" x="395" y="10" width="160" height="20" backcolor="#E7CEAE"/>
				<box leftPadding="4" rightPadding="4"/>
				<textElement>
					<font size="12"/>
				</textElement>
				<textFieldExpression class="java.math.BigDecimal"><![CDATA[$V{FREIGHT_IN_REPORT}]]></textFieldExpression>
			</textField>
		</band>
	</summary>
</jasperReport>
