Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0004683
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] F. Localizationmajoralways2008-08-22 14:392009-04-21 11:06
Reportergorka_gilView Statuspublic 
Assigned ToDowid 
PrioritynormalResolutionfixedFixed in Version
StatusclosedFix in branchpiFixed in SCM revision10878
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionpiSCM revision6502 
Review Assigned To
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0004683: In some jasper reports date format is hardcoded

DescriptionIn some jasper reports date format is hardcoded:

  <textField...pattern="dd/MM/yyyy"...>

The files are:

ad_reports/ReportAnnualCertification.jrxml
ad_reports/ReportGuaranteeDateJR.jrxml
ad_reports/ReportInvoiceCustomerJR.jrxml
ad_reports/ReportInvoicesEditJR.jrxml
ad_reports/ReportOrderNotInvoiceJR.jrxml
ad_reports/ReportPurchaseOrder.jrxml
ad_reports/ReportSalesOrderJR.jrxml
ad_reports/ReportShipmentEdition.jrxml
ad_reports/ReportTaxInvoicePurchase.jrxml
ad_reports/ReportTaxInvoicePurchaseForeign.jrxml
ad_reports/ReportTaxInvoiceSale.jrxml
ad_reports/ReportTaxInvoiceSaleForeign.jrxml
erpReports/C_OrderJR.jrxml
erpReports/ReportRegisterByVatJR.jrxml
erpReports/ReportRegisterLineJR.jrxml
erpReports/RptC_Invoice.jrxml
erpReports/RptC_OrderPO.jrxml
erpReports/RptC_Remittance.jrxml
erpReports/RptC_Remittance_Lines.jrxml
erpReports/RptM_Requisition.jrxml
Proposed SolutionNow, this reports has some parameters defined as date type, and in the jrxml is hardcoded the pattern that defines the format of the date.

A solution can be change the type of the parameters to string, and apply the date format in java and send the parameter as string to jasper.
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
related to defect 0004668 closedgorka_gil Hardcoded date formats in manual src files 
depends on backport 0004813 closedDowid In some jasper reports date format is hardcoded 
has duplicate defect 0005130 closedcromero Can't Print Invoice 

-  Notes
(0010282)
gorka_gil (administrator)
2008-11-14 13:56

In some reports is enough to remove the pattern attribute, because the specified date format in "dateFormat.java" variable in Openbravo.properties is applied .

For example in ReportSalesOrderJR.jrxml in line 425 only removing:
  pattern="dd-MM-yyy"
is enough.
(0010885)
Dowid (reporter)
2008-12-02 13:27

It's sufficient enough to remove pattern="dd-MM-yyy" in all reports, except for
ReportAnnualCertification.jrxml

For report ReportAnnualCertification.jrxml I propose to convert the java.util.Date into java.lang.String using the following code:

<parameter name="DateFormatter" class="java.text.DateFormat" isForPrompting="false">
    <defaultValueExpression>$P{REPORT_FORMAT_FACTORY}.createDateFormat("", $P{REPORT_LOCALE}, $P{REPORT_TIME_ZONE})</defaultValueExpression>
</parameter>


<textFieldExpression class="java.lang.String"><![CDATA[$P{DATEFORMATTER}.format(new Date())]]></textFieldExpression>


This code can be used in jasper reports to convert Date into String without "hardcoding" the date format.
(0010910)
svnbot (reporter)
2008-12-02 17:06

Repository: openbravo
Revision: 10878
Author: dowid
Date: 2008-12-02 17:06:07 +0100 (Tue, 02 Dec 2008)

Bug fixed 0004683: In some jasper reports date format is hardcoded

---
U trunk/src/org/openbravo/erpCommon/ad_reports/ReportAnnualCertification.jrxml
U trunk/src/org/openbravo/erpCommon/ad_reports/ReportGuaranteeDateJR.jrxml
U trunk/src/org/openbravo/erpCommon/ad_reports/ReportInvoiceCustomerJR.jrxml
U trunk/src/org/openbravo/erpCommon/ad_reports/ReportInvoicesEditJR.jrxml
U trunk/src/org/openbravo/erpCommon/ad_reports/ReportOrderNotInvoiceJR.jrxml
U trunk/src/org/openbravo/erpCommon/ad_reports/ReportPurchaseOrder.jrxml
U trunk/src/org/openbravo/erpCommon/ad_reports/ReportSalesOrderJR.jrxml
U trunk/src/org/openbravo/erpCommon/ad_reports/ReportShipmentEdition.jrxml
U trunk/src/org/openbravo/erpCommon/ad_reports/ReportTaxInvoicePurchase.jrxml
U trunk/src/org/openbravo/erpCommon/ad_reports/ReportTaxInvoicePurchaseForeign.jrxml
U trunk/src/org/openbravo/erpCommon/ad_reports/ReportTaxInvoiceSale.jrxml
U trunk/src/org/openbravo/erpCommon/ad_reports/ReportTaxInvoiceSaleForeign.jrxml
U trunk/src/org/openbravo/erpReports/C_OrderJR.jrxml
U trunk/src/org/openbravo/erpReports/RptC_Invoice.jrxml
U trunk/src/org/openbravo/erpReports/RptC_OrderPO.jrxml
U trunk/src/org/openbravo/erpReports/RptC_Remittance.jrxml
U trunk/src/org/openbravo/erpReports/RptC_Remittance_Lines.jrxml
U trunk/src/org/openbravo/erpReports/RptM_Requisition.jrxml
---

https://dev.openbravo.com/websvn/openbravo/?rev=10878&sc=1 [^]

- Issue History
Date Modified Username Field Change
2008-08-22 14:39 gorka_gil New Issue
2008-08-22 14:39 gorka_gil Assigned To => cromero
2008-08-22 14:39 gorka_gil sf_bug_id 0 => 2067410
2008-08-22 14:39 gorka_gil Regression testing => No
2008-08-25 16:34 gorka_gil Relationship added related to 0004668
2008-09-01 11:55 psarobe Status new => scheduled
2008-09-01 11:55 psarobe fix_in_branch => trunk
2008-09-01 12:36 gorka_gil fix_in_branch trunk =>
2008-09-01 12:36 gorka_gil Steps to Reproduce Updated
2008-09-04 10:02 cromero Status scheduled => feedback
2008-09-04 10:02 cromero Assigned To cromero => gorka_gil
2008-09-04 10:02 cromero Severity minor => major
2008-09-04 10:03 cromero Status feedback => scheduled
2008-09-04 10:03 cromero fix_in_branch => trunk
2008-09-05 17:30 cromero Status scheduled => feedback
2008-09-05 17:31 cromero Status feedback => scheduled
2008-09-10 09:57 cromero Status scheduled => feedback
2008-09-10 09:57 cromero Status feedback => scheduled
2008-09-29 12:31 psarobe Relationship added has duplicate 0005130
2008-11-13 22:53 rafaroda Assigned To gorka_gil => Hennadzi
2008-11-14 13:56 gorka_gil Note Added: 0010282
2008-11-26 10:26 PavelPonomarev Assigned To Hennadzi => Dowid
2008-12-02 13:27 Dowid Note Added: 0010885
2008-12-02 17:06 svnbot Checkin
2008-12-02 17:06 svnbot Note Added: 0010910
2008-12-02 17:06 svnbot Status scheduled => resolved
2008-12-02 17:06 svnbot Resolution open => fixed
2008-12-02 17:06 svnbot svn_revision => 10878
2009-04-21 11:06 psarobe Status resolved => closed


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker