The counter is a particular type of variable that will update by adding
the value from the specified field. The update will occur each time the
module load the new row from the data source.
There are two behaviour depending on which is the tag father. The counter
defined at block level will be reseted only when the program starts,
the counter defined at group level will be reseted each time the group
key chnge its value.
The counter may, simpli, count the written row if the attribute 'autoincrement'
is set to 'y'
From the report's point oof view, the counters are normal variable, and then
you may apply to they all variable function (i.e text formatting, use as parameter
for custom function, print it,...).
The following example shows many types of counter. The ones named
'TotalB', defined as block child, will be added to the field 'pB'
each time the module load the rows from the datasource. This counter
will be reseted only when the mdule start its job.
The counter named 'NoItems' counts how many rows the module
get from the data source. The counters 'TotalYearA', 'TotalYearB',
and 'NoRows', defined as group child, will be reseted each time the
field 'Year' changes its value. You may see the complete
example here .
Year: {$Year}
|
|