This is an automated email from the git hooks/post-receive script. New commit to branch feature/newReportBuilder in repository lima. See http://git.chorem.org/lima.git commit b3a2a4fb533a149b76197d5dbf701a7db04ea457 Author: dcosse <japbiw74> Date: Thu Nov 20 11:43:51 2014 +0100 refs #769 ajout saut de page entre les différents journaux --- .../lima/business/ejb/EntryBookServiceImpl.java | 2 +- .../ProvisionalEntryBookReportServiceImpl.java | 9 +- .../provisionalEntryBook/EntryBookMainReport.jrxml | 98 +++++++++++++++++++++- .../provisionalEntryBook/EntryBookReport.jrxml | 10 ++- .../FinancialPeriodReport.jrxml | 7 +- 5 files changed, 117 insertions(+), 9 deletions(-) diff --git a/lima-business/src/main/java/org/chorem/lima/business/ejb/EntryBookServiceImpl.java b/lima-business/src/main/java/org/chorem/lima/business/ejb/EntryBookServiceImpl.java index 3425ccc..048ffa7 100644 --- a/lima-business/src/main/java/org/chorem/lima/business/ejb/EntryBookServiceImpl.java +++ b/lima-business/src/main/java/org/chorem/lima/business/ejb/EntryBookServiceImpl.java @@ -129,7 +129,7 @@ public class EntryBookServiceImpl extends AbstractLimaService implements EntryBo // check if entrybook with is name already exist EntryBookTopiaDao entryBookTopiaDao = getDaoHelper().getEntryBookDao(); - List<EntryBook> entryBooksList = entryBookTopiaDao.findAll(); + List<EntryBook> entryBooksList = entryBookTopiaDao.newQueryBuilder().setOrderByArguments(EntryBook.PROPERTY_CODE).findAll(); return entryBooksList; } diff --git a/lima-business/src/main/java/org/chorem/lima/business/ejb/report/ProvisionalEntryBookReportServiceImpl.java b/lima-business/src/main/java/org/chorem/lima/business/ejb/report/ProvisionalEntryBookReportServiceImpl.java index 233d946..beb9041 100644 --- a/lima-business/src/main/java/org/chorem/lima/business/ejb/report/ProvisionalEntryBookReportServiceImpl.java +++ b/lima-business/src/main/java/org/chorem/lima/business/ejb/report/ProvisionalEntryBookReportServiceImpl.java @@ -84,6 +84,9 @@ public class ProvisionalEntryBookReportServiceImpl implements ProvisionalEntryBo documentReport.setToDate(endDate); documentReport.setSubReportPath(ENTRY_BOOK_REPORT_PATH); + BigDecimal documentReportDebit = BigDecimal.ZERO; + BigDecimal documentReportCredit = BigDecimal.ZERO; + List<FinancialPeriod> financialPeriods = financialPeriodService.getFinancialPeriods(beginDate, endDate); List<EntryBook> entryBooks; @@ -162,10 +165,12 @@ public class ProvisionalEntryBookReportServiceImpl implements ProvisionalEntryBo entryBookReport.setSoldeDebit(entryBookSoldeDebit.compareTo(BigDecimal.ZERO) == 0 ? "" : entryBookSoldeDebit.toPlainString()); entryBookReport.setSoldeCredit(entryBookSoldeCredit.compareTo(BigDecimal.ZERO) == 0 ? "" : entryBookSoldeCredit.toPlainString()); documentReport.addEntryBookReport(entryBookReport); + documentReportDebit = documentReportDebit.add(entryBookSoldeDebit); + documentReportCredit = documentReportCredit.add(entryBookSoldeCredit); } } - - + documentReport.setSoldeDebit(documentReportDebit.compareTo(BigDecimal.ZERO) == 0 ? "" : documentReportDebit.toPlainString()); + documentReport.setSoldeCredit(documentReportCredit.compareTo(BigDecimal.ZERO) == 0 ? "" : documentReportCredit.toPlainString()); } } catch (Exception ex) { log.error("Can't create document", ex); diff --git a/lima-web/src/main/jasperreports/provisionalEntryBook/EntryBookMainReport.jrxml b/lima-web/src/main/jasperreports/provisionalEntryBook/EntryBookMainReport.jrxml index c74d47b..4e2e640 100644 --- a/lima-web/src/main/jasperreports/provisionalEntryBook/EntryBookMainReport.jrxml +++ b/lima-web/src/main/jasperreports/provisionalEntryBook/EntryBookMainReport.jrxml @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="UTF-8"?> <!-- Created with Jaspersoft Studio version 5.6.2.final using JasperReports Library version 5.6.1 --> -<!-- 2014-11-19T22:08:55 --> +<!-- 2014-11-20T10:49:29 --> <jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" name="BalanceReport" pageWidth="595" pageHeight="842" whenNoDataType="BlankPage" columnWidth="575" leftMargin="10" rightMargin="10" topMargin="10" bottomMargin="10" isSummaryNewPage="true" isSummaryWithPageHeaderAndFooter="true" isFloa [...] <property name="com.jaspersoft.studio.unit." value="pixel"/> <property name="com.jaspersoft.studio.data.defaultdataadapter" value="One Empty Record"/> @@ -265,4 +265,100 @@ </textField> </band> </pageFooter> + <lastPageFooter> + <band height="30"> + <property name="local_mesure_unitheight" value="pixel"/> + <property name="com.jaspersoft.studio.unit.height" value="px"/> + <frame> + <reportElement style="Default" stretchType="RelativeToBandHeight" mode="Opaque" x="0" y="0" width="578" height="20" isRemoveLineWhenBlank="true" forecolor="#D0B48E" backcolor="#F2EBDF" uuid="ffa6f4ff-14e5-4501-acbe-0c4e832d9c2a"> + <property name="local_mesure_unitheight" value="pixel"/> + <property name="com.jaspersoft.studio.unit.height" value="px"/> + <property name="local_mesure_unity" value="pixel"/> + <property name="com.jaspersoft.studio.unit.y" value="px"/> + </reportElement> + <box> + <topPen lineWidth="0.6" lineStyle="Solid" lineColor="#FDCA97"/> + <leftPen lineWidth="0.6" lineStyle="Solid" lineColor="#FDCA97"/> + <bottomPen lineWidth="0.6" lineStyle="Solid" lineColor="#FDCA97"/> + <rightPen lineWidth="0.6" lineStyle="Solid" lineColor="#FDCA97"/> + </box> + <textField isBlankWhenNull="true"> + <reportElement x="0" y="0" width="434" height="20" forecolor="#736343" uuid="f818f119-5580-46fd-acbd-086f7d222dde"> + <property name="local_mesure_unity" value="pixel"/> + <property name="local_mesure_unitx" value="pixel"/> + <property name="com.jaspersoft.studio.unit.x" value="px"/> + <property name="local_mesure_unitwidth" value="pixel"/> + <property name="com.jaspersoft.studio.unit.width" value="px"/> + <property name="local_mesure_unitheight" value="pixel"/> + <property name="com.jaspersoft.studio.unit.height" value="px"/> + </reportElement> + <box> + <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + </box> + <textElement textAlignment="Left" verticalAlignment="Middle"> + <font size="12" isBold="true" isItalic="true"/> + <paragraph lineSpacingSize="0.0" leftIndent="40"/> + </textElement> + <textFieldExpression><![CDATA["Total pour les journaux sélectionnés"]]></textFieldExpression> + </textField> + <textField isBlankWhenNull="true"> + <reportElement style="Default" x="434" y="0" width="72" height="20" forecolor="#736343" uuid="8382935a-23c9-48a0-88f3-aa486cccd575"> + <property name="local_mesure_unitheight" value="pixel"/> + <property name="com.jaspersoft.studio.unit.height" value="px"/> + </reportElement> + <box> + <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + </box> + <textElement textAlignment="Right" verticalAlignment="Middle"> + <font fontName="Courier 10 Pitch" size="12" isBold="true"/> + <paragraph lineSpacingSize="0.0" rightIndent="2"/> + </textElement> + <textFieldExpression><![CDATA[$F{soldeDebit}]]></textFieldExpression> + </textField> + <textField isBlankWhenNull="true"> + <reportElement style="Default" x="506" y="0" width="72" height="20" forecolor="#736343" uuid="c7fa4a13-051c-40c0-b663-58b0401402b4"> + <property name="local_mesure_unitheight" value="pixel"/> + <property name="com.jaspersoft.studio.unit.height" value="px"/> + </reportElement> + <box> + <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + </box> + <textElement textAlignment="Right" verticalAlignment="Middle"> + <font fontName="Courier 10 Pitch" size="12" isBold="true"/> + <paragraph lineSpacingSize="0.0" rightIndent="2"/> + </textElement> + <textFieldExpression><![CDATA[$F{soldeCredit}]]></textFieldExpression> + </textField> + </frame> + <textField isBlankWhenNull="false"> + <reportElement x="0" y="20" width="288" height="10" uuid="fd62df4f-6500-4fea-93be-fe749f161de6"> + <property name="local_mesure_unity" value="pixel"/> + <property name="com.jaspersoft.studio.unit.y" value="px"/> + </reportElement> + <textElement textAlignment="Right"> + <paragraph lineSpacingSize="0.0"/> + </textElement> + <textFieldExpression><![CDATA["Page " + $V{PAGE_NUMBER}]]></textFieldExpression> + </textField> + <textField evaluationTime="Report"> + <reportElement x="288" y="20" width="287" height="10" uuid="e5018134-bbde-4b3e-a83d-7abf00c56c09"> + <property name="local_mesure_unity" value="pixel"/> + <property name="com.jaspersoft.studio.unit.y" value="px"/> + </reportElement> + <textElement textAlignment="Left"> + <paragraph lineSpacingSize="0.0"/> + </textElement> + <textFieldExpression><![CDATA[" / " + $V{PAGE_NUMBER}]]></textFieldExpression> + </textField> + </band> + </lastPageFooter> </jasperReport> diff --git a/lima-web/src/main/jasperreports/provisionalEntryBook/EntryBookReport.jrxml b/lima-web/src/main/jasperreports/provisionalEntryBook/EntryBookReport.jrxml index 10ec51b..49a56ab 100644 --- a/lima-web/src/main/jasperreports/provisionalEntryBook/EntryBookReport.jrxml +++ b/lima-web/src/main/jasperreports/provisionalEntryBook/EntryBookReport.jrxml @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="UTF-8"?> <!-- Created with Jaspersoft Studio version 5.6.2.final using JasperReports Library version 5.6.1 --> -<!-- 2014-11-20T10:09:23 --> +<!-- 2014-11-20T11:41:07 --> <jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" name="BalanceClassesReport" pageWidth="578" pageHeight="51" whenNoDataType="BlankPage" columnWidth="578" leftMargin="0" rightMargin="0" topMargin="0" bottomMargin="0" isFloatColumnFooter="true" whenResourceMissingType="Empty" isIgnoreP [...] <property name="com.jaspersoft.studio.data.defaultdataadapter" value="One Empty Record"/> <property name="com.jaspersoft.studio.layout" value="com.jaspersoft.studio.editor.layout.HorizontalRowLayout"/> @@ -76,6 +76,7 @@ <property name="com.jaspersoft.studio.unit.height" value="px"/> <property name="local_mesure_unity" value="pixel"/> <property name="com.jaspersoft.studio.unit.y" value="px"/> + <printWhenExpression><![CDATA[new Boolean($V{REPORT_COUNT} == 1)]]></printWhenExpression> </reportElement> <box> <topPen lineWidth="0.6" lineStyle="Solid" lineColor="#FDCA97"/> @@ -99,7 +100,7 @@ <font size="8" isBold="true" isItalic="true"/> <paragraph lineSpacingSize="0.0" leftIndent="40"/> </textElement> - <textFieldExpression><![CDATA["Journal " + $F{code} + " - " + $F{libelle}]]></textFieldExpression> + <textFieldExpression><![CDATA["Journal " + $F{code} + " - " + $F{libelle} + " r:" +$V{REPORT_COUNT}]]></textFieldExpression> </textField> </frame> <subreport isUsingCache="false" runToBottom="false"> @@ -110,6 +111,11 @@ <dataSourceExpression><![CDATA[$V{generalEntryBookEntry}]]></dataSourceExpression> <subreportExpression><![CDATA[JasperCompileManager.compileReport($F{subReportPath})]]></subreportExpression> </subreport> + <break> + <reportElement x="0" y="0" width="100" height="1" uuid="7f204895-3931-4eba-afb5-9614bcbb59f2"> + <printWhenExpression><![CDATA[new Boolean($V{REPORT_COUNT} > 1)]]></printWhenExpression> + </reportElement> + </break> </band> </detail> <columnFooter> diff --git a/lima-web/src/main/jasperreports/provisionalEntryBook/FinancialPeriodReport.jrxml b/lima-web/src/main/jasperreports/provisionalEntryBook/FinancialPeriodReport.jrxml index d79a730..00432eb 100644 --- a/lima-web/src/main/jasperreports/provisionalEntryBook/FinancialPeriodReport.jrxml +++ b/lima-web/src/main/jasperreports/provisionalEntryBook/FinancialPeriodReport.jrxml @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="UTF-8"?> <!-- Created with Jaspersoft Studio version 5.6.2.final using JasperReports Library version 5.6.1 --> -<!-- 2014-11-20T10:16:20 --> +<!-- 2014-11-20T10:30:08 --> <jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" name="BalanceClassesReport" pageWidth="578" pageHeight="51" whenNoDataType="BlankPage" columnWidth="578" leftMargin="0" rightMargin="0" topMargin="0" bottomMargin="0" isFloatColumnFooter="true" whenResourceMissingType="Empty" isIgnoreP [...] <property name="com.jaspersoft.studio.data.defaultdataadapter" value="One Empty Record"/> <property name="com.jaspersoft.studio.layout" value="com.jaspersoft.studio.editor.layout.HorizontalRowLayout"/> @@ -73,7 +73,7 @@ <property name="local_mesure_unitheight" value="pixel"/> <property name="com.jaspersoft.studio.unit.height" value="px"/> <frame> - <reportElement style="Default" mode="Opaque" x="0" y="0" width="578" height="10" forecolor="#FEEEDE" backcolor="#FEEEDE" uuid="b362ba5e-b960-4aff-8c28-d8288ee352a1"> + <reportElement style="Default" mode="Opaque" x="0" y="0" width="578" height="10" isRemoveLineWhenBlank="true" forecolor="#FEEEDE" backcolor="#FEEEDE" uuid="b362ba5e-b960-4aff-8c28-d8288ee352a1"> <property name="local_mesure_unitheight" value="pixel"/> <property name="com.jaspersoft.studio.unit.height" value="px"/> <property name="local_mesure_unity" value="pixel"/> @@ -86,7 +86,7 @@ <rightPen lineWidth="0.6" lineStyle="Solid" lineColor="#FDCA97"/> </box> <textField pattern="" isBlankWhenNull="true"> - <reportElement x="0" y="0" width="578" height="10" forecolor="#736343" uuid="1472eda4-3df8-47ae-aba7-0aae2d2bedae"> + <reportElement x="0" y="0" width="578" height="10" isRemoveLineWhenBlank="true" forecolor="#736343" uuid="1472eda4-3df8-47ae-aba7-0aae2d2bedae"> <property name="local_mesure_unity" value="pixel"/> <property name="local_mesure_unitx" value="pixel"/> <property name="com.jaspersoft.studio.unit.x" value="px"/> @@ -119,6 +119,7 @@ <property name="com.jaspersoft.studio.unit.y" value="px"/> <property name="local_mesure_unitheight" value="pixel"/> <property name="com.jaspersoft.studio.unit.height" value="px"/> + <printWhenExpression><![CDATA[new Boolean($V{PAGE_NUMBER} > 1)]]></printWhenExpression> </reportElement> <dataSourceExpression><![CDATA[$V{generalEntryBookEntry}]]></dataSourceExpression> <subreportExpression><![CDATA[JasperCompileManager.compileReport($F{subReportPath})]]></subreportExpression> -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.