Using Row Numbers
The Row Number facility allows you to specify a number that increments as each section is processed. The start number can either be entered at run-time as a parameter or retrieved from a data field value.
You can increment a row number based on the change of a value of a field.