Openbravo Issue Tracking System - Openbravo ERP |
View Issue Details |
|
ID | Project | Category | View Status | Date Submitted | Last Update |
0038518 | Openbravo ERP | A. Platform | public | 2018-05-10 17:49 | 2018-08-30 14:12 |
|
Reporter | vmromanos | |
Assigned To | caristu | |
Priority | normal | Severity | minor | Reproducibility | always |
Status | closed | Resolution | fixed | |
Platform | | OS | 5 | OS Version | |
Product Version | | |
Target Version | | Fixed in Version | 3.0PR18Q3 | |
Merge Request Status | |
Review Assigned To | alostale |
OBNetwork customer | |
Web browser | |
Modules | Core |
Support ticket | |
Regression level | |
Regression date | |
Regression introduced in release | |
Regression introduced by commit | |
Triggers an Emergency Pack | No |
|
Summary | 0038518: Ability of compiling subreports with HttpSecureAppServlet.renderJR |
Description | When a jrxml has a parameter that starts with SUBREP_<subreportfilename> the system should automatically compile the subreport on the fly.
This feature is not working when called from HttpSecureAppServlet.renderJR().
HttpSecureAppServlet.renderJR() line 1274 calls ReportingUtils.exportJR() that calls another implementation of ReportingUtils.exportJR():
exportJR(jasperFilePath, expType, parameters, target, addProcessDefinitionParameters,
connectionProvider, data, additionalExportParameters, false);
The last parameter (false) controls the subreport compilation process. Since it's hardcoded to false, the subreports are never compiled.
There is no renderJR method in HttpSecureAppServlet that ends calling ReportingUtils.exportJR() to force compiling subreports |
Steps To Reproduce | This can be reproduced in core with a hack.
Open RptM_Requisition.jrxml and add a SUBREP_RptM_Requisition_Lines parameter.
Open RptM_Requisition.java and remove subreport compilation lines:
JasperReport jasperReportLines;
try {
jasperReportLines = ReportingUtils.compileReport(strBaseDesign
+ "/org/openbravo/erpReports/RptM_Requisition_Lines.jrxml");
} catch (JRException e) {
e.printStackTrace();
throw new ServletException(e.getMessage());
}
parameters.put("SR_LINES", jasperReportLines);
Try to print a requisition from the UI. No lines will be printed |
Proposed Solution | |
Additional Information | |
Tags | No tags attached. |
Relationships | related to | design defect | 0034796 | | closed | caristu | Openbravo ERP | Not possible to compile subreports automatically in process definition reports | related to | feature request | 0037741 | | closed | caristu | Openbravo ERP | Ability to keep in cache the compiled Jasper Reports | related to | feature request | 0032329 | | closed | platform | Openbravo ERP | Overload the renderJr method on HttpSecureAppServlet to allow specify to compile the subreports | related to | defect | 0038647 | | closed | caristu | Retail Modules | Do not compile the subreport of the CashUp report manually | blocks | defect | 0038340 | | closed | vmromanos | Modules | There is no possibility to put a report template for Distribution Orders in the Document Type | blocks | feature request | 0038588 | | new | Triage Omni OMS | Openbravo ERP | Refactor reports based on HttpSecureAppServlet.renderJR to avoid manual subreport compilation | causes | defect | 0039859 | | closed | AugustoMauch | Openbravo ERP | Reconciliation reports not generated |
|
Attached Files | |
|
Issue History |
Date Modified | Username | Field | Change |
2018-05-10 17:49 | vmromanos | New Issue | |
2018-05-10 17:49 | vmromanos | Assigned To | => platform |
2018-05-10 17:49 | vmromanos | Modules | => Core |
2018-05-10 17:49 | vmromanos | Triggers an Emergency Pack | => No |
2018-05-10 17:49 | vmromanos | Relationship added | related to 0034796 |
2018-05-10 17:50 | vmromanos | Relationship added | blocks 0038340 |
2018-05-10 17:52 | caristu | Assigned To | platform => caristu |
2018-05-11 09:36 | caristu | Severity | major => minor |
2018-05-11 15:03 | hgbot | Checkin | |
2018-05-11 15:03 | hgbot | Note Added: 0104484 | |
2018-05-11 15:03 | hgbot | Status | new => resolved |
2018-05-11 15:03 | hgbot | Resolution | open => fixed |
2018-05-11 15:03 | hgbot | Fixed in SCM revision | => http://code.openbravo.com/erp/devel/pi/rev/4fa9879b96470c16006ec8658000e44990752375 [^] |
2018-05-11 15:32 | hgbot | Checkin | |
2018-05-11 15:32 | hgbot | Note Added: 0104485 | |
2018-05-11 15:33 | caristu | Review Assigned To | => alostale |
2018-05-11 15:34 | caristu | Type | defect => feature request |
2018-05-11 15:34 | caristu | Summary | Subreports with SUBREP_ parameter are not compiled from HttpSecureAppServlet.renderJR => Ability of compiling subreports with HttpSecureAppServlet.renderJR |
2018-05-14 08:50 | hgbot | Checkin | |
2018-05-14 08:50 | hgbot | Note Added: 0104490 | |
2018-05-14 13:09 | hudsonbot | Checkin | |
2018-05-14 13:09 | hudsonbot | Note Added: 0104499 | |
2018-05-14 13:09 | hudsonbot | Checkin | |
2018-05-14 13:09 | hudsonbot | Note Added: 0104500 | |
2018-05-14 13:09 | hudsonbot | Checkin | |
2018-05-14 13:09 | hudsonbot | Note Added: 0104501 | |
2018-05-18 10:17 | alostale | Note Added: 0104588 | |
2018-05-18 10:17 | alostale | Status | resolved => new |
2018-05-18 10:17 | alostale | Resolution | fixed => open |
2018-05-18 10:20 | alostale | Note Edited: 0104588 | bug_revision_view_page.php?bugnote_id=0104588#r17159 |
2018-05-18 12:50 | hgbot | Checkin | |
2018-05-18 12:50 | hgbot | Note Added: 0104590 | |
2018-05-18 12:50 | hgbot | Status | new => resolved |
2018-05-18 12:50 | hgbot | Resolution | open => fixed |
2018-05-18 12:50 | hgbot | Fixed in SCM revision | http://code.openbravo.com/erp/devel/pi/rev/4fa9879b96470c16006ec8658000e44990752375 [^] => http://code.openbravo.com/erp/devel/pi/rev/3404760330bcfea180a7869095eefbabf5e760e0 [^] |
2018-05-18 12:51 | caristu | Relationship added | related to 0037441 |
2018-05-18 12:51 | caristu | Relationship deleted | related to 0037441 |
2018-05-18 12:51 | caristu | Relationship added | related to 0037741 |
2018-05-18 13:36 | hgbot | Checkin | |
2018-05-18 13:36 | hgbot | Note Added: 0104591 | |
2018-05-21 11:03 | hgbot | Checkin | |
2018-05-21 11:03 | hgbot | Note Added: 0104616 | |
2018-05-21 13:58 | vmromanos | Relationship added | blocks 0038588 |
2018-05-21 18:36 | hudsonbot | Checkin | |
2018-05-21 18:36 | hudsonbot | Note Added: 0104621 | |
2018-05-21 18:36 | hudsonbot | Checkin | |
2018-05-21 18:36 | hudsonbot | Note Added: 0104622 | |
2018-05-25 09:56 | alostale | Note Added: 0104702 | |
2018-05-25 09:56 | alostale | Status | resolved => closed |
2018-05-25 09:56 | alostale | Fixed in Version | => 3.0PR18Q3 |
2018-05-29 11:22 | caristu | Relationship added | related to 0038647 |
2018-08-30 14:12 | caristu | Relationship added | related to 0032329 |
2018-12-27 17:07 | Sandrahuguet | Relationship added | related to 0039859 |
2018-12-28 14:11 | AugustoMauch | Relationship replaced | causes 0039859 |
Notes |
|
(0104484)
|
hgbot
|
2018-05-11 15:03
|
|
|
|
(0104485)
|
hgbot
|
2018-05-11 15:32
|
|
Repository: erp/devel/pi
Changeset: 0c8d2174716f6ff7046f70981bdb95811141a382
Author: Carlos Aristu <carlos.aristu <at> openbravo.com>
Date: Fri May 11 15:30:31 2018 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/0c8d2174716f6ff7046f70981bdb95811141a382 [^]
related to issue 38518: use renderJR to compile the subreport
Refactored the report generation to demonstrate how renderJR method can be used to compile the sub-reports.
---
M src/org/openbravo/erpReports/RptM_Requisition.java
M src/org/openbravo/erpReports/RptM_Requisition.jrxml
---
|
|
|
(0104490)
|
hgbot
|
2018-05-14 08:50
|
|
|
|
|
|
|
|
|
|
|
|
|
(0104588)
|
alostale
|
2018-05-18 10:17
(edited on: 2018-05-18 10:20) |
|
Reopening after discussing current solutions:
The option not to compile subreports is available only through HSAS and BaseReportActionHandler. Originally subreports had to be manually compiled, there were to options two do so:
1. compile programatically when the report is requested
2. compile at development time and include the pre-compiled .jasper in the sources
Option 2 shouldn't be used as it skips the translation part, so subreports implemented in this way are not translatable.
In practice only option 1 is acceptable, so reports implemented in this way require developer to write code to compile all subreports to include them as parameter. This should not be necessary, only main report should be used in the API and this API should be smart enough to compile all what's needed to finally render correctly the report, so the proposal is to do in this way allways.
Not to break existent code, we'll continue allowing developers to compile subreports before main report although it will now be unnecessary and redundant. In any case as now compiled reports are now cached (0037741), this operation will not have impact on performance.
|
|
|
(0104590)
|
hgbot
|
2018-05-18 12:50
|
|
Repository: erp/devel/pi
Changeset: 3404760330bcfea180a7869095eefbabf5e760e0
Author: Carlos Aristu <carlos.aristu <at> openbravo.com>
Date: Fri May 18 12:42:38 2018 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/3404760330bcfea180a7869095eefbabf5e760e0 [^]
fixes issue 38518: Compile subreports with HttpSecureAppServlet.renderJR
It has been deprecate the ability of specifying to the reporting API if the sub-reports should be compiled or not. Instead the API is smart enough to find the subreports (if any) and compile them. Besides, note that this subreport search will be performed just once per report, because the compilation results are cached since[1].
With this change, reports generated both with HttpSecureAppServlet and BaseReportActionHandler will compile the subreports in a transparent way, i.e., without the need of explicitly specifying it.
[1] https://issues.openbravo.com/view.php?id=37741 [^]
---
M modules/org.openbravo.client.application/src/org/openbravo/client/application/report/BaseReportActionHandler.java
M modules/org.openbravo.client.application/src/org/openbravo/client/application/report/CompiledReportManager.java
M modules/org.openbravo.client.application/src/org/openbravo/client/application/report/ReportCompiler.java
M modules/org.openbravo.client.application/src/org/openbravo/client/application/report/ReportingUtils.java
M src/org/openbravo/base/secureApp/HttpSecureAppServlet.java
M src/org/openbravo/common/actionhandler/CashflowForecastReportActionHandler.java
M src/org/openbravo/erpCommon/utility/reporting/ReportManager.java
M src/org/openbravo/erpReports/RptM_Requisition.java
---
|
|
|
(0104591)
|
hgbot
|
2018-05-18 13:36
|
|
|
|
(0104616)
|
hgbot
|
2018-05-21 11:03
|
|
|
|
|
|
|
|
|
|
|
|