src/org/openbravo/erpCommon/ad_reports/ReportInvoiceDiscountJR.jrxml
author David Baz Fayos <david.baz@openbravo.com>
Tue, 27 May 2008 15:26:10 +0000
changeset 1044 8691bbc94032
parent 726 dac2a1486bd3
child 1868 b462ce988fa2
permissions -rw-r--r--
Removed old frame parameter of windowTableId
<?xml version="1.0" encoding="UTF-8"  ?>
<!-- Created with iReport - A designer for JasperReports -->
<!DOCTYPE jasperReport PUBLIC "//JasperReports//DTD Report Design//EN" "http://jasperreports.sourceforge.net/dtds/jasperreport.dtd">
<jasperReport
		 name="ReportInvoiceDiscountJR"
		 columnCount="1"
		 printOrder="Vertical"
		 orientation="Portrait"
		 pageWidth="595"
		 pageHeight="842"
		 columnWidth="535"
		 columnSpacing="0"
		 leftMargin="30"
		 rightMargin="30"
		 topMargin="20"
		 bottomMargin="20"
		 whenNoDataType="NoPages"
		 isTitleNewPage="false"
		 isSummaryNewPage="false">
	<property name="ireport.scriptlethandling" value="0" />
	<property name="ireport.encoding" value="UTF-8" />
	<import value="java.util.*" />
	<import value="net.sf.jasperreports.engine.*" />
	<import value="net.sf.jasperreports.engine.data.*" />

	<style 
		name="default"
		isDefault="false"
		vAlign="Middle"
		fontName="Bitstream Vera Sans"
		fontSize="10"
	/>
	<style 
		name="Report_Title"
		isDefault="false"
		leftPadding="5"
		fontName="Bitstream Vera Sans"
		fontSize="18"
	/>
	<style 
		name="Report_Subtitle"
		isDefault="false"
		forecolor="#555555"
		leftPadding="5"
		fontName="Bitstream Vera Sans"
		fontSize="14"
	/>
	<style 
		name="Total_Field"
		isDefault="false"
		mode="Opaque"
		forecolor="#000000"
		backcolor="#CCCCCC"
		vAlign="Middle"
		leftPadding="5"
	/>
	<style 
		name="Detail_Header"
		isDefault="false"
		mode="Opaque"
		forecolor="#FFFFFF"
		backcolor="#555555"
		vAlign="Middle"
		leftBorder="1Point"
		leftBorderColor="#FFFFFF"
		leftPadding="5"
		rightBorder="1Point"
		rightBorderColor="#FFFFFF"
	/>
	<style 
		name="GroupHeader_DarkGray"
		isDefault="false"
		mode="Opaque"
		forecolor="#FFFFFF"
		backcolor="#555555"
		vAlign="Middle"
		leftPadding="5"
		fontName="Bitstream Vera Sans"
		fontSize="14"
	/>
	<style 
		name="GroupHeader_Gray"
		isDefault="false"
		mode="Opaque"
		backcolor="#999999"
	/>
	<style 
		name="Detail_Line"
		isDefault="false"
	>

		<conditionalStyle>
			<conditionExpression><![CDATA[new Boolean($V{NAME_COUNT}.intValue()%2==1)]]></conditionExpression>
			<style 
				name="Detail_Line"
				isDefault="false"
				mode="Opaque"
				backcolor="#CCCCCC"
			/>
		</conditionalStyle>
	</style>
	<style 
		name="Total_Gray"
		isDefault="false"
		mode="Opaque"
		forecolor="#000000"
		backcolor="#CCCCCC"
	/>

	<parameter name="ATTACH" isForPrompting="false" class="java.lang.String"/>
	<parameter name="BASE_WEB" isForPrompting="false" class="java.lang.String"/>
	<parameter name="BASE_DESIGN" isForPrompting="false" class="java.lang.String"/>
	<parameter name="LANGUAGE" isForPrompting="false" class="java.lang.String">
		<defaultValueExpression ><![CDATA["en_US"]]></defaultValueExpression>
	</parameter>
	<parameter name="USER_CLIENT" isForPrompting="false" class="java.lang.String">
		<defaultValueExpression ><![CDATA["(1000000)"]]></defaultValueExpression>
	</parameter>
	<parameter name="USER_ORG" isForPrompting="false" class="java.lang.String">
		<defaultValueExpression ><![CDATA["(0)"]]></defaultValueExpression>
	</parameter>
	<parameter name="REPORT_TITLE" isForPrompting="false" class="java.lang.String">
		<defaultValueExpression ><![CDATA["REPORT TITLE"]]></defaultValueExpression>
	</parameter>
	<parameter name="REPORT_SUBTITLE" isForPrompting="false" class="java.lang.String"/>
	<parameter name="NUMBERFORMAT" isForPrompting="false" class="java.text.DecimalFormat"/>
	<parameter name="LOCALE" isForPrompting="false" class="java.util.Locale"/>
	<queryString><![CDATA[SELECT C_BPARTNER_ID as ID, NAME, PRODUCTNAME, QTY,UOM, ROUND(TOTALLINE/QTY,3) AS PRICEACTUAL, TOTALLINE, ROUND(TOTALLINEDISCOUNT/QTY,3) AS REALPRICE, TOTALLINEDISCOUNT,
        (ROUND((ROUND(TOTALLINE/QTY,3)-ROUND(TOTALLINEDISCOUNT/QTY,3))/ROUND(TOTALLINE/QTY,3),2))*100 AS DISCOUNT,
        (CASE (ROUND((ROUND(TOTALLINE/QTY,3)-ROUND(TOTALLINEDISCOUNT/QTY,3))/ROUND(TOTALLINE/QTY,3),2))*100 WHEN 0 THEN 'DerechaMedio' ELSE 'BordesRojoClaro' END) AS CLASS_DESIGN,
        WEIGHT
        FROM (
        SELECT C_BPARTNER.C_BPARTNER_ID, C_BPARTNER.NAME, M_PRODUCT.NAME AS PRODUCTNAME, C_UOM.UOMSYMBOL AS UOM, SUM(C_INVOICELINE.QTYINVOICED) AS QTY, ROUND(SUM(LINENETAMT),2) AS TOTALLINE, 
        ROUND(SUM(LINENETAMT*(1-COALESCE(DISCOUNTPERUNIT,0))),2) AS TOTALLINEDISCOUNT, SUM(C_INVOICELINE.QTYINVOICED)*COALESCE(M_PRODUCT.WEIGHT,0) AS WEIGHT
        FROM C_INVOICELINE left join
          (SELECT C_INVOICE_ID, DISCOUNTLINES/(TOTALLINES+DISCOUNTLINES) AS DISCOUNTPERUNIT 
          FROM (SELECT I.C_INVOICE_ID, I.TOTALLINES, -SUM(LINENETAMT) AS DISCOUNTLINES FROM C_INVOICE I, C_INVOICELINE IL 
          WHERE I.C_INVOICE_ID = IL.C_INVOICE_ID 
          AND IL.C_INVOICE_DISCOUNT_ID IS NOT NULL 
          GROUP BY I.C_INVOICE_ID, I.TOTALLINES) BB) A on C_INVOICELINE.C_INVOICE_ID = A.C_INVOICE_ID
          left join C_INVOICE on C_INVOICELINE.C_INVOICE_ID = C_INVOICE.C_INVOICE_ID,
        M_PRODUCT, C_BPARTNER,  C_UOM
        WHERE  C_INVOICELINE.C_INVOICE_DISCOUNT_ID IS NULL
        AND C_INVOICELINE.M_PRODUCT_ID = M_PRODUCT.M_PRODUCT_ID
        AND M_PRODUCT.C_UOM_ID = C_UOM.C_UOM_ID
        AND C_INVOICE.C_BPARTNER_ID = C_BPARTNER.C_BPARTNER_ID
        AND C_INVOICE.ISSOTRX='Y'
	AND PRICEACTUAL<>0
	 GROUP BY C_BPARTNER.C_BPARTNER_ID, C_BPARTNER.NAME, M_PRODUCT.NAME, C_UOM.UOMSYMBOL, M_PRODUCT.WEIGHT) AA
        WHERE QTY<>0
	ORDER BY NAME]]></queryString>

	<field name="ID" class="java.math.BigDecimal"/>
	<field name="NAME" class="java.lang.String"/>
	<field name="PRODUCTNAME" class="java.lang.String"/>
	<field name="QTY" class="java.math.BigDecimal"/>
	<field name="UOM" class="java.lang.String"/>
	<field name="PRICEACTUAL" class="java.math.BigDecimal"/>
	<field name="TOTALLINE" class="java.math.BigDecimal"/>
	<field name="REALPRICE" class="java.math.BigDecimal"/>
	<field name="TOTALLINEDISCOUNT" class="java.math.BigDecimal"/>
	<field name="DISCOUNT" class="java.math.BigDecimal"/>
	<field name="CLASS_DESIGN" class="java.lang.String"/>
	<field name="WEIGHT" class="java.math.BigDecimal"/>

	<variable name="totalWeight" class="java.math.BigDecimal" resetType="Report" calculation="Sum">
		<variableExpression><![CDATA[$F{WEIGHT}]]></variableExpression>
	</variable>
	<variable name="totalLine" class="java.math.BigDecimal" resetType="Report" calculation="Sum">
		<variableExpression><![CDATA[$F{TOTALLINE}]]></variableExpression>
	</variable>
	<variable name="totalWeightDetail" class="java.math.BigDecimal" resetType="Group" resetGroup="NAME" calculation="Sum">
		<variableExpression><![CDATA[$F{WEIGHT}]]></variableExpression>
	</variable>
	<variable name="totalLineDetail" class="java.math.BigDecimal" resetType="Group" resetGroup="NAME" calculation="Sum">
		<variableExpression><![CDATA[$F{TOTALLINE}]]></variableExpression>
	</variable>
	<variable name="totalLineDiscountDetail" class="java.math.BigDecimal" resetType="Group" resetGroup="NAME" calculation="Sum">
		<variableExpression><![CDATA[$F{TOTALLINEDISCOUNT}]]></variableExpression>
	</variable>
	<variable name="totalLineDiscount" class="java.math.BigDecimal" resetType="Report" calculation="Sum">
		<variableExpression><![CDATA[$F{TOTALLINEDISCOUNT}]]></variableExpression>
	</variable>

		<group  name="NAME" >
			<groupExpression><![CDATA[$F{NAME}]]></groupExpression>
			<groupHeader>
			<band height="67"  isSplitAllowed="true" >
				<textField isStretchWithOverflow="true" pattern="" isBlankWhenNull="true" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						style="GroupHeader_DarkGray"
						x="0"
						y="0"
						width="535"
						height="23"
						key="textField"/>
					<box topBorder="None" topBorderColor="#000000" topPadding="2" leftBorder="None" leftBorderColor="#000000" leftPadding="5" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
					<textElement>
						<font fontName="Bitstream Vera Sans" pdfFontName="Helvetica"/>
					</textElement>
				<textFieldExpression   class="java.lang.String"><![CDATA[$F{NAME}]]></textFieldExpression>
				</textField>
				<line direction="TopDown">
					<reportElement
						x="0"
						y="23"
						width="0"
						height="44"
						forecolor="#555555"
						key="line-2"
						stretchType="RelativeToBandHeight"/>
					<graphicElement stretchType="RelativeToBandHeight" pen="2Point"/>
				</line>
				<line direction="TopDown">
					<reportElement
						x="535"
						y="0"
						width="0"
						height="67"
						forecolor="#555555"
						key="line-3"
						stretchType="RelativeToBandHeight"/>
					<graphicElement stretchType="RelativeToBandHeight" pen="2Point"/>
				</line>
				<staticText>
					<reportElement
						style="Detail_Header"
						mode="Opaque"
						x="331"
						y="50"
						width="57"
						height="16"
						key="element-90"/>
					<box topBorder="None" topBorderColor="#000000" leftBorder="1Point" leftBorderColor="#FFFFFF" leftPadding="5" rightBorder="1Point" rightBorderColor="#FFFFFF" rightPadding="2" bottomBorder="None" bottomBorderColor="#000000"/>
					<textElement textAlignment="Center">
						<font fontName="Bitstream Vera Sans"/>
					</textElement>
				<text><![CDATA[Amt.]]></text>
				</staticText>
				<staticText>
					<reportElement
						style="Detail_Header"
						x="444"
						y="50"
						width="57"
						height="16"
						key="element-90"/>
					<box topBorder="None" topBorderColor="#000000" leftBorder="1Point" leftBorderColor="#FFFFFF" leftPadding="5" rightBorder="1Point" rightBorderColor="#FFFFFF" rightPadding="2" bottomBorder="None" bottomBorderColor="#000000"/>
					<textElement textAlignment="Center">
						<font fontName="Bitstream Vera Sans"/>
					</textElement>
				<text><![CDATA[Real Amt.]]></text>
				</staticText>
				<staticText>
					<reportElement
						style="Detail_Header"
						x="3"
						y="50"
						width="142"
						height="16"
						key="element-90"/>
					<box topBorder="None" topBorderColor="#000000" leftBorder="1Point" leftBorderColor="#FFFFFF" leftPadding="5" rightBorder="1Point" rightBorderColor="#FFFFFF" rightPadding="2" bottomBorder="None" bottomBorderColor="#000000"/>
					<textElement>
						<font fontName="Bitstream Vera Sans"/>
					</textElement>
				<text><![CDATA[Article]]></text>
				</staticText>
				<staticText>
					<reportElement
						style="Detail_Header"
						x="145"
						y="50"
						width="45"
						height="16"
						key="element-90"/>
					<box topBorder="None" topBorderColor="#000000" leftBorder="1Point" leftBorderColor="#FFFFFF" leftPadding="5" rightBorder="1Point" rightBorderColor="#FFFFFF" rightPadding="2" bottomBorder="None" bottomBorderColor="#000000"/>
					<textElement textAlignment="Left">
						<font fontName="Bitstream Vera Sans"/>
					</textElement>
				<text><![CDATA[Quantity]]></text>
				</staticText>
				<staticText>
					<reportElement
						style="Detail_Header"
						x="190"
						y="50"
						width="27"
						height="16"
						key="element-90"/>
					<box topBorder="None" topBorderColor="#000000" leftBorder="1Point" leftBorderColor="#FFFFFF" leftPadding="5" rightBorder="1Point" rightBorderColor="#FFFFFF" rightPadding="2" bottomBorder="None" bottomBorderColor="#000000"/>
					<textElement>
						<font fontName="Bitstream Vera Sans"/>
					</textElement>
				<text><![CDATA[#]]></text>
				</staticText>
				<staticText>
					<reportElement
						style="Detail_Header"
						x="217"
						y="50"
						width="57"
						height="16"
						key="element-90"/>
					<box topBorder="None" topBorderColor="#000000" leftBorder="1Point" leftBorderColor="#FFFFFF" leftPadding="5" rightBorder="1Point" rightBorderColor="#FFFFFF" rightPadding="2" bottomBorder="None" bottomBorderColor="#000000"/>
					<textElement textAlignment="Left">
						<font fontName="Bitstream Vera Sans"/>
					</textElement>
				<text><![CDATA[Weight]]></text>
				</staticText>
				<staticText>
					<reportElement
						style="Detail_Header"
						x="274"
						y="50"
						width="57"
						height="16"
						key="element-90"/>
					<box topBorder="None" topBorderColor="#000000" leftBorder="1Point" leftBorderColor="#FFFFFF" leftPadding="5" rightBorder="1Point" rightBorderColor="#FFFFFF" rightPadding="2" bottomBorder="None" bottomBorderColor="#000000"/>
					<textElement>
						<font fontName="Bitstream Vera Sans"/>
					</textElement>
				<text><![CDATA[Avg. Pr.]]></text>
				</staticText>
				<staticText>
					<reportElement
						style="Detail_Header"
						x="501"
						y="50"
						width="33"
						height="16"
						key="element-90"/>
					<box topBorder="None" topBorderColor="#000000" leftBorder="1Point" leftBorderColor="#FFFFFF" leftPadding="5" rightBorder="1Point" rightBorderColor="#FFFFFF" rightPadding="2" bottomBorder="None" bottomBorderColor="#000000"/>
					<textElement textAlignment="Center">
						<font fontName="Bitstream Vera Sans"/>
					</textElement>
				<text><![CDATA[Disc.]]></text>
				</staticText>
				<staticText>
					<reportElement
						style="Detail_Header"
						x="388"
						y="50"
						width="56"
						height="16"
						key="element-90"/>
					<box topBorder="None" topBorderColor="#000000" leftBorder="1Point" leftBorderColor="#FFFFFF" leftPadding="5" rightBorder="1Point" rightBorderColor="#FFFFFF" rightPadding="2" bottomBorder="None" bottomBorderColor="#000000"/>
					<textElement textAlignment="Center">
						<font fontName="Bitstream Vera Sans"/>
					</textElement>
				<text><![CDATA[Avg. Net Pr.]]></text>
				</staticText>
			</band>
			</groupHeader>
			<groupFooter>
			<band height="30"  isSplitAllowed="true" >
				<elementGroup><!--  Start: 1 !-->
				<line direction="TopDown">
					<reportElement
						x="0"
						y="0"
						width="0"
						height="30"
						forecolor="#555555"
						key="line-32"
						stretchType="RelativeToBandHeight"/>
					<graphicElement stretchType="RelativeToBandHeight" pen="2Point"/>
				</line>
				</elementGroup><!-- End 1 !-->
				<line direction="TopDown">
					<reportElement
						x="535"
						y="0"
						width="0"
						height="30"
						forecolor="#555555"
						key="line-33"
						stretchType="RelativeToBandHeight"/>
					<graphicElement stretchType="RelativeToBandHeight" pen="2Point"/>
				</line>
				<line direction="TopDown">
					<reportElement
						x="1"
						y="29"
						width="534"
						height="0"
						forecolor="#555555"
						key="line-34"/>
					<graphicElement stretchType="NoStretch" pen="2Point"/>
				</line>
				<staticText>
					<reportElement
						style="GroupHeader_Gray"
						mode="Transparent"
						x="145"
						y="8"
						width="69"
						height="16"
						key="staticText-6"/>
					<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" leftPadding="5" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
					<textElement textAlignment="Right">
						<font fontName="Bitstream Vera Sans"/>
					</textElement>
				<text><![CDATA[Total:]]></text>
				</staticText>
				<textField isStretchWithOverflow="false" pattern="" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						style="Total_Gray"
						x="331"
						y="8"
						width="113"
						height="16"
						key="textField"/>
					<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
					<textElement>
						<font fontName="Bitstream Vera Sans"/>
					</textElement>
				<textFieldExpression   class="java.lang.String"><![CDATA[($V{totalLineDetail}!=null)?$P{NUMBERFORMAT}.format($V{totalLineDetail}):new String(" ")]]></textFieldExpression>
				</textField>
				<textField isStretchWithOverflow="false" pattern="" isBlankWhenNull="true" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						style="Total_Gray"
						x="217"
						y="8"
						width="114"
						height="16"
						key="textField"/>
					<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
					<textElement>
						<font fontName="Bitstream Vera Sans"/>
					</textElement>
				<textFieldExpression   class="java.lang.String"><![CDATA[($V{totalWeightDetail}!=null)?$P{NUMBERFORMAT}.format($V{totalWeightDetail}):new String(" ")]]></textFieldExpression>
				</textField>
				<textField isStretchWithOverflow="false" pattern="" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						style="Total_Gray"
						x="444"
						y="8"
						width="89"
						height="16"
						key="textField"/>
					<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
					<textElement>
						<font fontName="Bitstream Vera Sans"/>
					</textElement>
				<textFieldExpression   class="java.lang.String"><![CDATA[($V{totalLineDiscountDetail}!=null)?$P{NUMBERFORMAT}.format($V{totalLineDiscountDetail}):new String(" ")]]></textFieldExpression>
				</textField>
				<line direction="TopDown">
					<reportElement
						x="3"
						y="0"
						width="531"
						height="0"
						key="line-35"/>
					<graphicElement stretchType="NoStretch"/>
				</line>
			</band>
			</groupFooter>
		</group>
		<background>
			<band height="0"  isSplitAllowed="true" >
			</band>
		</background>
		<title>
			<band height="0"  isSplitAllowed="true" >
			</band>
		</title>
		<pageHeader>
			<band height="60"  isSplitAllowed="true" >
				<textField isStretchWithOverflow="true" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						style="Report_Title"
						mode="Transparent"
						x="0"
						y="7"
						width="535"
						height="30"
						key="textField"/>
					<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" leftPadding="5" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
					<textElement>
						<font fontName="Bitstream Vera Sans"/>
					</textElement>
				<textFieldExpression   class="java.lang.String"><![CDATA[$P{REPORT_TITLE}]]></textFieldExpression>
				</textField>
				<line direction="TopDown">
					<reportElement
						x="0"
						y="38"
						width="535"
						height="0"
						key="line-1"/>
					<graphicElement stretchType="NoStretch" pen="2Point"/>
				</line>
				<textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						x="0"
						y="39"
						width="535"
						height="21"
						key="textField"/>
					<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
					<textElement>
						<font fontName="Bitstream Vera Sans"/>
					</textElement>
				<textFieldExpression   class="java.lang.String"><![CDATA[$P{REPORT_SUBTITLE}]]></textFieldExpression>
				</textField>
			</band>
		</pageHeader>
		<columnHeader>
			<band height="20"  isSplitAllowed="true" >
			</band>
		</columnHeader>
		<detail>
			<band height="16"  isSplitAllowed="true" >
				<line direction="TopDown">
					<reportElement
						x="535"
						y="0"
						width="0"
						height="16"
						forecolor="#555555"
						key="line-16"
						stretchType="RelativeToBandHeight"/>
					<graphicElement stretchType="RelativeToBandHeight" pen="2Point"/>
				</line>
				<line direction="TopDown">
					<reportElement
						x="0"
						y="0"
						width="0"
						height="16"
						forecolor="#555555"
						key="line-17"
						stretchType="RelativeToBandHeight"/>
					<graphicElement stretchType="RelativeToBandHeight" pen="2Point"/>
				</line>
				<textField isStretchWithOverflow="false" pattern="" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						style="Detail_Line"
						x="332"
						y="0"
						width="57"
						height="16"
						key="textField"
						stretchType="RelativeToBandHeight"/>
					<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" leftPadding="2" rightBorder="1Point" rightBorderColor="#000000" rightPadding="2" bottomBorder="None" bottomBorderColor="#000000"/>
					<textElement textAlignment="Left" verticalAlignment="Middle">
						<font fontName="Bitstream Vera Sans"/>
					</textElement>
				<textFieldExpression   class="java.lang.String"><![CDATA[($F{TOTALLINE}!=null)?$P{NUMBERFORMAT}.format($F{TOTALLINE}):new String(" ")]]></textFieldExpression>
				</textField>
				<textField isStretchWithOverflow="false" pattern="" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						style="Detail_Line"
						x="445"
						y="0"
						width="56"
						height="16"
						key="textField"
						stretchType="RelativeToBandHeight"/>
					<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" leftPadding="2" rightBorder="1Point" rightBorderColor="#000000" rightPadding="2" bottomBorder="None" bottomBorderColor="#000000"/>
					<textElement textAlignment="Left" verticalAlignment="Middle">
						<font fontName="Bitstream Vera Sans"/>
					</textElement>
				<textFieldExpression   class="java.lang.String"><![CDATA[($F{TOTALLINEDISCOUNT}!=null)?$P{NUMBERFORMAT}.format($F{TOTALLINEDISCOUNT}):new String(" ")]]></textFieldExpression>
				</textField>
				<textField isStretchWithOverflow="true" pattern="" isBlankWhenNull="true" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						style="Detail_Line"
						x="3"
						y="0"
						width="142"
						height="16"
						key="textField"
						stretchType="RelativeToBandHeight"/>
					<box topBorder="None" topBorderColor="#000000" leftBorder="Thin" leftBorderColor="#000000" leftPadding="2" rightBorder="1Point" rightBorderColor="#000000" rightPadding="2" bottomBorder="None" bottomBorderColor="#000000"/>
					<textElement verticalAlignment="Middle">
						<font fontName="Bitstream Vera Sans"/>
					</textElement>
				<textFieldExpression   class="java.lang.String"><![CDATA[$F{PRODUCTNAME}]]></textFieldExpression>
				</textField>
				<textField isStretchWithOverflow="false" pattern="" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						style="Detail_Line"
						x="145"
						y="0"
						width="45"
						height="16"
						key="textField"
						stretchType="RelativeToBandHeight"/>
					<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" leftPadding="2" rightBorder="1Point" rightBorderColor="#000000" rightPadding="2" bottomBorder="None" bottomBorderColor="#000000"/>
					<textElement textAlignment="Left" verticalAlignment="Middle">
						<font fontName="Bitstream Vera Sans"/>
					</textElement>
				<textFieldExpression   class="java.lang.String"><![CDATA[($F{QTY}!=null)?$P{NUMBERFORMAT}.format($F{QTY}):new String(" ")]]></textFieldExpression>
				</textField>
				<textField isStretchWithOverflow="true" pattern="" isBlankWhenNull="true" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						style="Detail_Line"
						x="190"
						y="0"
						width="28"
						height="16"
						key="textField"
						stretchType="RelativeToBandHeight"/>
					<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" leftPadding="2" rightBorder="1Point" rightBorderColor="#000000" rightPadding="2" bottomBorder="None" bottomBorderColor="#000000"/>
					<textElement textAlignment="Left" verticalAlignment="Middle">
						<font fontName="Bitstream Vera Sans"/>
					</textElement>
				<textFieldExpression   class="java.lang.String"><![CDATA[$F{UOM}]]></textFieldExpression>
				</textField>
				<textField isStretchWithOverflow="false" pattern="" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						style="Detail_Line"
						x="218"
						y="0"
						width="57"
						height="16"
						key="textField"
						stretchType="RelativeToBandHeight"/>
					<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" leftPadding="2" rightBorder="1Point" rightBorderColor="#000000" rightPadding="2" bottomBorder="None" bottomBorderColor="#000000"/>
					<textElement textAlignment="Left" verticalAlignment="Middle">
						<font fontName="Bitstream Vera Sans"/>
					</textElement>
				<textFieldExpression   class="java.lang.String"><![CDATA[($F{WEIGHT}!=null)?$P{NUMBERFORMAT}.format($F{WEIGHT}):new String(" ")]]></textFieldExpression>
				</textField>
				<textField isStretchWithOverflow="false" pattern="" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						style="Detail_Line"
						x="275"
						y="0"
						width="57"
						height="16"
						key="textField"
						stretchType="RelativeToBandHeight"/>
					<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" leftPadding="2" rightBorder="1Point" rightBorderColor="#000000" rightPadding="2" bottomBorder="None" bottomBorderColor="#000000"/>
					<textElement textAlignment="Left" verticalAlignment="Middle">
						<font fontName="Bitstream Vera Sans"/>
					</textElement>
				<textFieldExpression   class="java.lang.String"><![CDATA[($F{PRICEACTUAL}!=null)?$P{NUMBERFORMAT}.format($F{PRICEACTUAL}):new String(" ")]]></textFieldExpression>
				</textField>
				<textField isStretchWithOverflow="false" pattern="" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						style="Detail_Line"
						x="501"
						y="0"
						width="33"
						height="16"
						key="textField"
						stretchType="RelativeToBandHeight"/>
					<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" leftPadding="2" rightBorder="1Point" rightBorderColor="#000000" rightPadding="2" bottomBorder="None" bottomBorderColor="#000000"/>
					<textElement textAlignment="Left" verticalAlignment="Middle">
						<font fontName="Bitstream Vera Sans"/>
					</textElement>
				<textFieldExpression   class="java.lang.String"><![CDATA[($F{DISCOUNT}!=null)?$P{NUMBERFORMAT}.format($F{DISCOUNT}):new String(" ")]]></textFieldExpression>
				</textField>
				<textField isStretchWithOverflow="false" pattern="" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						style="Detail_Line"
						mode="Opaque"
						x="389"
						y="0"
						width="56"
						height="16"
						key="textField"
						stretchType="RelativeToBandHeight"/>
					<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" leftPadding="2" rightBorder="1Point" rightBorderColor="#000000" rightPadding="2" bottomBorder="None" bottomBorderColor="#000000"/>
					<textElement textAlignment="Left" verticalAlignment="Middle">
						<font fontName="Bitstream Vera Sans"/>
					</textElement>
				<textFieldExpression   class="java.lang.String"><![CDATA[($F{REALPRICE}!=null)?$P{NUMBERFORMAT}.format($F{REALPRICE}):new String(" ")]]></textFieldExpression>
				</textField>
			</band>
		</detail>
		<columnFooter>
			<band height="16"  isSplitAllowed="true" >
			</band>
		</columnFooter>
		<pageFooter>
			<band height="27"  isSplitAllowed="true" >
				<textField isStretchWithOverflow="false" pattern="" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						x="400"
						y="4"
						width="95"
						height="19"
						key="textField"/>
					<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
					<textElement textAlignment="Right" verticalAlignment="Middle">
						<font fontName="Helvetica" size="10"/>
					</textElement>
				<textFieldExpression   class="java.lang.String"><![CDATA["Page " + $V{PAGE_NUMBER} + " of "]]></textFieldExpression>
				</textField>
				<textField isStretchWithOverflow="false" pattern="" isBlankWhenNull="false" evaluationTime="Report" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						x="499"
						y="4"
						width="36"
						height="19"
						forecolor="#000000"
						backcolor="#FFFFFF"
						key="textField"/>
					<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
					<textElement textAlignment="Left" verticalAlignment="Middle" rotation="None" lineSpacing="Single">
						<font fontName="Helvetica" pdfFontName="Helvetica" size="10" isBold="false" isItalic="false" isUnderline="false" isPdfEmbedded ="false" pdfEncoding ="CP1252" isStrikeThrough="false" />
					</textElement>
				<textFieldExpression   class="java.lang.String"><![CDATA["" + $V{PAGE_NUMBER}]]></textFieldExpression>
				</textField>
				<line direction="TopDown">
					<reportElement
						x="0"
						y="1"
						width="535"
						height="0"
						forecolor="#000000"
						key="line"/>
					<graphicElement stretchType="NoStretch" pen="2Point"/>
				</line>
				<textField isStretchWithOverflow="false" pattern="" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						x="277"
						y="4"
						width="69"
						height="19"
						key="textField"/>
					<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
					<textElement verticalAlignment="Middle">
						<font fontName="Times-Roman" size="10"/>
					</textElement>
				<textFieldExpression   class="java.util.Date"><![CDATA[new Date()]]></textFieldExpression>
				</textField>
				<staticText>
					<reportElement
						x="213"
						y="4"
						width="60"
						height="19"
						key="staticText-1"/>
					<box topBorder="None" topBorderColor="#000000" topPadding="2" leftBorder="None" leftBorderColor="#000000" leftPadding="5" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
					<textElement textAlignment="Right">
						<font/>
					</textElement>
				<text><![CDATA[Printed on]]></text>
				</staticText>
			</band>
		</pageFooter>
		<summary>
			<band height="28"  isSplitAllowed="true" >
				<staticText>
					<reportElement
						style="default"
						mode="Transparent"
						x="145"
						y="6"
						width="69"
						height="16"
						key="staticText-7"/>
					<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
					<textElement textAlignment="Right">
						<font fontName="Bitstream Vera Sans"/>
					</textElement>
				<text><![CDATA[Totals]]></text>
				</staticText>
				<textField isStretchWithOverflow="false" pattern="" isBlankWhenNull="false" evaluationTime="Report" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						style="Total_Gray"
						x="217"
						y="6"
						width="114"
						height="16"
						key="textField-2"/>
					<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
					<textElement textAlignment="Left">
						<font fontName="Bitstream Vera Sans"/>
					</textElement>
				<textFieldExpression   class="java.lang.String"><![CDATA[($V{totalWeight}!=null)?$P{NUMBERFORMAT}.format($V{totalWeight}):new String(" ")]]></textFieldExpression>
				</textField>
				<textField isStretchWithOverflow="false" pattern="" isBlankWhenNull="false" evaluationTime="Report" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						style="Total_Gray"
						x="331"
						y="6"
						width="113"
						height="16"
						key="textField-3"/>
					<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
					<textElement textAlignment="Left">
						<font fontName="Bitstream Vera Sans"/>
					</textElement>
				<textFieldExpression   class="java.lang.String"><![CDATA[($V{totalLine}!=null)?$P{NUMBERFORMAT}.format($V{totalLine}):new String(" ")]]></textFieldExpression>
				</textField>
				<textField isStretchWithOverflow="false" pattern="" isBlankWhenNull="false" evaluationTime="Report" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						style="Total_Gray"
						x="444"
						y="6"
						width="89"
						height="16"
						key="textField-4"/>
					<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
					<textElement textAlignment="Left">
						<font fontName="Bitstream Vera Sans"/>
					</textElement>
				<textFieldExpression   class="java.lang.String"><![CDATA[($V{totalLineDetail}!=null)?$P{NUMBERFORMAT}.format($V{totalLineDetail}):new String(" ")]]></textFieldExpression>
				</textField>
			</band>
		</summary>
</jasperReport>