| CodeGuru Home | VC++ / MFC / C++ | .NET / C# | Visual Basic | Newsletters | VB Forums | Developer.com |
|
|||||||
![]() |
|
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Increment the serial number
I need to display the serial no in crystal reports 8.5
i wrote this formula WhilePrintingRecords; NumberVar mycounter:=0; mycounter := mycounter + 1; but still it displays 1 for each record.....i want it 1 2 3 4 5 6 so on |
|
#2
|
|||
|
|||
|
Re: Increment the serial number
I'd use a RunningTotal.....
Menu - Insert Menu - Field Object Select RunningTotal from list of available types in Field Explorer dialog. "Create Running Total Field" dialog should display. Name it. Select a field which occurs in each line of the details section or group that you want to count on, and put it into the Field to Summarize box. Make the Type of Summary a Count. Leave the rest of the options alone. Click OK and then place the field on your report, in the repeated detail line or group. Run it and you should see your counter increment for each element. That's the basics. Then you can mess with these to do lots of cool stuff. dave |
|
#3
|
|||
|
|||
|
Re: Increment the serial number
Hi, try this
Code:
NumberVar mycounter WhilePrintingRecords; mycounter := mycounter + 1; |
|
#4
|
|||
|
|||
|
Re: Increment the serial number
Thks Dave ths was indeed helpful
|
![]() |
| Bookmarks |
|
||||||
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|