src/org/openbravo/erpCommon/ad_reports/ReportSalesPartnerProduct.jrxml
author David Baz Fayos <david.baz@openbravo.com>
Tue, 27 May 2008 15:26:10 +0000
changeset 1044 8691bbc94032
parent 726 dac2a1486bd3
child 1605 8a0fe0193bef
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="ReportSalesPartnerProduct"
		 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.*" />

	<parameter name="LANGUAGE" isForPrompting="false" class="java.lang.String">
		<defaultValueExpression ><![CDATA["es_ES"]]></defaultValueExpression>
	</parameter>
	<parameter name="SUBREPORT_DIR" isForPrompting="false" class="java.lang.String">
		<defaultValueExpression ><![CDATA["/home/gorkaion/openbravo/jasperreports/"]]></defaultValueExpression>
	</parameter>
	<parameter name="BASE_DESIGN" isForPrompting="false" class="java.lang.String">
		<defaultValueExpression ><![CDATA["/usr/local/src/AppsOpenbravo/attachment/284-800172"]]></defaultValueExpression>
	</parameter>
	<parameter name="USER_CLIENT" 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 AD_COLUMN_IDENTIFIER(to_char('C_BPartner'), to_char(C_BPARTNER_ID), to_char($P{LANGUAGE})) AS PARTNER, C_BPARTNER_ID, sum(GRANDTOTAL) AS GRANDTOTAL, count(C_BPARTNER_ID) AS ORDERNO
FROM C_ORDER
WHERE ISSOTRX = 'Y'
  AND DOCSTATUS IN ('CO', 'CL')
  AND C_ORDER.AD_CLIENT_ID IN ($P!{USER_CLIENT})
GROUP BY C_BPARTNER_ID
ORDER BY ORDERNO DESC]]></queryString>

	<field name="PARTNER" class="java.lang.String"/>
	<field name="C_BPARTNER_ID" class="java.math.BigDecimal"/>
	<field name="GRANDTOTAL" class="java.math.BigDecimal"/>
	<field name="ORDERNO" class="java.math.BigDecimal"/>

		<background>
			<band height="0"  isSplitAllowed="true" >
			</band>
		</background>
		<title>
			<band height="50"  isSplitAllowed="true" >
				<staticText>
					<reportElement
						x="25"
						y="5"
						width="480"
						height="40"
						key="staticText"/>
					<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
					<textElement textAlignment="Center">
						<font size="28" isBold="true"/>
					</textElement>
				<text><![CDATA[Sales by Partner and Product]]></text>
				</staticText>
				<line direction="TopDown">
					<reportElement
						x="0"
						y="48"
						width="534"
						height="0"
						forecolor="#000000"
						key="line"
						positionType="FixRelativeToBottom"/>
					<graphicElement stretchType="NoStretch" pen="2Point"/>
				</line>
				<line direction="TopDown">
					<reportElement
						x="0"
						y="3"
						width="534"
						height="0"
						forecolor="#000000"
						key="line"/>
					<graphicElement stretchType="NoStretch" pen="2Point"/>
				</line>
			</band>
		</title>
		<pageHeader>
			<band height="9"  isSplitAllowed="true" >
			</band>
		</pageHeader>
		<columnHeader>
			<band height="20"  isSplitAllowed="true" >
				<rectangle radius="0" >
					<reportElement
						mode="Opaque"
						x="1"
						y="1"
						width="534"
						height="17"
						forecolor="#000000"
						backcolor="#999999"
						key="element-22"/>
					<graphicElement stretchType="NoStretch" pen="Thin"/>
				</rectangle>
				<staticText>
					<reportElement
						x="0"
						y="1"
						width="178"
						height="16"
						forecolor="#FFFFFF"
						key="element-90"/>
					<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" leftPadding="2" rightBorder="None" rightBorderColor="#000000" rightPadding="2" bottomBorder="None" bottomBorderColor="#000000"/>
					<textElement>
						<font fontName="" size="12"/>
					</textElement>
				<text><![CDATA[PARTNER]]></text>
				</staticText>
				<staticText>
					<reportElement
						x="178"
						y="1"
						width="178"
						height="16"
						forecolor="#FFFFFF"
						key="element-90"/>
					<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" leftPadding="2" rightBorder="None" rightBorderColor="#000000" rightPadding="2" bottomBorder="None" bottomBorderColor="#000000"/>
					<textElement>
						<font fontName="" size="12"/>
					</textElement>
				<text><![CDATA[GRAND TOTAL]]></text>
				</staticText>
				<staticText>
					<reportElement
						x="356"
						y="1"
						width="178"
						height="16"
						forecolor="#FFFFFF"
						key="element-90"/>
					<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" leftPadding="2" rightBorder="None" rightBorderColor="#000000" rightPadding="2" bottomBorder="None" bottomBorderColor="#000000"/>
					<textElement>
						<font fontName="" size="12"/>
					</textElement>
				<text><![CDATA[Number of Orders]]></text>
				</staticText>
			</band>
		</columnHeader>
		<detail>
			<band height="197"  isSplitAllowed="true" >
				<textField isStretchWithOverflow="true" pattern="" isBlankWhenNull="true" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						x="0"
						y="1"
						width="178"
						height="15"
						key="textField"/>
					<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" leftPadding="2" rightBorder="None" rightBorderColor="#000000" rightPadding="2" bottomBorder="None" bottomBorderColor="#000000"/>
					<textElement>
						<font fontName="Times-Roman" size="12"/>
					</textElement>
				<textFieldExpression   class="java.lang.String"><![CDATA[$F{PARTNER}]]></textFieldExpression>
				</textField>
				<textField isStretchWithOverflow="false" pattern="" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						x="178"
						y="1"
						width="178"
						height="15"
						key="textField"/>
					<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" leftPadding="2" rightBorder="None" rightBorderColor="#000000" rightPadding="2" bottomBorder="None" bottomBorderColor="#000000"/>
					<textElement textAlignment="Right">
						<font fontName="Times-Roman" size="12"/>
					</textElement>
				<textFieldExpression   class="java.lang.String"><![CDATA[($F{GRANDTOTAL}!=null)?$P{NUMBERFORMAT}.format($F{GRANDTOTAL}):new String(" ")]]></textFieldExpression>
				</textField>
				<textField isStretchWithOverflow="false" pattern="" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						x="356"
						y="1"
						width="178"
						height="15"
						key="textField"/>
					<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" leftPadding="2" rightBorder="None" rightBorderColor="#000000" rightPadding="2" bottomBorder="None" bottomBorderColor="#000000"/>
					<textElement textAlignment="Right">
						<font fontName="Times-Roman" size="12"/>
					</textElement>
				<textFieldExpression   class="java.lang.String"><![CDATA[($F{ORDERNO}!=null)?$P{NUMBERFORMAT}.format($F{ORDERNO}):new String(" ")]]></textFieldExpression>
				</textField>
				<subreport  isUsingCache="true">
					<reportElement
						x="31"
						y="17"
						width="452"
						height="173"
						key="subreport-1"/>
					<subreportParameter  name="PARTNER">
						<subreportParameterExpression><![CDATA[$F{C_BPARTNER_ID}]]></subreportParameterExpression>
					</subreportParameter>
					<subreportParameter  name="NUMBERFORMAT">
						<subreportParameterExpression><![CDATA[$P{NUMBERFORMAT}]]></subreportParameterExpression>
					</subreportParameter>
					<subreportParameter  name="LOCALE">
						<subreportParameterExpression><![CDATA[$P{LOCALE}]]></subreportParameterExpression>
					</subreportParameter>
					<connectionExpression><![CDATA[$P{REPORT_CONNECTION}]]></connectionExpression>
					<subreportExpression  class="java.lang.String"><![CDATA[$P{BASE_DESIGN} + "/org/openbravo/erpCommon/ad_reports/ReportSalesPartnerProduct_srpt.jasper"]]></subreportExpression>
				</subreport>
			</band>
		</detail>
		<columnFooter>
			<band height="0"  isSplitAllowed="true" >
			</band>
		</columnFooter>
		<pageFooter>
			<band height="27"  isSplitAllowed="true" >
				<textField isStretchWithOverflow="false" pattern="" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						x="325"
						y="4"
						width="170"
						height="19"
						key="textField"/>
					<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
					<textElement textAlignment="Right">
						<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="Top" 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="1"
						y="6"
						width="209"
						height="19"
						key="textField"/>
					<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
					<textElement>
						<font fontName="Times-Roman" size="10"/>
					</textElement>
				<textFieldExpression   class="java.util.Date"><![CDATA[new Date()]]></textFieldExpression>
				</textField>
			</band>
		</pageFooter>
		<summary>
			<band height="0"  isSplitAllowed="true" >
			</band>
		</summary>
</jasperReport>