Fixes issue 26909 Feature request to add Quantity Totals to Sales Dimensional Report
authorRafa Roda Palacios <rafa.roda@ubiquads.com>
Thu, 19 Jun 2014 17:13:37 +0200
changeset 23847 13c24ba074a8
parent 23846 f94f08e02e3a
child 23848 c0af89e65732
Fixes issue 26909 Feature request to add Quantity Totals to Sales Dimensional Report
src/org/openbravo/erpCommon/ad_reports/WeightDimensionalComparative.jrxml
src/org/openbravo/erpCommon/ad_reports/WeightDimensionalNoComparative.jrxml
--- a/src/org/openbravo/erpCommon/ad_reports/WeightDimensionalComparative.jrxml	Thu Jun 19 16:16:59 2014 +0200
+++ b/src/org/openbravo/erpCommon/ad_reports/WeightDimensionalComparative.jrxml	Thu Jun 19 17:13:37 2014 +0200
@@ -269,6 +269,9 @@
 	<variable name="WEIGHTREF_SUM1" class="java.math.BigDecimal" resetType="Group" resetGroup="NIVEL1" calculation="Sum">
 		<variableExpression><![CDATA[$F{WEIGHTREF}]]></variableExpression>
 	</variable>
+	<variable name="QTY_TOTAL" class="java.math.BigDecimal" calculation="Sum">
+		<variableExpression><![CDATA[$F{QTY}]]></variableExpression>
+	</variable>
 	<variable name="QTY_SUM9" class="java.math.BigDecimal" resetType="Group" resetGroup="LEVEL9" calculation="Sum">
 		<variableExpression><![CDATA[$F{QTY}]]></variableExpression>
 		<initialValueExpression><![CDATA[new BigDecimal(0)]]></initialValueExpression>
@@ -301,6 +304,9 @@
 	<variable name="QTY_SUM1" class="java.math.BigDecimal" resetType="Group" resetGroup="NIVEL1" calculation="Sum">
 		<variableExpression><![CDATA[$F{QTY}]]></variableExpression>
 	</variable>
+	<variable name="QTYREF_TOTAL" class="java.math.BigDecimal" calculation="Sum">
+		<variableExpression><![CDATA[$F{QTYREF}]]></variableExpression>
+	</variable>
 	<variable name="QTYREF_SUM9" class="java.math.BigDecimal" resetType="Group" resetGroup="LEVEL9" calculation="Sum">
 		<variableExpression><![CDATA[$F{QTYREF}]]></variableExpression>
 	</variable>
@@ -625,6 +631,34 @@
 					</textElement>
 					<textFieldExpression class="java.lang.String"><![CDATA[($V{CONVAMT_PCT_T}!=null)?$P{NUMBERFORMAT}.format($V{CONVAMT_PCT_T}):new String(" ")]]></textFieldExpression>
 				</textField>
+				<textField evaluationTime="Report" pattern="" isBlankWhenNull="false">
+					<reportElement key="textField-100" style="Total_Field" x="630" y="2" width="65" height="18"/>
+					<box leftPadding="5">
+						<pen lineWidth="0.0"/>
+						<topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
+						<leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
+						<bottomPen lineWidth="0.0" lineColor="#000000"/>
+						<rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
+					</box>
+					<textElement textAlignment="Right">
+						<font size="8"/>
+					</textElement>
+					<textFieldExpression class="java.lang.String"><![CDATA[($V{QTYREF_TOTAL}!=null)?$P{NUMBERFORMAT}.format($V{QTYREF_TOTAL}):new String(" ")]]></textFieldExpression>
+				</textField>
+				<textField evaluationTime="Report" pattern="" isBlankWhenNull="false">
+					<reportElement key="textField-100" style="Total_Field" x="565" y="2" width="65" height="18"/>
+					<box leftPadding="5">
+						<pen lineWidth="0.0"/>
+						<topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
+						<leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
+						<bottomPen lineWidth="0.0" lineColor="#000000"/>
+						<rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
+					</box>
+					<textElement textAlignment="Right">
+						<font size="8"/>
+					</textElement>
+					<textFieldExpression class="java.lang.String"><![CDATA[($V{QTY_TOTAL}!=null)?$P{NUMBERFORMAT}.format($V{QTY_TOTAL}):new String(" ")]]></textFieldExpression>
+				</textField>
 				<textField isBlankWhenNull="true">
 					<reportElement key="textField-104" style="Detail_Header" mode="Opaque" x="0" y="2" width="15" height="18"/>
 					<box leftPadding="5">
--- a/src/org/openbravo/erpCommon/ad_reports/WeightDimensionalNoComparative.jrxml	Thu Jun 19 16:16:59 2014 +0200
+++ b/src/org/openbravo/erpCommon/ad_reports/WeightDimensionalNoComparative.jrxml	Thu Jun 19 17:13:37 2014 +0200
@@ -179,6 +179,9 @@
 	<field name="CONVSYM" class="java.lang.String"/>
 	<field name="CONVISOSYM" class="java.lang.String"/>
 	<field name="WSYMBOL" class="java.lang.String"/>
+	<variable name="QUANTITY_TOTAL" class="java.math.BigDecimal" calculation="Sum">
+		<variableExpression><![CDATA[$F{QTY}]]></variableExpression>
+	</variable>
 	<variable name="QTY_SUM9" class="java.math.BigDecimal" resetType="Group" resetGroup="LEVEL9" calculation="Sum">
 		<variableExpression><![CDATA[$F{QTY}]]></variableExpression>
 		<initialValueExpression><![CDATA[new BigDecimal(0)]]></initialValueExpression>
@@ -354,6 +357,18 @@
 					<textElement textAlignment="Center"/>
 					<textFieldExpression class="java.lang.String"><![CDATA[$F{CONVSYM}]]></textFieldExpression>
 				</textField>
+				<textField evaluationTime="Report" pattern="" isBlankWhenNull="false">
+					<reportElement key="textField-57" style="Total_Field" x="654" y="2" width="75" height="18"/>
+					<box leftPadding="5">
+						<pen lineWidth="0.0"/>
+						<topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
+						<leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
+						<bottomPen lineWidth="0.0" lineColor="#000000"/>
+						<rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
+					</box>
+					<textElement textAlignment="Right"/>
+					<textFieldExpression class="java.lang.String"><![CDATA[($V{QUANTITY_TOTAL}!=null)?$P{NUMBERFORMAT}.format($V{QUANTITY_TOTAL}):new String(" ")]]></textFieldExpression>
+				</textField>
 				<textField isBlankWhenNull="true">
 					<reportElement key="textField-97" style="Detail_Header" positionType="FixRelativeToBottom" x="0" y="2" width="15" height="18"/>
 					<box leftPadding="5">