G01 - Group Items (Reports & Settings Report Generator variable)

From Catalyst
Jump to: navigation, search

Syntax

G01{B/H/T}

Description

The number of items in a group. Multiple rows in an item will NOT affect this variable. The distinction between rows and items should be noted here. An "item" may contain several "rows".

The group number is given by the variable number itself: G1 retrieves the number items in group 1; G4 retrieves the number of items in group 4, etc.

Body figures (the default) are available as follows. e.g. when a group 1 header is produced, G1{B} is reset to 0, then increased for each body item printed up to and including the end of the next group 1 totals. If one or more group 2 headers are included, G2{B} will be set to zero at the start of each, then increased for each body item within. Through all of these G0{B} will retain a count of the number of body items on the whole report. Header & total figures are reset when the next level up restarts. i.e. when a group 1 header occurs, the group 1 header total is increased by 1, and group 2 header and totals are reset to 0. If you wish then, to use a figure from group 2 headers or totals in group 0 totals you may use a hidden variable in a group 1 totals line.
G0
Will always contain the number of body items on the report.
G1
Will contain the current number of body items in G1.
G2{T}
Will contain the number of group 2 totals since the last group 1 header.


Parameters

B/H/T
A text parameter that can be omitted (it defaults to "B").
Specifies the type of item to count.
B
Get the count of body items.
H
Get the count of group-headings.
T
Get the count of group-totals.

Returns

A numeric value whose typical size is 4 digits.