Describes a group in a report.

Syntax

[<oRef> =] new Group(<streamSource>)

<oRef>

A variable or property—typically of <streamSource>—in which you want to store a reference to the newly created Group object.

<streamSource>

The StreamSource object to which the Group object binds itself.

Properties

The following tables list the properties and methods of the Group class. (No events are associated with this class.)

Property

Default

Description

baseClassName

GROUP

Identifies the object as an instance of the Group class.

className

(GROUP)

Identifies the object as an instance of a custom class. When no custom class exists, defaults to baseClassName

drillDown

None

How the group’s bands are displayed in drilldown format.

footerBand

 

Specifies a Band that renders after a group of detail bands.

groupBy

 

A character string containing the field name by which groups are formed. If blank, the group is for the entire report.

headerBand

 

Specifies a Band that renders before a group of detail bands.

headerEveryFrame

false

Specifies whether to repeat the headerBand when a Group spans more than one StreamFrame.

name

 

The name of the Group object.

parent

 

The Report or StreamSource object that contains the Group.

Method

Parameters

Description

agAverage( )

<codeblock>

Aggregate method that returns the mean average for a group

agCount( )

<codeblock>

Aggregate method that returns the number of items in a group

agMax( )

<codeblock>

Aggregate method that returns the highest value within a group

agMin( )

<codeblock>

Aggregate method that returns the lowest value in a group

agStdDeviation( )

<codeblock>

Aggregate method that returns the standard deviation of the values in a group

agSum( )

<codeblock>

Aggregate method that returns the total of a group

agVariance( )

<codeblock>

Aggregate method that returns the variance of the values in a group

release( )

 

Explicitly releases the Group object from memory

Description

Use Group objects to group data and calculate aggregate values for the group. Groups may be nested, and are handled in the order that they are created (the same order that they appear in the class definition in a .REP file).

The groupBy property contains the name of the field that defines the group, and may include an optional ascending or descending modifier. Whenever the value of that field changes, a new group starts. Therefore, the data must be sorted on the grouping field(s).

A Group object’s headerBand is rendered before each group and its footerBand is rendered afterward. If the headerEveryFrame property is true, the group’s headerBand is rendered at the beginning of every StreamFrame.

If the Report object’s autoSort property is true, data in a report is automatically sorted to match groups.

The Report object has its own Group object that is referred to by its reportGroup property. Its groupBy property is an empty string, and the group is used for report-wide aggregates.

You may organize the report in drilldown format: the header and footer bands showing summary information are displayed first, followed by the detail rows. This allows you to see summary information at the top, and then "drill down" to the supporting data.