LP#1789679: Provide ROLLUP support in report output
authorMike Rylander <mrylander@gmail.com>
Wed, 29 Aug 2018 15:39:30 +0000 (11:39 -0400)
committerKyle Huckins <khuckins@catalyte.io>
Thu, 21 Jan 2021 20:38:26 +0000 (20:38 +0000)
commit849a458b395d628786b7b0d4ac1ccc00445aa35b
treea1dbcd162a928e127dbf216fe4a5564ed4ebdf66
parent17c81f8bedad11c5ede1049e12b1d1c6d7b0fd5f
LP#1789679: Provide ROLLUP support in report output

In Postgres 9.5 and newer, it is simple to generate group subtotal and grand
total rows for aggregate queries. The simplest thing would be to spell the
grouping clause as

  GROUP BY ROLLUP (...)

rather than

  GROUP BY ...

when there is a mix of aggregate and non-aggregate columns in a report.  This
branch does just that.

The report definition UI now has a checkbox labeled "Calculate grouping
subtotals" which enables use of the ROLLUP functionality.

Signed-off-by: Mike Rylander <mrylander@gmail.com>
Signed-off-by: Chris Sharp <csharp@georgialibraries.org>
Signed-off-by: Lynn Floyd <lfloyd1@library.in.gov>
Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
Open-ILS/src/perlmods/lib/OpenILS/Reporter/SQLBuilder.pm
Open-ILS/src/reporter/clark-kent.pl
Open-ILS/web/opac/locale/en-US/reports.dtd
Open-ILS/web/reports/oils_rpt_editor.xhtml
Open-ILS/web/reports/oils_rpt_report_editor.js