Xataface HTML Reports Module 0.2
HTML Reports Module for Xataface
|
It is often helpful in reports to display totals that summarize entire sets of records with a single value. For example, when running a report on sales transactions, you are often interested in the total amount of the transactions. This is where summary fields are useful.
Summary fields are represented in a template in the following format:
{@operation(field)}
where operation
is one of
count
sum
min
max
and field
is the name of a field in the table (either related field or primary field).
E.g.
{@sum(amount)}
An easier way to add summary fields is to just use the field browser (i.e. clicking the Insert Field button).
If you exand any field node, you'll see a number of sub-nodes corresponding to summary operations (e.g. sum, , etc...). Click on one of these sub-options to add the corresponding summary field to your template. That's all that is involved.