Shift Nibble

Happy Coding ...

Add Serial Number in Crystal Reports

Crystal Reports does not have any special field to display serial number but there is one for record number, which can be used as serial number (if your serial number does not reset on group). Right click on your report and select "Insert > Special Field > Record Number" to add record number.

If you want a serial number which would reset on change of group, suppose you want to show multiple invoices in a report and each invoice group would have its own serial number which starts from 1. In this scenario you cannot use Record Number Special Field because it does not reset. To resolve it you should add running total on any of your report field; and to do that right click on any field (it could be text field) select Insert > Running Total. It should display you a window to add running total, type any name in "Running Total Name" (Note: you won't be able to rename it later) such as "SerialNumber". In "Type of summary" DropDown select "Count", in "Reset" select "On change of group" and select your group in DropDown. This newly added running total will act as serial number and it will start from 1 for every new group.