Calculations at Sort Level Break


You want to execute an operation when a sort level changes. For example, you can use the Number operation to count the number of sort levels and display it before each sort level. The procedure refers to Number operations only, since this calculation event does not make sense for the other operation types.


You created a table node and use the Data tab to read your internal table.


  1. On the Data tab enter a sort criterion and mark Event on Sort Begin and Event on Sort End .
  2. Go to the Calculations tab.
  3. Select Number as Operation .
  4. Under Target Field Name enter a field with data type integer ( I ).
  5. As calculation event specify Before Sorting or After Sorting . If, for example, you want to start numbering at 1 and display the number as a heading before the sort level, you must select Before Sorting .

    Calculations at Before Sorting or After Sorting can be executed only if on the Data tab either Event on Sort Begin or Event on Sort End is marked.

  6. To initialize the target field before table output, mark the checkbox in the Initialization column.
  7. Display the target field in a table cell at the beginning or end of the sort level.


You count the number of sort levels. At the beginning or end of the sort levels you can display the target field as the sort level number. In the footer you can display the total number of sort levels.