Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0029412Openbravo ERPA. Platformpublic2015-03-25 17:202015-03-27 14:47
NaroaIriarte 
NaroaIriarte 
urgentmajorhave not tried
closedfixed 
5
 
3.0PR15Q2 
alostale
Core
No
0029412: The ReportingUtils.java does not work properly.
There is an enum class called "ExportType" inside the "ReportingUtils" class.
This does not work properly when it is used outside the package in which is defined.
If one try to use it, an error is catched.
1- Open Eclipse an open "About.java".
2- Put the following code line inside the "doPost" method:

    ExportType exportType = ReportingUtils.ExportType.PDF;

3- Go to your Openbravo workspace and click "about" in the "help" tab.

4- You will the error attached in the txt file.
No tags attached.
related to feature request 0026763 closed gorkaion Ability to launch reports from process definitions 
related to defect 0029441 closed NaroaIriarte Exporting to XLS does not work in the new ReportingUtils class 
txt logerror.txt (3,333) 2015-03-25 17:20
https://issues.openbravo.com/file_download.php?file_id=7935&type=bug
Issue History
2015-03-25 17:20NaroaIriarteNew Issue
2015-03-25 17:20NaroaIriarteAssigned To => NaroaIriarte
2015-03-25 17:20NaroaIriarteFile Added: logerror.txt
2015-03-25 17:20NaroaIriarteModules => Core
2015-03-25 17:20NaroaIriarteTriggers an Emergency Pack => No
2015-03-26 15:24alostaleReview Assigned To => alostale
2015-03-26 15:30hgbotCheckin
2015-03-26 15:30hgbotNote Added: 0076015
2015-03-26 15:30hgbotStatusnew => resolved
2015-03-26 15:30hgbotResolutionopen => fixed
2015-03-26 15:30hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/72aaa69915807484e30a526991e0b08f0c6fbcc0 [^]
2015-03-26 15:32alostaleNote Added: 0076016
2015-03-26 15:32alostaleStatusresolved => closed
2015-03-26 15:32alostaleFixed in Version => 3.0PR15Q2
2015-03-27 02:12hudsonbotCheckin
2015-03-27 02:12hudsonbotNote Added: 0076045
2015-03-27 13:37NaroaIriarteRelationship addedrelated to 0029441
2015-03-27 14:47alostaleRelationship addedrelated to 0026763

Notes
(0076015)
hgbot   
2015-03-26 15:30   
Repository: erp/devel/pi
Changeset: 72aaa69915807484e30a526991e0b08f0c6fbcc0
Author: Naroa Iriarte <naroa.iriarte <at> openbravo.com>
Date: Thu Mar 26 11:02:48 2015 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/72aaa69915807484e30a526991e0b08f0c6fbcc0 [^]

Fixed issue 29412:It is not possible to use the new reporting class everywere.

The problem was that calling the methods of the "ExportType" class inside the "ReportingUtils" class
from some parts of the code (the old code) was not working properly.
The problem was that it was needed to have the AdminMode set to true to access to a table which
was accessed in the constructor of the "ExportType" class.
The new code has the AdminMode set to true, that is why it works.
But in the old code it was not.

For fixing this, the AdminMode has been set to true inside the constructor of the "ExportType" class
itself. It is needed for the download of the report.
Other change that has been made is changing the type of the variable filetype, now it is String. This is
for saving memory.
It has been taken into account to the fact of having a different type of report in the future. This has been
handled with the "fileType = "application/" + extension" code. Now new extensions will be supported.
Now whereever one calls those methods, it works properly.

---
M modules/org.openbravo.client.application/src/org/openbravo/client/application/report/ReportingUtils.java
---
(0076016)
alostale   
2015-03-26 15:32   
code reviewed + tested
(0076045)
hudsonbot   
2015-03-27 02:12   
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/b8858c8b542b [^]
Maturity status: Test