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.

Deploying Crystal Reports Application

I faced problem today while deploying my .net application on live server which uses crystal reports. I installed 64bit runtime of crystal report on server (ver 13.0.13). It was showing error for missing dll file "CrystalDecisions.ReportAppServer.CommLayer.dll". After so many tries I figured out that it was due to missing 32bit runtime, after installing 32bit runtime everything is working as it should be.

Hope it helps others using crystal reports and deploying application(s) on production server