Aggregate method that returns the number of items in a group.

Syntax

<oRef>.agCount(<codeblock>)

<oRef>

The Group object that defines the group you want to summarize.

<codeblock>

A codeblock or pointer to a function that returns the value you want to count.

Property of

Group

Description

Use agCount( ) to count the number of items in the group. <codeblock> is usually an expression codeblock that returns the value property of a field in the rowset of the Group object’s parent StreamSource object.

If <codeblock> returns a null value, that item is not counted, so that empty rows will be skipped. To count a row even if it is empty, have the <codeblock> return a constant non-null value, for example,

{||1}

You may call agCount( ) at any time. If necessary, the report engine will look ahead to calculate the result.