<?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="Today Sales Order Type" pageWidth="612" pageHeight="792" 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"/>
	<queryString language="SQL">
		<![CDATA[SELECT SORDER.ORDER_TYPE, CUSTOMER.CUST_NAME, SUM(INVOICE_TRACE.NET_AMT) AS NET_AMT,DDF_GET_SITE_DESCR(INVOICE.SITE_CODE) AS SITE_DESCR FROM SORDER, INVOICE, INVOICE_TRACE, CUSTOMER WHERE INVOICE.TRAN_DATE = TRUNC(SYSDATE) AND INVOICE.CONFIRMED = 'Y' AND INVOICE_TRACE.INVOICE_ID = INVOICE.INVOICE_ID AND SORDER.SALE_ORDER = INVOICE_TRACE.SORD_NO AND CUSTOMER.CUST_CODE = INVOICE.CUST_CODE GROUP BY INVOICE.SITE_CODE, SORDER.ORDER_TYPE, CUSTOMER.CUST_NAME]]>
	</queryString>
	<field name="ORDER_TYPE" class="java.lang.String"/>
	<field name="CUST_NAME" class="java.lang.String"/>
	<field name="NET_AMT" class="java.lang.Double"/>
	<field name="SITE_DESCR" class="java.lang.String"/>
	<variable name="variable1" class="java.util.Date" resetType="None">
		<variableExpression><![CDATA[new java.util.Date()]]></variableExpression>
	</variable>
	<variable name="variable2" class="java.lang.Double" calculation="Sum">
		<variableExpression><![CDATA[new java.lang.Double($F{NET_AMT}.doubleValue())]]></variableExpression>
	</variable>
	<background>
		<band splitType="Stretch"/>
	</background>
	<pageHeader>
		<band height="79" splitType="Stretch">
			<staticText>
				<reportElement x="14" y="58" width="62" height="18"/>
				<textElement>
					<font fontName="Times New Roman" isBold="true"/>
				</textElement>
				<text><![CDATA[Order Type]]></text>
			</staticText>
			<staticText>
				<reportElement x="79" y="58" width="366" height="18"/>
				<textElement>
					<font fontName="Times New Roman" isBold="true"/>
				</textElement>
				<text><![CDATA[Customer Name]]></text>
			</staticText>
			<staticText>
				<reportElement x="455" y="58" width="100" height="18"/>
				<textElement textAlignment="Right">
					<font fontName="Times New Roman" isBold="true"/>
				</textElement>
				<text><![CDATA[Net Amount]]></text>
			</staticText>
			<line>
				<reportElement x="0" y="77" width="570" height="1"/>
			</line>
			<line>
				<reportElement x="0" y="55" width="570" height="1"/>
			</line>
			<staticText>
				<reportElement x="14" y="26" width="540" height="18"/>
				<textElement textAlignment="Center">
					<font fontName="Times New Roman" size="12" isBold="true"/>
				</textElement>
				<text><![CDATA[Today Sales Order Type]]></text>
			</staticText>
			<textField pattern="MM/dd/yy">
				<reportElement x="40" y="3" width="133" height="14"/>
				<textElement>
					<font fontName="Times New Roman"/>
				</textElement>
				<textFieldExpression class="java.util.Date"><![CDATA[$V{variable1}]]></textFieldExpression>
			</textField>
			<staticText>
				<reportElement x="10" y="3" width="28" height="14"/>
				<textElement>
					<font fontName="Times New Roman" isBold="true"/>
				</textElement>
				<text><![CDATA[Date:]]></text>
			</staticText>
			<staticText>
				<reportElement x="504" y="3" width="20" height="14"/>
				<textElement>
					<font fontName="Times New Roman" isBold="false"/>
				</textElement>
				<text><![CDATA[Page]]></text>
			</staticText>
			<staticText>
				<reportElement x="538" y="3" width="10" height="14"/>
				<textElement>
					<font fontName="Times New Roman" isBold="false"/>
				</textElement>
				<text><![CDATA[of]]></text>
			</staticText>
			<textField evaluationTime="Page">
				<reportElement x="526" y="3" width="13" height="14"/>
				<textElement>
					<font fontName="Times New Roman"/>
				</textElement>
				<textFieldExpression class="java.lang.Integer"><![CDATA[$V{PAGE_NUMBER}]]></textFieldExpression>
			</textField>
			<textField evaluationTime="Report">
				<reportElement x="551" y="3" width="15" height="14"/>
				<textElement>
					<font fontName="Times New Roman"/>
				</textElement>
				<textFieldExpression class="java.lang.Integer"><![CDATA[$V{PAGE_NUMBER}]]></textFieldExpression>
			</textField>
			<textField>
				<reportElement x="14" y="3" width="540" height="18"/>
				<textElement textAlignment="Center">
					<font fontName="Times New Roman" size="12" isBold="true"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{SITE_DESCR}]]></textFieldExpression>
			</textField>
		</band>
	</pageHeader>
	<detail>
		<band height="18" splitType="Stretch">
			<textField>
				<reportElement x="14" y="0" width="62" height="18"/>
				<textElement>
					<font fontName="Times New Roman"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{ORDER_TYPE}]]></textFieldExpression>
			</textField>
			<textField>
				<reportElement x="79" y="0" width="366" height="18"/>
				<textElement>
					<font fontName="Times New Roman"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{CUST_NAME}]]></textFieldExpression>
			</textField>
			<textField pattern="0.00">
				<reportElement x="455" y="0" width="100" height="18"/>
				<textElement textAlignment="Right">
					<font fontName="Times New Roman"/>
				</textElement>
				<textFieldExpression class="java.lang.Double"><![CDATA[$F{NET_AMT}]]></textFieldExpression>
			</textField>
		</band>
	</detail>
	<pageFooter>
		<band splitType="Stretch"/>
	</pageFooter>
	<summary>
		<band height="20" splitType="Stretch">
			<textField pattern="0.00">
				<reportElement x="455" y="2" width="100" height="18"/>
				<textElement textAlignment="Right">
					<font fontName="Times New Roman"/>
				</textElement>
				<textFieldExpression class="java.lang.Double"><![CDATA[$V{variable2}]]></textFieldExpression>
			</textField>
			<staticText>
				<reportElement x="349" y="2" width="96" height="18"/>
				<textElement>
					<font fontName="Times New Roman" isBold="true"/>
				</textElement>
				<text><![CDATA[Grand Total]]></text>
			</staticText>
			<line>
				<reportElement x="0" y="0" width="570" height="1"/>
			</line>
		</band>
	</summary>
</jasperReport>
