Category:

Database related

General

Returns the current number of row in the current group of a specified group level. Used only in reporting context.

Syntax

dataset_group_number(
  StepNo Integer, 
  GroupLevel Integer 
): Integer

Parameters

StepNo specifies the step (pass) in which the function must be calculated. Possible values: 1 or 2. When it equals to 1, the corresponding function will be calculated immediately when the expression is processed. When it equals to 2, report will run in double-pass mode and the corresponding function will be calculated only in the second pass of the report processing, i.e. after the report dataset reaches the last record. Using database functions in the second pass is useful, for example, when it is needing to put the report totals in the report or group headers.

GroupLevel specifies the aggregation group. It can have the following values:
1. Group of level 1;
2. Group of level 2;
3. Group of level 3;
0. Full report (the result will be always 1);
-1. Current page (the result will be the number of the current report page).

Return value

Type: Integer.

Examples of using

dataset_group_number(1, 1)