Format pattern not respected
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
KDE OpenObject Client |
New
|
Undecided
|
Unassigned |
Bug Description
[Problem]
1. Create and populate a testing table in an OpenERP database:
CREATE TABLE test_table (
id integer NOT NULL,
field_date date,
CONSTRAINT pk PRIMARY KEY (id)
);
INSERT INTO test_table VALUES (6, 'January 31, 2010', 12345.22);
INSERT INTO test_table VALUES (100, 'April 14, 2011', 2111222.23);
INSERT INTO test_table VALUES (200, 'November 13, 2011', 212.348);
2. Use iReport 4.5.0 (http://
Click icon "Report Datasources" below the menu.
Click button "New" on the right-hand side.
Select "Database JDBC connection" and click "Next".
Type "OpenERP" on field "Name".
Select "PostgreSQL (org.postgresql
Edit "JDBC URL" to point to the OpenERP database containing table test_table.
Type the database username.
Click button "Test".
If connection is okay, click button "Save".
Click button "Close".
Open menu "Tools" -> "Options" -> "iReport" tab -> "Viewers" tab.
Fill in "/usr/bin/evince" (with the quotes) to field "PDF Viewer".
Click button "OK".
Open menu "Preview" and select "PDF Preview".
Click button "Preview" just on top of the ruler, and Evince window will be opened displaying the PDF file of the jasper report as file "report_
3. Register the jasper report attached in this e-mail into OpenERP:
Administration -> Customization -> Jasper Reports -> Jasper Reports -> New
Name: test_report
Model: res.partner
Service Name: test_report_pdf
Jasper Output: PDF
Jasper Reports File -> New
File: select the jasper report attached in this e-mail
Default: selected
Save & Close
Save
4. Test the report:
Sales -> Address Book -> Customers
Double click one of the records and click test_report button on the right-hand side.
5. The PDF is displayed but the date and number formatting patterns are not respected as can be seen in PDF file "report_
[Culprit]
The jasperreports library included in NaN-tic's jasper_reports module is outdated. The indication is that iReport can successfully render the format pattern.
Therefore, update the jasperreports library of the NaN-tic jasper_reports module by executing:
cd java/lib
./update-
[New Problem]
But, with the new jasperreports library in place, a Java class from NaN-tic fails to compile the .jrxml file with the following exception:
java.lang.
at net.sf.
at com.nantic.
at net.sf.
at net.sf.
at net.sf.
at net.sf.
at net.sf.
at com.nantic.
at com.nantic.
at com.nantic.
at sun.reflect.
at sun.reflect.
at sun.reflect.
at java.lang.
at org.apache.
at org.apache.
at org.apache.
at org.apache.
at org.apache.
at org.apache.
at org.apache.
That is, the custom .jrxml-to-.jasper compiler from NaN-tic, which is I18nGroovyCompiler, needs to be updated as well.
Since both iReport and NaN-tic jasper_reports module are licensed under GPL, it is okay to replace the NaN-tic jasper report compiler by iReport jasper report compiler. Why doesn't NaN-tic do this from the start?
This bug still exists at the latest revision 1793 of http:// bazaar. launchpad. net/~openobject -client- kde/openobject- client- kde/5.0/