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
juanpablo@726
     1
<?xml version="1.0" encoding="UTF-8"  ?>
juanpablo@726
     2
<!-- Created with iReport - A designer for JasperReports -->
juanpablo@726
     3
<!DOCTYPE jasperReport PUBLIC "//JasperReports//DTD Report Design//EN" "http://jasperreports.sourceforge.net/dtds/jasperreport.dtd">
juanpablo@726
     4
<jasperReport
juanpablo@726
     5
		 name="ReportSalesPartnerProduct"
juanpablo@726
     6
		 columnCount="1"
juanpablo@726
     7
		 printOrder="Vertical"
juanpablo@726
     8
		 orientation="Portrait"
juanpablo@726
     9
		 pageWidth="595"
juanpablo@726
    10
		 pageHeight="842"
juanpablo@726
    11
		 columnWidth="535"
juanpablo@726
    12
		 columnSpacing="0"
juanpablo@726
    13
		 leftMargin="30"
juanpablo@726
    14
		 rightMargin="30"
juanpablo@726
    15
		 topMargin="20"
juanpablo@726
    16
		 bottomMargin="20"
juanpablo@726
    17
		 whenNoDataType="NoPages"
juanpablo@726
    18
		 isTitleNewPage="false"
juanpablo@726
    19
		 isSummaryNewPage="false">
juanpablo@726
    20
	<property name="ireport.scriptlethandling" value="0" />
juanpablo@726
    21
	<property name="ireport.encoding" value="UTF-8" />
juanpablo@726
    22
	<import value="java.util.*" />
juanpablo@726
    23
	<import value="net.sf.jasperreports.engine.*" />
juanpablo@726
    24
	<import value="net.sf.jasperreports.engine.data.*" />
juanpablo@726
    25
juanpablo@726
    26
	<parameter name="LANGUAGE" isForPrompting="false" class="java.lang.String">
juanpablo@726
    27
		<defaultValueExpression ><![CDATA["es_ES"]]></defaultValueExpression>
juanpablo@726
    28
	</parameter>
juanpablo@726
    29
	<parameter name="SUBREPORT_DIR" isForPrompting="false" class="java.lang.String">
juanpablo@726
    30
		<defaultValueExpression ><![CDATA["/home/gorkaion/openbravo/jasperreports/"]]></defaultValueExpression>
juanpablo@726
    31
	</parameter>
juanpablo@726
    32
	<parameter name="BASE_DESIGN" isForPrompting="false" class="java.lang.String">
juanpablo@726
    33
		<defaultValueExpression ><![CDATA["/usr/local/src/AppsOpenbravo/attachment/284-800172"]]></defaultValueExpression>
juanpablo@726
    34
	</parameter>
juanpablo@726
    35
	<parameter name="USER_CLIENT" isForPrompting="false" class="java.lang.String"/>
juanpablo@726
    36
	<parameter name="NUMBERFORMAT" isForPrompting="false" class="java.text.DecimalFormat"/>
juanpablo@726
    37
	<parameter name="LOCALE" isForPrompting="false" class="java.util.Locale"/>
carlos@0
    38
	<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
carlos@0
    39
FROM C_ORDER
carlos@0
    40
WHERE ISSOTRX = 'Y'
carlos@0
    41
  AND DOCSTATUS IN ('CO', 'CL')
carlos@0
    42
  AND C_ORDER.AD_CLIENT_ID IN ($P!{USER_CLIENT})
carlos@0
    43
GROUP BY C_BPARTNER_ID
juanpablo@726
    44
ORDER BY ORDERNO DESC]]></queryString>
juanpablo@726
    45
juanpablo@726
    46
	<field name="PARTNER" class="java.lang.String"/>
juanpablo@726
    47
	<field name="C_BPARTNER_ID" class="java.math.BigDecimal"/>
juanpablo@726
    48
	<field name="GRANDTOTAL" class="java.math.BigDecimal"/>
juanpablo@726
    49
	<field name="ORDERNO" class="java.math.BigDecimal"/>
juanpablo@726
    50
juanpablo@726
    51
		<background>
juanpablo@726
    52
			<band height="0"  isSplitAllowed="true" >
juanpablo@726
    53
			</band>
juanpablo@726
    54
		</background>
juanpablo@726
    55
		<title>
juanpablo@726
    56
			<band height="50"  isSplitAllowed="true" >
juanpablo@726
    57
				<staticText>
carlos@0
    58
					<reportElement
carlos@0
    59
						x="25"
carlos@0
    60
						y="5"
carlos@0
    61
						width="480"
carlos@0
    62
						height="40"
juanpablo@726
    63
						key="staticText"/>
juanpablo@726
    64
					<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
juanpablo@726
    65
					<textElement textAlignment="Center">
juanpablo@726
    66
						<font size="28" isBold="true"/>
juanpablo@726
    67
					</textElement>
juanpablo@726
    68
				<text><![CDATA[Sales by Partner and Product]]></text>
juanpablo@726
    69
				</staticText>
juanpablo@726
    70
				<line direction="TopDown">
carlos@0
    71
					<reportElement
carlos@0
    72
						x="0"
carlos@0
    73
						y="48"
carlos@0
    74
						width="534"
carlos@0
    75
						height="0"
carlos@0
    76
						forecolor="#000000"
carlos@0
    77
						key="line"
juanpablo@726
    78
						positionType="FixRelativeToBottom"/>
juanpablo@726
    79
					<graphicElement stretchType="NoStretch" pen="2Point"/>
juanpablo@726
    80
				</line>
juanpablo@726
    81
				<line direction="TopDown">
carlos@0
    82
					<reportElement
carlos@0
    83
						x="0"
carlos@0
    84
						y="3"
carlos@0
    85
						width="534"
carlos@0
    86
						height="0"
carlos@0
    87
						forecolor="#000000"
juanpablo@726
    88
						key="line"/>
juanpablo@726
    89
					<graphicElement stretchType="NoStretch" pen="2Point"/>
juanpablo@726
    90
				</line>
juanpablo@726
    91
			</band>
juanpablo@726
    92
		</title>
juanpablo@726
    93
		<pageHeader>
juanpablo@726
    94
			<band height="9"  isSplitAllowed="true" >
juanpablo@726
    95
			</band>
juanpablo@726
    96
		</pageHeader>
juanpablo@726
    97
		<columnHeader>
juanpablo@726
    98
			<band height="20"  isSplitAllowed="true" >
juanpablo@726
    99
				<rectangle radius="0" >
carlos@0
   100
					<reportElement
carlos@0
   101
						mode="Opaque"
carlos@0
   102
						x="1"
carlos@0
   103
						y="1"
carlos@0
   104
						width="534"
carlos@0
   105
						height="17"
carlos@0
   106
						forecolor="#000000"
carlos@0
   107
						backcolor="#999999"
juanpablo@726
   108
						key="element-22"/>
juanpablo@726
   109
					<graphicElement stretchType="NoStretch" pen="Thin"/>
juanpablo@726
   110
				</rectangle>
juanpablo@726
   111
				<staticText>
carlos@0
   112
					<reportElement
carlos@0
   113
						x="0"
carlos@0
   114
						y="1"
carlos@0
   115
						width="178"
carlos@0
   116
						height="16"
carlos@0
   117
						forecolor="#FFFFFF"
juanpablo@726
   118
						key="element-90"/>
juanpablo@726
   119
					<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" leftPadding="2" rightBorder="None" rightBorderColor="#000000" rightPadding="2" bottomBorder="None" bottomBorderColor="#000000"/>
juanpablo@726
   120
					<textElement>
juanpablo@726
   121
						<font fontName="" size="12"/>
juanpablo@726
   122
					</textElement>
juanpablo@726
   123
				<text><![CDATA[PARTNER]]></text>
juanpablo@726
   124
				</staticText>
juanpablo@726
   125
				<staticText>
carlos@0
   126
					<reportElement
carlos@0
   127
						x="178"
carlos@0
   128
						y="1"
carlos@0
   129
						width="178"
carlos@0
   130
						height="16"
carlos@0
   131
						forecolor="#FFFFFF"
juanpablo@726
   132
						key="element-90"/>
juanpablo@726
   133
					<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" leftPadding="2" rightBorder="None" rightBorderColor="#000000" rightPadding="2" bottomBorder="None" bottomBorderColor="#000000"/>
juanpablo@726
   134
					<textElement>
juanpablo@726
   135
						<font fontName="" size="12"/>
juanpablo@726
   136
					</textElement>
juanpablo@726
   137
				<text><![CDATA[GRAND TOTAL]]></text>
juanpablo@726
   138
				</staticText>
juanpablo@726
   139
				<staticText>
carlos@0
   140
					<reportElement
carlos@0
   141
						x="356"
carlos@0
   142
						y="1"
carlos@0
   143
						width="178"
carlos@0
   144
						height="16"
carlos@0
   145
						forecolor="#FFFFFF"
juanpablo@726
   146
						key="element-90"/>
juanpablo@726
   147
					<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" leftPadding="2" rightBorder="None" rightBorderColor="#000000" rightPadding="2" bottomBorder="None" bottomBorderColor="#000000"/>
juanpablo@726
   148
					<textElement>
juanpablo@726
   149
						<font fontName="" size="12"/>
juanpablo@726
   150
					</textElement>
juanpablo@726
   151
				<text><![CDATA[Number of Orders]]></text>
juanpablo@726
   152
				</staticText>
juanpablo@726
   153
			</band>
juanpablo@726
   154
		</columnHeader>
juanpablo@726
   155
		<detail>
juanpablo@726
   156
			<band height="197"  isSplitAllowed="true" >
juanpablo@726
   157
				<textField isStretchWithOverflow="true" pattern="" isBlankWhenNull="true" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
carlos@0
   158
					<reportElement
carlos@0
   159
						x="0"
carlos@0
   160
						y="1"
carlos@0
   161
						width="178"
carlos@0
   162
						height="15"
juanpablo@726
   163
						key="textField"/>
juanpablo@726
   164
					<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" leftPadding="2" rightBorder="None" rightBorderColor="#000000" rightPadding="2" bottomBorder="None" bottomBorderColor="#000000"/>
juanpablo@726
   165
					<textElement>
juanpablo@726
   166
						<font fontName="Times-Roman" size="12"/>
juanpablo@726
   167
					</textElement>
juanpablo@726
   168
				<textFieldExpression   class="java.lang.String"><![CDATA[$F{PARTNER}]]></textFieldExpression>
juanpablo@726
   169
				</textField>
juanpablo@726
   170
				<textField isStretchWithOverflow="false" pattern="" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
carlos@0
   171
					<reportElement
carlos@0
   172
						x="178"
carlos@0
   173
						y="1"
carlos@0
   174
						width="178"
carlos@0
   175
						height="15"
juanpablo@726
   176
						key="textField"/>
juanpablo@726
   177
					<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" leftPadding="2" rightBorder="None" rightBorderColor="#000000" rightPadding="2" bottomBorder="None" bottomBorderColor="#000000"/>
juanpablo@726
   178
					<textElement textAlignment="Right">
juanpablo@726
   179
						<font fontName="Times-Roman" size="12"/>
juanpablo@726
   180
					</textElement>
juanpablo@726
   181
				<textFieldExpression   class="java.lang.String"><![CDATA[($F{GRANDTOTAL}!=null)?$P{NUMBERFORMAT}.format($F{GRANDTOTAL}):new String(" ")]]></textFieldExpression>
juanpablo@726
   182
				</textField>
juanpablo@726
   183
				<textField isStretchWithOverflow="false" pattern="" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
carlos@0
   184
					<reportElement
carlos@0
   185
						x="356"
carlos@0
   186
						y="1"
carlos@0
   187
						width="178"
carlos@0
   188
						height="15"
juanpablo@726
   189
						key="textField"/>
juanpablo@726
   190
					<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" leftPadding="2" rightBorder="None" rightBorderColor="#000000" rightPadding="2" bottomBorder="None" bottomBorderColor="#000000"/>
juanpablo@726
   191
					<textElement textAlignment="Right">
juanpablo@726
   192
						<font fontName="Times-Roman" size="12"/>
juanpablo@726
   193
					</textElement>
juanpablo@726
   194
				<textFieldExpression   class="java.lang.String"><![CDATA[($F{ORDERNO}!=null)?$P{NUMBERFORMAT}.format($F{ORDERNO}):new String(" ")]]></textFieldExpression>
juanpablo@726
   195
				</textField>
juanpablo@726
   196
				<subreport  isUsingCache="true">
carlos@0
   197
					<reportElement
carlos@0
   198
						x="31"
carlos@0
   199
						y="17"
carlos@0
   200
						width="452"
carlos@0
   201
						height="173"
juanpablo@726
   202
						key="subreport-1"/>
juanpablo@726
   203
					<subreportParameter  name="PARTNER">
juanpablo@726
   204
						<subreportParameterExpression><![CDATA[$F{C_BPARTNER_ID}]]></subreportParameterExpression>
juanpablo@726
   205
					</subreportParameter>
juanpablo@726
   206
					<subreportParameter  name="NUMBERFORMAT">
juanpablo@726
   207
						<subreportParameterExpression><![CDATA[$P{NUMBERFORMAT}]]></subreportParameterExpression>
juanpablo@726
   208
					</subreportParameter>
juanpablo@726
   209
					<subreportParameter  name="LOCALE">
juanpablo@726
   210
						<subreportParameterExpression><![CDATA[$P{LOCALE}]]></subreportParameterExpression>
juanpablo@726
   211
					</subreportParameter>
juanpablo@726
   212
					<connectionExpression><![CDATA[$P{REPORT_CONNECTION}]]></connectionExpression>
juanpablo@726
   213
					<subreportExpression  class="java.lang.String"><![CDATA[$P{BASE_DESIGN} + "/org/openbravo/erpCommon/ad_reports/ReportSalesPartnerProduct_srpt.jasper"]]></subreportExpression>
juanpablo@726
   214
				</subreport>
juanpablo@726
   215
			</band>
juanpablo@726
   216
		</detail>
juanpablo@726
   217
		<columnFooter>
juanpablo@726
   218
			<band height="0"  isSplitAllowed="true" >
juanpablo@726
   219
			</band>
juanpablo@726
   220
		</columnFooter>
juanpablo@726
   221
		<pageFooter>
juanpablo@726
   222
			<band height="27"  isSplitAllowed="true" >
juanpablo@726
   223
				<textField isStretchWithOverflow="false" pattern="" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
carlos@0
   224
					<reportElement
carlos@0
   225
						x="325"
carlos@0
   226
						y="4"
carlos@0
   227
						width="170"
carlos@0
   228
						height="19"
juanpablo@726
   229
						key="textField"/>
juanpablo@726
   230
					<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
juanpablo@726
   231
					<textElement textAlignment="Right">
juanpablo@726
   232
						<font fontName="Helvetica" size="10"/>
juanpablo@726
   233
					</textElement>
juanpablo@726
   234
				<textFieldExpression   class="java.lang.String"><![CDATA["Page " + $V{PAGE_NUMBER} + " of "]]></textFieldExpression>
juanpablo@726
   235
				</textField>
juanpablo@726
   236
				<textField isStretchWithOverflow="false" pattern="" isBlankWhenNull="false" evaluationTime="Report" hyperlinkType="None"  hyperlinkTarget="Self" >
carlos@0
   237
					<reportElement
carlos@0
   238
						x="499"
carlos@0
   239
						y="4"
carlos@0
   240
						width="36"
carlos@0
   241
						height="19"
carlos@0
   242
						forecolor="#000000"
carlos@0
   243
						backcolor="#FFFFFF"
juanpablo@726
   244
						key="textField"/>
juanpablo@726
   245
					<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
juanpablo@726
   246
					<textElement textAlignment="Left" verticalAlignment="Top" rotation="None" lineSpacing="Single">
juanpablo@726
   247
						<font fontName="Helvetica" pdfFontName="Helvetica" size="10" isBold="false" isItalic="false" isUnderline="false" isPdfEmbedded ="false" pdfEncoding ="CP1252" isStrikeThrough="false" />
juanpablo@726
   248
					</textElement>
juanpablo@726
   249
				<textFieldExpression   class="java.lang.String"><![CDATA["" + $V{PAGE_NUMBER}]]></textFieldExpression>
juanpablo@726
   250
				</textField>
juanpablo@726
   251
				<line direction="TopDown">
carlos@0
   252
					<reportElement
carlos@0
   253
						x="0"
carlos@0
   254
						y="1"
carlos@0
   255
						width="535"
carlos@0
   256
						height="0"
carlos@0
   257
						forecolor="#000000"
juanpablo@726
   258
						key="line"/>
juanpablo@726
   259
					<graphicElement stretchType="NoStretch" pen="2Point"/>
juanpablo@726
   260
				</line>
juanpablo@726
   261
				<textField isStretchWithOverflow="false" pattern="" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
carlos@0
   262
					<reportElement
carlos@0
   263
						x="1"
carlos@0
   264
						y="6"
carlos@0
   265
						width="209"
carlos@0
   266
						height="19"
juanpablo@726
   267
						key="textField"/>
juanpablo@726
   268
					<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
juanpablo@726
   269
					<textElement>
juanpablo@726
   270
						<font fontName="Times-Roman" size="10"/>
juanpablo@726
   271
					</textElement>
juanpablo@726
   272
				<textFieldExpression   class="java.util.Date"><![CDATA[new Date()]]></textFieldExpression>
juanpablo@726
   273
				</textField>
juanpablo@726
   274
			</band>
juanpablo@726
   275
		</pageFooter>
juanpablo@726
   276
		<summary>
juanpablo@726
   277
			<band height="0"  isSplitAllowed="true" >
juanpablo@726
   278
			</band>
juanpablo@726
   279
		</summary>
juanpablo@726
   280
</jasperReport>