fixes issue 25047: Wrong label in ReportReconciliation.jrxml
authorCarlos Aristu <carlos.aristu@openbravo.com>
Tue, 08 Apr 2014 19:19:23 +0200
changeset 22889 4a57750631e2
parent 22888 dc59e523d1cb
child 22890 8552c3633a70
fixes issue 25047: Wrong label in ReportReconciliation.jrxml
modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_reports/ReportReconciliation.java
modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_reports/ReportReconciliation.jrxml
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_reports/ReportReconciliation.java	Tue Apr 08 16:15:40 2014 +0200
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_reports/ReportReconciliation.java	Tue Apr 08 19:19:23 2014 +0200
@@ -30,10 +30,7 @@
 import javax.servlet.http.HttpServletResponse;
 
 import net.sf.jasperreports.engine.JRException;
-import net.sf.jasperreports.engine.JasperCompileManager;
 import net.sf.jasperreports.engine.JasperReport;
-import net.sf.jasperreports.engine.design.JasperDesign;
-import net.sf.jasperreports.engine.xml.JRXmlLoader;
 
 import org.hibernate.criterion.ProjectionList;
 import org.hibernate.criterion.Projections;
@@ -45,6 +42,7 @@
 import org.openbravo.dal.core.OBContext;
 import org.openbravo.dal.service.OBCriteria;
 import org.openbravo.dal.service.OBDal;
+import org.openbravo.erpCommon.utility.Utility;
 import org.openbravo.model.financialmgmt.payment.FIN_BankStatement;
 import org.openbravo.model.financialmgmt.payment.FIN_BankStatementLine;
 import org.openbravo.model.financialmgmt.payment.FIN_FinaccTransaction;
@@ -109,18 +107,18 @@
     JasperReport subReportOutstandingDeposit;
     JasperReport subReportUnreconciledBankStatementLines;
     try {
-      JasperDesign jasperDesignLines = JRXmlLoader.load(strBaseDesign
-          + "/org/openbravo/advpaymentmngt/ad_reports/OutstandingPayment.jrxml");
-      subReportOutstandingPayment = JasperCompileManager.compileReport(jasperDesignLines);
+      subReportOutstandingPayment = Utility.getTranslatedJasperReport(this, strBaseDesign
+          + "/org/openbravo/advpaymentmngt/ad_reports/OutstandingPayment.jrxml",
+          vars.getLanguage(), strBaseDesign);
 
-      jasperDesignLines = JRXmlLoader.load(strBaseDesign
-          + "/org/openbravo/advpaymentmngt/ad_reports/OutstandingDeposit.jrxml");
-      subReportOutstandingDeposit = JasperCompileManager.compileReport(jasperDesignLines);
+      subReportOutstandingDeposit = Utility.getTranslatedJasperReport(this, strBaseDesign
+          + "/org/openbravo/advpaymentmngt/ad_reports/OutstandingDeposit.jrxml",
+          vars.getLanguage(), strBaseDesign);
 
-      jasperDesignLines = JRXmlLoader.load(strBaseDesign
-          + "/org/openbravo/advpaymentmngt/ad_reports/UnreconciledBankStatement.jrxml");
-      subReportUnreconciledBankStatementLines = JasperCompileManager
-          .compileReport(jasperDesignLines);
+      subReportUnreconciledBankStatementLines = Utility.getTranslatedJasperReport(this,
+          strBaseDesign
+              + "/org/openbravo/advpaymentmngt/ad_reports/UnreconciledBankStatement.jrxml",
+          vars.getLanguage(), strBaseDesign);
 
     } catch (JRException e) {
       throw new ServletException(e.getMessage());
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_reports/ReportReconciliation.jrxml	Tue Apr 08 16:15:40 2014 +0200
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_reports/ReportReconciliation.jrxml	Tue Apr 08 19:19:23 2014 +0200
@@ -177,7 +177,7 @@
 					<subreportExpression class="net.sf.jasperreports.engine.JasperReport"><![CDATA[$P{SUBREP_OUTPAYMENT}]]></subreportExpression>
 				</subreport>
 				<staticText>
-					<reportElement key="staticText-11" x="0" y="0" width="169" height="14" isRemoveLineWhenBlank="true"/>
+					<reportElement key="staticText-11" x="0" y="0" width="244" height="14" isRemoveLineWhenBlank="true"/>
 					<box leftPadding="5">
 						<topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
 						<leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
@@ -233,7 +233,7 @@
 					<subreportExpression class="net.sf.jasperreports.engine.JasperReport"><![CDATA[$P{SUBREP_OUTDEPOSIT}]]></subreportExpression>
 				</subreport>
 				<staticText>
-					<reportElement key="staticText-12" x="0" y="0" width="169" height="14" isRemoveLineWhenBlank="true"/>
+					<reportElement key="staticText-12" x="0" y="0" width="244" height="14" isRemoveLineWhenBlank="true"/>
 					<box leftPadding="5">
 						<topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
 						<leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>