Description

Allows results of another reporter to be grouped by any keychain value in each item.

This reporter provides group-by and statistical analysis capabilities for reports. It processes the results of the contained reporter and performs grouping and (optionally) statistical analysis with the companion Grouping Stats macro.

You can also perform simple analysis using the Stats On Supplier to calculate results.

Parameters

Name

Required

Migratable to Cloud?

Default Value

Description

[default] /key(s)

  • (/)

  • NO

The comma-separated list of keys to group on. They will be grouped in the order provided, so the second keychain will be a subset of the first.

e.g.: prefix:key > prefix:key, prefix:other key.

To put a comma as part of a single keychain it will need to be double-escaped with a backslash.

as

  • (/)

  • NO

The comma-separated list of names that the groups will be accessible as. There must be the same number of names here as there are keychains.

These are case-sensitive, so use the exact same case when getting the grouped value.

Editor View

Macro Edit View

Notes

The grouped items and stats will be available via the Grouped Supplier.

Examples

Weather Data

This is a simple example using basic weather data. It will allow entry of data for each day, and the report will group data monthly and perform some statistical analysis of it.

Data Input

Below is a fairly simple Scaffold table containing a date, min/max temperature, and rainfall.

{table-data:Data}
|| Day || Min Temp (°C) || Max Temp (°C) || Rainfall (mm) ||
| {date-data:name=Date|format=d-MMM-yyyy}today{date-data} | {number-data:name=Min Temp|format=#.# '°C'} | {number-data:name=Max Temp|format=#.# '°C'} | {number-data:name=Rainfall|minValue=0|format=#.# 'mm'} |
{table-data}
Simple Monthly Report

We'll start with a simple monthly report that lists what the maximum and minimum temperature for each month and the total rainfall.

{report-table}
{grouping-reporter:key=data:Date > date:MMMM yyyy|as=Month}
  {grouping-stats:data:Min Temp|as=Minimums}
  {grouping-stats:data:Max Temp|as=Maximums}
  {grouping-stats:data:Rainfall|as=Rainfall}
 
  {local-reporter:data:Data}
    {date-sort:data:Date}
  {local-reporter}
{grouping-reporter}
 
{report-column:title=Month}{report-info:grouped:Month}{report-column}
{report-column:title=Min Temp}{report-info:grouped:Minimums > stats:min value|format=#.# '°C'}{report-column}
{report-column:title=Max Temp}{report-info:grouped:Maximums > stats:max value|format=#.# '°C'}{report-column}
{report-column:title=Total Rainfall}{report-info:grouped:Rainfall > stats:sum|format=#.# 'mm'}{report-column}
 
{report-empty}_No data has been entered yet._{report-empty}
 
{report-table}
Things to Note:
Detailed Monthly Report

This is a more advanced report on the same data. This report will group based on the month and year value ('date:MMM yyyy') and perform statistical analysis of the 'Min Temp', 'Max Temp' and 'Rainfall' values in each entry.

{report-table:injected=true}
 
{grouping-reporter:key=data:Date > date:MMMM yyyy|as=Month}
  {grouping-stats:data:Min Temp|as=Minimums}
  {grouping-stats:data:Max Temp|as=Maximums}
  {grouping-stats:data:Rainfall|as=Rainfall}
 
  {local-reporter:data:Data}
    {date-sort:data:Date}
  {local-reporter}
{grouping-reporter}
 
{report-column:title=Month|rowSpan=3}%grouped:Month%{report-column}
{report-column:title=Rainfall (Total)|rowSpan=3}%Rainfall > sum% mm{report-column}
 
{report-column:title=Lowest Minimum}%Minimums > min value% °C (%Minimums > min item > data:Date > EEE d%){report-column}
{report-column:title=Highest Minimum}%Minimums > max value% °C (%Minimums > max item > data:Date > EEE d%){report-column}
{report-column:title=Average Minimum}%Minimums > value average% °C{report-column}
 
{report-column:title=Lowest Maximum|newRow=true}%Maximums > min value% °C (%Maximums > min item > data:Date > EEE d%){report-column}
{report-column:title=Highest Maximum}%Maximums > max value% °C (%Maximums > max item > data:Date > EEE d%){report-column}
{report-column:title=Average Maximum}%Maximums > value average% °C{report-column}
 
{report-column:title=Lowest Rainfall|newRow=true}%Rainfall > min value% mm (%Rainfall > min item > data:Date > EEE d%){report-column}
{report-column:title=Highest Rainfall}%Rainfall > max value% mm (%Rainfall > max item > data:Date > EEE d%){report-column}
{report-column:title=Average Rainfall}%Rainfall > value average% mm{report-column}
 
{report-empty}_No data to report on._{report-empty}
 
{report-table}
Things to Note

Tutorial Examples