]> git.evergreen-ils.org Git - Evergreen.git/blob - docs/RELEASE_NOTES_NEXT/Reports/report_subtotals.adoc
57032e6ae2aff112d055d7604a3f750d3b9b343c
[Evergreen.git] / docs / RELEASE_NOTES_NEXT / Reports / report_subtotals.adoc
1 Reports Subtotals
2 ^^^^^^^^^^^^^^^^^
3 Reports now allow group subtotals and grand totals.  By checking the
4 new "Calculate grouping subtotals" checkbox under "Output Options",
5 a new unlabeled row or column is created with the subtotals for each
6 grouping and an unlabeled grand total row or column.
7
8 This takes advantage of PostreSQL's built-in ROLLUP feature.  See the
9 PostgreSQL documentation for details: 
10
11 https://www.postgresql.org/docs/9.6/queries-table-expressions.html#QUERIES-GROUPING-SETS
12
13 An example of a report that could use this new feature is
14 one based on the Circulation source with the following fields:
15
16  * Circulation -> Checkout / Renewal Library -> Short (Policy) Name (Raw Data)
17  * Circulation -> Checkout Date/Time (Year)
18  * Circulation -> Shelving Location -> Name (Raw Data)
19  * Circulation -> Circ ID (Count Distinct)
20
21 Turning on the "Calculate grouping subtotals" checkbox would make
22 the report show subtotals for each combination of
23 short name, checkout year, and shelving location name.