Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0029441Openbravo ERPA. Platformpublic2015-03-27 13:012015-03-31 00:07
NaroaIriarte 
NaroaIriarte 
immediatemajorhave not tried
closedfixed 
5
 
3.0PR15Q2 
alostale
Core
Pre packaging ( pi )
2014-03-06
pi
https://code.openbravo.com/erp/devel/pi/rev/d8ec9347e127febd5961acedac70ff0cfe52e5b6 [^]
No
0029441: Exporting to XLS does not work in the new ReportingUtils class
Trying to export a report in xls format using a module which uses the new code in the class "ReportingUtils", shows a casting error in the log.
1- Install the following module:

  https://code.openbravo.com/erp/mods/org.openbravo.platform.features [^]

2- Follow the instructions in the following URL and create both PDF and a XLS report exporter buttons.

   http://wiki.openbravo.com/wiki/How_to_create_a_Report_using_Process_Definition [^]

3- Go to F&B Admin and open the "Product Simple Report" window.
4- Click on the "Export to XLS" button.
5- An error of casting is shown in the log.
No tags attached.
related to defect 0029412 closed NaroaIriarte The ReportingUtils.java does not work properly. 
related to defect 0029427 closed NaroaIriarte It is possible to modify the object of the enum class ExporType. 
related to feature request 0026763 closed gorkaion Ability to launch reports from process definitions 
caused by defect 00291573.0PR15Q2 closed alostale code review issues for Process Definition Reporting Tool project 
Issue History
2015-03-27 13:01NaroaIriarteNew Issue
2015-03-27 13:01NaroaIriarteAssigned To => NaroaIriarte
2015-03-27 13:01NaroaIriarteModules => Core
2015-03-27 13:01NaroaIriarteTriggers an Emergency Pack => No
2015-03-27 13:37NaroaIriarteRelationship addedrelated to 0029412
2015-03-27 13:38NaroaIriarteRelationship addedrelated to 0029427
2015-03-27 14:45NaroaIriartePriorityimmediate => urgent
2015-03-27 14:47NaroaIriarteReview Assigned To => alostale
2015-03-27 14:47alostaleRelationship addedrelated to 0026763
2015-03-30 10:45alostaleRelationship addedcaused by 0029157
2015-03-30 10:46alostaleRegression level => Pre packaging ( pi )
2015-03-30 10:46alostaleRegression date => 2014-03-06
2015-03-30 10:46alostaleRegression introduced in release => pi
2015-03-30 10:46alostaleRegression introduced by commit => https://code.openbravo.com/erp/devel/pi/rev/d8ec9347e127febd5961acedac70ff0cfe52e5b6 [^]
2015-03-30 10:46alostalePriorityurgent => immediate
2015-03-30 10:47hgbotCheckin
2015-03-30 10:47hgbotNote Added: 0076118
2015-03-30 10:47hgbotStatusnew => resolved
2015-03-30 10:47hgbotResolutionopen => fixed
2015-03-30 10:47hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/82682f61da0c0771cc348133d0a143369c32b8ca [^]
2015-03-30 10:49alostaleNote Added: 0076119
2015-03-30 10:49alostaleStatusresolved => closed
2015-03-30 10:49alostaleFixed in Version => 3.0PR15Q2
2015-03-31 00:07hudsonbotCheckin
2015-03-31 00:07hudsonbotNote Added: 0076162

Notes
(0076118)
hgbot   
2015-03-30 10:47   
Repository: erp/devel/pi
Changeset: 82682f61da0c0771cc348133d0a143369c32b8ca
Author: Naroa Iriarte <naroa.iriarte <at> openbravo.com>
Date: Fri Mar 27 14:02:59 2015 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/82682f61da0c0771cc348133d0a143369c32b8ca [^]

Fixed issue 29441: It is not possible to export a report in XLS format.

Trying to export a report in XLS format, using the following module does not work:
 https://code.openbravo.com/erp/mods/org.openbravo.platform.features [^]

It shows a casting error in the log. The problem is in the ReportingUtils class.
When it tries to export a report of XLS type, the variable "target" is type "File".
The problem is when the JRExporterParameter class of Jasper is used:

exportParameters.put(JRExporterParameter.OUTPUT_FILE_NAME, target);

The target needs to be of type "String" instead of "File" for the correct execution of
the code above.

To fix this the method "getAbsolutePath" of the "File" class has been called for getting
the absolute path which is what is needed, but having the type as "String" instead
of "File".

---
M modules/org.openbravo.client.application/src/org/openbravo/client/application/report/ReportingUtils.java
---
(0076119)
alostale   
2015-03-30 10:49   
code reviewed + tested

the issue was introduced in the code review refactor [1] where target type was changed from String to File.

[1] https://code.openbravo.com/erp/devel/pi/rev/d8ec9347e127febd5961acedac70ff0cfe52e5b6#l4.48 [^]
(0076162)
hudsonbot   
2015-03-31 00:07   
A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/34da08f135b8 [^]
Maturity status: Test