prova


<!ELEMENT counter EMPTY><br> <!ATTLIST counter name CDATA #REQUIRED<br> field CDATA #IMPLIED<br> autoincrement (y|n) #IMPLIED><br>

Counter definition

 

Parent:

block
group
 

Childs:

 

Attributes:

name

Counter name. It acts as variable name.

field

Where get the value to add to this counter. Note this version doesn't suport custom function as field value.

autoincrement

If set to 'y', the module add 1 to the counter each time it loads the new row from the data source. If you set the autoincrement, the attribute field will be ignored.

 

Note:

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}