LP#1789679: Provide ROLLUP support in report output
authorMike Rylander <mrylander@gmail.com>
Wed, 29 Aug 2018 15:39:30 +0000 (11:39 -0400)
committerChris Sharp <csharp@georgialibraries.org>
Wed, 19 Aug 2020 19:18:44 +0000 (15:18 -0400)
commit1f1520c05bb41a864436d50281e78ba108b991c3
tree2c0c530b20cd6fd437e099587e3ccd0cde67f408
parentd0c817697abeca4e98d204b8e108327c8568e6be
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>
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