Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0035764Openbravo ERP09. Financial managementpublic2017-04-12 10:242017-06-13 14:30
aferraz 
markmm82 
urgentmajorhave not tried
closedfixed 
30Professional Appliance
 
3.0PR17Q3 
aferraz
Core
No
0035764: The browswer get stucked when printing the receivable aging schedule report showing details and having a lot of invoices pending
After print the receivable aging schedule report on an environment with a lot of invoices pending to be paid, the browser get stucked.
The report takes more than 1 minute to be printed. Most of the time is consumed by chrome rendering the server response.
Once the tab is shown, if you try to go back to the filtering tab the chrome get stucked and it takes long to navigate to the tab.
-Select and organization and a date where there are many invoices for many partners pending to be paid.
-Print the report in html.
-ONce the report is printed try to move to the previous tab.
*Chrome start consuming resources and an warning message is shown to kill the process or wait.
If you wait after some time (2 minutes) the new tab is opened.
In order to reduce the memory usage, we should limit displayed data with the value of a preference. A warning should inform that data is being limited.
No tags attached.
related to defect 0035531 closed markmm82 Modules The browswer get stucked when printing the receivable aging schedule report showing details and having a lot of invoices pending 
related to defect 0036173 closed markmm82 Modules Performance problems in Aging reports returning "multiple" instead of "scrollable" queries. 
Issue History
2017-04-12 10:24aferrazNew Issue
2017-04-12 10:24aferrazAssigned To => Triage Finance
2017-04-12 10:24aferrazModules => Core
2017-04-12 10:24aferrazTriggers an Emergency Pack => No
2017-04-12 10:24aferrazRelationship addedrelated to 0035531
2017-04-12 10:24aferrazAssigned ToTriage Finance => markmm82
2017-06-01 16:41markmm82Statusnew => scheduled
2017-06-01 19:36markmm82Note Added: 0097085
2017-06-05 09:53aferrazRelationship addedrelated to 0036173
2017-06-12 20:47hgbotCheckin
2017-06-12 20:47hgbotNote Added: 0097330
2017-06-12 20:47hgbotStatusscheduled => resolved
2017-06-12 20:47hgbotResolutionopen => fixed
2017-06-12 20:47hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/23a3621892b3c827b8582538e1c8ff0de997f825 [^]
2017-06-12 20:47hgbotCheckin
2017-06-12 20:47hgbotNote Added: 0097331
2017-06-13 07:41hudsonbotCheckin
2017-06-13 07:41hudsonbotNote Added: 0097338
2017-06-13 07:41hudsonbotCheckin
2017-06-13 07:41hudsonbotNote Added: 0097339
2017-06-13 14:30aferrazReview Assigned To => aferraz
2017-06-13 14:30aferrazNote Added: 0097359
2017-06-13 14:30aferrazStatusresolved => closed
2017-06-13 14:30aferrazFixed in Version => 3.0PR17Q3

Notes
(0097085)
markmm82   
2017-06-01 19:36   
Test Plan 1:

As System Admin
  - Go to Preference window
    Edit "ReportLimit" preference and set "Value"=1

As F&B International Group Admin

  - Go to Receivables Aging Schedule report window
    Set F&B España, S.A org and "From Date"=04-04-2016 and click in HTML Format buttom
    Check that a warning message is shown in both windows: showing selected filters and results:
"The filtering criteria you have specified for this report return a number of rows that exceeds the maximum allowed. The limit of rows to display in a report is 1. Please, use more selective filtering criteria and execute the report again."

Repeat the same steps but checking "Show details" option and notice the message is shown too.

Test Plan 2:

As System Admin
  - Go to Preference window
    Edit "ReportLimit" preference and set "Value"=1

As F&B International Group Admin

  - Go to Payables Aging Schedule report window
    Set F&B España, S.A org and "From Date"=04-04-2016 and click in HTML Format buttom
    Check that a warning message is shown in both windows: showing selected filters and results:
"The filtering criteria you have specified for this report return a number of rows that exceeds the maximum allowed. The limit of rows to display in a report is 1. Please, use more selective filtering criteria and execute the report again."

Repeat the same steps but checking "Show details" option and notice the message is shown too.
(0097330)
hgbot   
2017-06-12 20:47   
Repository: erp/devel/pi
Changeset: 23a3621892b3c827b8582538e1c8ff0de997f825
Author: Mark <markmm82 <at> gmail.com>
Date: Fri Jun 09 12:19:57 2017 -0400
URL: http://code.openbravo.com/erp/devel/pi/rev/23a3621892b3c827b8582538e1c8ff0de997f825 [^]

Fixes issue 35764: The browser get stucked when printing the receivable aging
schedule report showing details and having a lot of invoices pending.

After printing the receivable/payable aging schedule report on an environment
with a lot of invoices pending to be paid, the report took too long to be printed.
Most of the time was consumed by chrome rendering the server response.

In order to reduce the memory usage, was limited the displayed data with the value
of the "ReportsLimit" preference.

When record count exceeds this limit, is shown a warning informing data has been
limited. As problem happens when the report runs in HTML format, data only will be
limited in this case and not when report runs in PDF or XLS formats.

As Aging Schedule reports are defined as Process Definition, and results of run as
HTML is shown in a new window containing the JR with results of the
selected filters, was added to the affected JRXML files a new hidden Text
Field that will be shown only when the data is limited. This way, user will be
notified after executing the report in both windows, selected filters and report results.

To achieve this functionality the following changes were done:
-Adapted AgingDao_data and AgingDao to make possible to limit queries to PG and
 Oracle databases.
-Adapted AgingBalanceReportActionHandler to limit data if report is created in
 HTML format. If the data is limited are stored as a session variables to make
 it available to AgingDao methods. Then a warning message will be shown in the
 affected reports if the limit is reached.
-Added a new "warning" parameter to AgingScheduleDetailHTML and AgingScheduleHTML
 reports. It is linked to a hidden text that only will be displayed if the maximum
 of records count defined in the preference to reports is reached.

---
M src/org/openbravo/common/actionhandler/AgingBalanceReportActionHandler.java
M src/org/openbravo/erpCommon/ad_reports/AgingDao.java
M src/org/openbravo/erpCommon/ad_reports/AgingDao_data.xsql
M src/org/openbravo/erpCommon/ad_reports/AgingScheduleDetailHTML.jrxml
M src/org/openbravo/erpCommon/ad_reports/AgingScheduleHTML.jrxml
---
(0097331)
hgbot   
2017-06-12 20:47   
Repository: erp/devel/pi
Changeset: 91dbb09a074ce99d2b165c4d31c147337529dd40
Author: Alvaro Ferraz <alvaro.ferraz <at> openbravo.com>
Date: Mon Jun 12 20:45:35 2017 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/91dbb09a074ce99d2b165c4d31c147337529dd40 [^]

Related to issue 35764: Code review improvements

Create new getReportsLimit() and runReport() methods to avoid code duplication.

---
M src/org/openbravo/common/actionhandler/AgingBalanceReportActionHandler.java
M src/org/openbravo/erpCommon/ad_reports/AgingDao.java
---
(0097338)
hudsonbot   
2017-06-13 07:41   
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/44d87c9454e7 [^]
Maturity status: Test
(0097339)
hudsonbot   
2017-06-13 07:41   
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/44d87c9454e7 [^]
Maturity status: Test
(0097359)
aferraz   
2017-06-13 14:30   
Code review + Testing OK