Conditional record Numbers in Crystal report

I have a conditional detail section where the condition is : Suppress if Qty = 0
The output I get is as below:
Record Number        Description         Qty
1                                  pencil                   3
3                                  pen                       5
4                                  eraser                  1

Due to suppress condition in detail section the record numbers are not printing properly.

Any work around on the above.
Sailee GovekarStudentAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

What do you mean they aren't printing properly?

Suppression doesn't get rid of the record in the report it just hides visibility so the record still is counted.

Are you using the record number object?
If so you r report is working

If you want to suppress records with 0 quantity, can you simply filter them out with selection criteria?

   {QtyField} > 0

If you have to include them for some reason you could do your own record number through a pair of formulas

In the report header add a formula
Global NumberVar myRecordNumber;

Open in new window

Where you want the record number to display add a formula
Global NumberVar myRecordNumber;
If {qtyfield} > 0 then
    myRecordNumber := myRecordNumber + 1;

Open in new window


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Sailee GovekarStudentAuthor Commented:
Worked with the formula
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Crystal Reports

From novice to tech pro — start learning today.