Summary (Aggregate) Fields Property

Summary Fields enable the user to add totals to a report and give specific control over how the totals are calculated.

The first property, SummaryDistinctField, specifies the field that is distinctly identified in the total. For instance, to find out how many distinct customers placed orders in the last six months, select the CustomerID field from the SummaryDistinctField dropdown.

The second property, SummaryFunc, specifies the type of total. There are several choices, including SUM, COUNT, AVE, MIN, and MAX. There are two versions of each function, one for distinct totals, and one for indistinct. For example, to list the number of companies that placed  orders in the last six months, select the ddSFDCOUNT function. To list the number of customers who placed orders, use the ddSFCOUNT function.

The third property is the SummaryGroup, which identifies the group to which we want the summary to apply.

The fourth property, SummaryRunning, enables the selection of what to summarize. For example, to summarize a specific group, select ddSRGroup from the SummaryRunning list box. This inserts a subtotal for a specific group within the Field text box. The other option, ddSRSummaryAll, inserts a running total through the whole report.

The last property, SummaryType, specifies when you want the summary calculated. There are four choices, as described in the following table:
 

SummaryType

Property Description

ddSMGrandTotal

Calculated at the report level, includes all records in the query.

ddSMPageTotal

Calculated on each page and automatically resets on each page.

ddSMSubTotal

Calculated at the group level and automatically reset for each group.

ddSMPageCount

Counts the number of pages.