Creating Header and Summary Rows
Header and Summary rows allow you to display data column summary information on the first (excluding the Column Header row) and/or last rows of a data table. You can customize these rows by adding individual Column Cell elements.
The easiest way to display summary information is to use special summary elements with each Data Table Column to be summarized and then create a header and/or summary row, as follows:
- Ensure that each Data Table Column to be summarized has a child Data Column Summary element, as shown above.
-
Set its attributes to produce the desired summary of the desired column,
as shown above.
- Select the parent Data Table element and add a Header Row or Summary Row element to the definition, as shown above.
- Set its Caption attribute to display a title in the first column of the header/summary row.
- When using a Summary Row and interactive paging, set its Last Page Only attribute to True to show the summary only on the last page of the data table, otherwise it will appear at the bottom of every page.
The example above show the typical result, with the summary row at the bottom.
The cells generated for the summary row automatically inherit the formatting and alignment of the columns above them.
A standard header or summary row works well when every data column contains summary information. However, for data tables with numerous columns and/or columns with non-numeric data, a customized header or summary row may be a better solution. Here's how to create a customized header:
- Ensure that each Data Table Column to be summarized has a child Data Column Summary element.
- Select the parent Data Table element and add a Header Row element to the definition.
- Beneath it, add one or more Column Cell elements.
- Add Label elements beneath the Column Cell elements to display the summary data and use the @Data token to retrieve the summarized values, using on the ID of the Data Column Summary elements you added. For example, @Data.avgDiscount~.
The formatting and alignment of the data table columns is not inherited when using Column Cell elements, so you must set these individually.
In the example shown above, the Header Row element has three Column Cell child elements, but the data table has four columns. This is handled by setting the first Column Cell element's Column Span attribute to span 2 columns, allowing for the difference.