tedschw / wabit

Automatically exported from code.google.com/p/wabit
GNU General Public License v3.0
0 stars 0 forks source link

Printing subtotals that subtotal columns across pages does not sum correctly #13

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Create a query with over 100 rows where one column is numeric
2. Create a report based on the query and subtotal the numeric column
3. Print or preview the report

The report will have an incorrect subtotal on the last page. Only the
values on the last page will be subtotalled and the rest of the values will
be forgotten.

This issue requires a refactoring of the renderSuccess method in the
ResultSetRenderer. When printing each page will be printed multiple times.
In the renderSuccess method the subtotal map of columns to subtotal values
will be cleared after the first time a page is printed. This results in the
first time the page is rendered the subtotal is correct but since the page
is rendered multiple times the actual value printed on the last rendering
will only include values from the page the subtotal is on.

Original issue reported on code.google.com by ThomasOB...@gmail.com on 31 Mar 2009 at 8:55

GoogleCodeExporter commented 8 years ago
Fixed in r814. Now the entire result set is laid out before rendering any 
pages. This
lets all of the subtotals be calculated correctly and define where each header,
subtotal, and row should go in each page before printing. This also simplifies 
the
confusion of trying to print one arbitrary page.

Original comment by ThomasOB...@gmail.com on 9 Jul 2009 at 8:22