details: https://code.openbravo.com/erp/devel/pi/rev/aa39ede274e8 changeset: 23253:aa39ede274e8 user: Sandra Huguet <sandra.huguet <at> openbravo.com> date: Fri May 23 14:18:49 2014 +0200 summary: Fixed bug 26677: wrong format in balance sheet and P&L structure report
diffstat: src/org/openbravo/erpCommon/ad_reports/GeneralAccountingReports.java | 7 +- src/org/openbravo/erpCommon/ad_reports/GeneralAccountingReportsPDF.jrxml | 31 ++++++--- 2 files changed, 24 insertions(+), 14 deletions(-) diffs (105 lines): diff -r a5a7c2ccfba7 -r aa39ede274e8 src/org/openbravo/erpCommon/ad_reports/GeneralAccountingReports.java --- a/src/org/openbravo/erpCommon/ad_reports/GeneralAccountingReports.java Fri May 23 11:46:00 2014 +0200 +++ b/src/org/openbravo/erpCommon/ad_reports/GeneralAccountingReports.java Fri May 23 14:18:49 2014 +0200 @@ -291,25 +291,24 @@ parameters.put("pageNo", strPageNo); AccountTreeData[][] trees = new AccountTreeData[strGroups.length][]; - for (int i = 0; i < strGroups.length; i++) trees[i] = acct[i].getAccounts(); List<HashMap<String, String>> hashMapList = new ArrayList<HashMap<String, String>>(); for (int i = 0; i < trees.length; i++) { - for (int j = 0; j < trees[i].length; j++) { HashMap<String, String> hashMap = new HashMap<String, String>(); hashMap.put("elementLevel", trees[i][j].elementLevel); hashMap.put("name", trees[i][j].name); hashMap.put("qty", trees[i][j].qty); hashMap.put("qtyRef", trees[i][j].qtyRef); + hashMap.put("groupname", strGroups[i].name); + hashMap.put("pagebreak", strGroups[i].pagebreak); + hashMapList.add(hashMap); } - } - FieldProvider[] data = FieldProviderFactory.getFieldProviderArray(hashMapList); renderJR(vars, response, strReportName, "pdf", parameters, data, null); diff -r a5a7c2ccfba7 -r aa39ede274e8 src/org/openbravo/erpCommon/ad_reports/GeneralAccountingReportsPDF.jrxml --- a/src/org/openbravo/erpCommon/ad_reports/GeneralAccountingReportsPDF.jrxml Fri May 23 11:46:00 2014 +0200 +++ b/src/org/openbravo/erpCommon/ad_reports/GeneralAccountingReportsPDF.jrxml Fri May 23 14:18:49 2014 +0200 @@ -22,7 +22,7 @@ <style fontSize="10" isBold="false"/> </conditionalStyle> <conditionalStyle> - <conditionExpression><![CDATA[new Boolean($F{elementLevel} <= 4)]]></conditionExpression> + <conditionExpression><![CDATA[new Boolean($F{elementLevel} >= 4)]]></conditionExpression> <style fontSize="9" isBold="false"/> </conditionalStyle> </style> @@ -53,6 +53,17 @@ <field name="qty" class="java.math.BigDecimal"/> <field name="qtyRef" class="java.math.BigDecimal"/> <field name="elementLevel" class="java.lang.Integer"/> + <field name="groupname" class="java.lang.String"/> + <field name="pagebreak" class="java.lang.String"/> + <group name="group" isStartNewPage="true"> + <groupExpression><![CDATA[$F{groupname}]]></groupExpression> + <groupHeader> + <band/> + </groupHeader> + <groupFooter> + <band/> + </groupFooter> + </group> <background> <band splitType="Stretch"/> </background> @@ -162,13 +173,6 @@ <textFieldExpression class="java.lang.String"><![CDATA["Client N-1: "+ $P{companyName}+ " " +$P{agnoRef}]]></textFieldExpression> </textField> <textField> - <reportElement key="staticText-7" x="0" y="74" width="112" height="12"/> - <textElement markup="none"> - <font fontName="DejaVu Sans" size="9" isBold="false"/> - </textElement> - <textFieldExpression class="java.lang.String"><![CDATA[$P{principalTitle}]]></textFieldExpression> - </textField> - <textField> <reportElement key="staticText-7" x="211" y="84" width="112" height="11"/> <textElement markup="none"> <font fontName="DejaVu Sans" size="9" isBold="true"/> @@ -196,19 +200,26 @@ </textElement> <textFieldExpression class="java.lang.String"><![CDATA[$P{columnRef}]]></textFieldExpression> </textField> + <textField> + <reportElement key="staticText-7" x="0" y="74" width="229" height="12"/> + <textElement markup="none"> + <font fontName="DejaVu Sans" size="9" isBold="false"/> + </textElement> + <textFieldExpression class="java.lang.String"><![CDATA[$F{groupname}]]></textFieldExpression> + </textField> </band> </pageHeader> <columnHeader> <band splitType="Stretch"/> </columnHeader> <detail> - <band height="17" splitType="Stretch"> + <band height="15" splitType="Stretch"> <textField> <reportElement key="staticText-7" style="CustSatIndexMarkup" x="0" y="0" width="376" height="14"/> <textElement markup="none"> <font fontName="DejaVu Sans"/> </textElement> - <textFieldExpression class="java.lang.String"><![CDATA[$F{elementLevel}==4 ? " " + $F{name}: $F{elementLevel}==3 ? " " + $F{name}: $F{elementLevel}==2 ? " " + $F{name}:$F{name}]]></textFieldExpression> + <textFieldExpression class="java.lang.String"><![CDATA[$F{elementLevel}>=4 ? " " + $F{name}: $F{elementLevel}==3 ? " " + $F{name}: $F{elementLevel}==2 ? " " + $F{name}:$F{name}]]></textFieldExpression> </textField> <textField isBlankWhenNull="true"> <reportElement key="staticText-7" x="376" y="0" width="80" height="14"/> ------------------------------------------------------------------------------ "Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE Instantly run your Selenium tests across 300+ browser/OS combos. Get unparalleled scalability from the best Selenium testing platform available Simple to use. Nothing to install. Get started now for free." http://p.sf.net/sfu/SauceLabs _______________________________________________ Openbravo-commits mailing list Openbravo-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openbravo-commits