Table of Contents
Report Editor - Summary Help
Aggregate functions are functions where the values of multiple rows are grouped together to form a single summary value. The Summary Control is intended for adding aggregate functions into the report. You have two ways to specify the function:
- Using Property Inspector for the control:
- Change property type, to specify a needed item from the list of available functions
- Change property value, to specify the arguments of the selected function
- Using the dialog:
The Report Engine provides few aggregate functions:
Usage
Aggregate functions, in reports, should be used in the footer regions. Using in the others regions (headers or body), is unusual. Valentina Reports supports aggregate or summary controls in Footer and Header regions. Computation of the function performed on values of fields, which are included into the current region.
Example
Suppose you have a simple table, that contains two fields:
- f_number – some number.
- f_date – a date of adding of the record.
You needs to create a report, that prints a list of all values of the field f_num, with next conditions:
- Records should be grouped by adding date.
- Each group should contains information about summary of own values.
- Each page of report should contains information about the number of records, printed on the page.
- At the end of the report should be printed an average value of the field.
For this purpose we will create the report:
let's see, what we will get in the output of the report:
Other aggregate functions works similarly.