Summary Row

images/download/attachments/144835596/ReportSummary-version-1-modificationdate-1645046819000-api-v2.png

The SummaryRow section is used to render rows at the end of a report which displays aggregated data. By default, this data is aggregated across all pages (not just the current page.) There can be multiple summary rows. Each SummaryRow element consists of one or more SummaryCell elements.

Each SummaryRow should be given a name attribute to uniquely identify it. By default, summary rows are not exported to CSV/XML. You may set the "export" attribute to true for any summary row to include it when exporting.

<SummaryRow name="Min">
<SummaryCell level="TestModel" name="TestLong">
<SQL>MIN(TEST_LONG)</SQL>
</SummaryCell>
<SummaryCell level="TestModel" name="TestInteger">
<SQL>MIN(TEST_INTEGER)</SQL>
<Meta>Test Metadata 1</Meta> <!-- arbitrary string, to be used by custom handlers -->
</SummaryCell>
</SummaryRow>
<SummaryRow name="Max">
<SummaryCell level="TestModel" name="TestLong">
<SQL>MAX(TEST_LONG)</SQL>
</SummaryCell>
<SummaryCell level="TestModel" name="TestInteger">
<SQL>MAX(TEST_INTEGER)</SQL>
<Meta>Test Metadata 2</Meta> <!-- arbitrary string, to be used by custom handlers -->
</SummaryCell>
</SummaryRow>
<SummaryRow name="Summary" export="true">
<SummaryCell level="TestModel" name="TestLong">
<SQL>AVG(TEST_LONG)</SQL>
<ValueLabelKey>meta.SummaryCellValueLabelKey.AVERAGE</ValueLabelKey>
</SummaryCell>
<SummaryCell level="TestModel" name="TestInteger">
<SQL>SUM(TEST_INTEGER)</SQL>
<Meta>Test Metadata 3</Meta> <!-- arbitrary string, to be used by custom handlers -->
<ValueLabelKey>meta.SummaryCellValueLabelKey.SUM</ValueLabelKey>
</SummaryCell>
<SummaryCell level="TestModel" name="TestInteger">
<SQL>AVG(TEST_INTEGER)</SQL>
<Meta>Test Metadata</Meta> <!-- arbitrary string, to be used by custom handlers -->
<ValueLabelKey>meta.SummaryCellValueLabelKey.AVERAGE</ValueLabelKey>
</SummaryCell>
<SummaryCell level="TestModel" name="TestFloat">
<SQL>COUNT(TEST_FLOAT)</SQL>
<ValueLabelKey>meta.SummaryCellValueLabelKey.COUNT</ValueLabelKey>
</SummaryCell>
</SummaryRow>


You can localize the SummaryRow label (shown on the far left cell of the row) using the pattern "meta.report.reportName.SummaryRow.summaryRowName".

Example - meta.report.ZBKS.TestReport.SummaryRow.Summary=Total Summary.

When provided, the label will always go in first column, unless first column is a summary column. If not provided the "name" attribute is rendered as the label.