To show the current row index in a report, follow the instructions below.
-
Create a new reportor open an existing one.
-
Drop the required fields from the Field Listonto the report's Detail band.
-
Click the field for which the current row index will be displayed, to select it. Then, hold down CTRL and drag the field, to create an exact copy of the Label, which will display the index.
-
Select the created Label, and in the Property Grid, locate the Summaryproperty and click its ellipsis button. The Summary Editorwill appear.
In this dialog, the Bound fieldis already set to the required data field. So, for the Summary functionselect RecordNumberand check Ignore NULL valuesto avoid these data fields from affecting the calculation. Last, set the Summary Runningoption to Report( Groupor Pageif required) and click OK.
The result is shown in the following image.
See Also