Fixes Issue 31629:Debit and Credit values not shown when running General
authorAtul Gaware <atul.gaware@openbravo.com>
Mon, 30 Nov 2015 14:24:17 +0530
changeset 28108 6abe3000db92
parent 28107 d816f0fd4dd9
child 28109 953d9e609f21
Fixes Issue 31629:Debit and Credit values not shown when running General
Ledger Report in XLS format using Microsoft Office 2007

Used Numberformat parameter to format the numeric fields
src/org/openbravo/erpCommon/ad_reports/ReportGeneralLedgerExcel.jrxml
src/org/openbravo/erpCommon/ad_reports/ReportTrialBalanceExcel.jrxml
--- a/src/org/openbravo/erpCommon/ad_reports/ReportGeneralLedgerExcel.jrxml	Tue Nov 17 18:13:59 2015 +0100
+++ b/src/org/openbravo/erpCommon/ad_reports/ReportGeneralLedgerExcel.jrxml	Mon Nov 30 14:24:17 2015 +0530
@@ -350,7 +350,7 @@
 				<textElement textAlignment="Right">
 					<font size="8"/>
 				</textElement>
-				<textFieldExpression><![CDATA[$F{AMTACCTCR}]]></textFieldExpression>
+				<textFieldExpression><![CDATA[($F{AMTACCTCR}!=null)?$P{NUMBERFORMAT}.format($F{AMTACCTCR}):new String("0")]]></textFieldExpression>
 			</textField>
 			<textField pattern="" isBlankWhenNull="true">
 				<reportElement key="textField-21" stretchType="RelativeToBandHeight" x="350" y="0" width="80" height="13" uuid="61ebce32-48ca-4823-911f-c009e581b4e1"/>
@@ -363,7 +363,7 @@
 				<textElement textAlignment="Right">
 					<font size="8"/>
 				</textElement>
-				<textFieldExpression><![CDATA[$F{AMTACCTDR}]]></textFieldExpression>
+				<textFieldExpression><![CDATA[($F{AMTACCTDR}!=null)?$P{NUMBERFORMAT}.format($F{AMTACCTDR}):new String("0")]]></textFieldExpression>
 			</textField>
 			<textField pattern="dd/MM/yyyy" isBlankWhenNull="false">
 				<reportElement key="textField-22" stretchType="RelativeToBandHeight" x="280" y="0" width="70" height="13" uuid="5afdc4b7-edf6-4e06-960b-ca4914f50e5c"/>
--- a/src/org/openbravo/erpCommon/ad_reports/ReportTrialBalanceExcel.jrxml	Tue Nov 17 18:13:59 2015 +0100
+++ b/src/org/openbravo/erpCommon/ad_reports/ReportTrialBalanceExcel.jrxml	Mon Nov 30 14:24:17 2015 +0530
@@ -381,7 +381,7 @@
 				<textElement textAlignment="Right">
 					<font size="10"/>
 				</textElement>
-				<textFieldExpression><![CDATA[$F{SALDO_FINAL}]]></textFieldExpression>
+				<textFieldExpression><![CDATA[($F{SALDO_FINAL})!=null?$P{NUMBERFORMAT}.format($F{SALDO_FINAL}):new String(" ")]]></textFieldExpression>
 			</textField>
 			<textField pattern="" isBlankWhenNull="false">
 				<reportElement key="textField-20" stretchType="RelativeToBandHeight" x="460" y="0" width="85" height="13" uuid="ece58c00-da3b-409b-b21e-ef1e34ac0039"/>
@@ -394,7 +394,7 @@
 				<textElement textAlignment="Right">
 					<font size="10"/>
 				</textElement>
-				<textFieldExpression><![CDATA[$F{AMTACCTCR}]]></textFieldExpression>
+				<textFieldExpression><![CDATA[($F{AMTACCTCR})!=null?$P{NUMBERFORMAT}.format($F{AMTACCTCR}):new String(" ")]]></textFieldExpression>
 			</textField>
 			<textField pattern="" isBlankWhenNull="true">
 				<reportElement key="textField-21" stretchType="RelativeToBandHeight" x="375" y="0" width="85" height="13" uuid="66e1e5da-791a-421e-a4d7-bb3987eba601"/>
@@ -407,7 +407,7 @@
 				<textElement textAlignment="Right">
 					<font size="10"/>
 				</textElement>
-				<textFieldExpression><![CDATA[$F{AMTACCTDR}]]></textFieldExpression>
+				<textFieldExpression><![CDATA[($F{AMTACCTDR})!=null?$P{NUMBERFORMAT}.format($F{AMTACCTDR}):new String(" ")]]></textFieldExpression>
 			</textField>
 			<textField pattern="" isBlankWhenNull="false">
 				<reportElement key="textField-22" stretchType="RelativeToBandHeight" x="279" y="0" width="96" height="13" uuid="9fead840-b567-4904-925a-e1264cef905a"/>
@@ -420,7 +420,7 @@
 				<textElement textAlignment="Right">
 					<font size="10"/>
 				</textElement>
-				<textFieldExpression><![CDATA[$F{SALDO_INICIAL}]]></textFieldExpression>
+				<textFieldExpression><![CDATA[($F{SALDO_INICIAL})!=null?$P{NUMBERFORMAT}.format($F{SALDO_INICIAL}):new String(" ")]]></textFieldExpression>
 			</textField>
 			<textField isStretchWithOverflow="true" isBlankWhenNull="true">
 				<reportElement key="textField" stretchType="RelativeToBandHeight" x="641" y="0" width="189" height="13" uuid="9b147e4b-23d1-4eb4-9e35-ee119ae34967">