Skip to Content

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.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    Jan 10 at 01:47 PM

    Use a variable
    @recCount
    Whileprintingrecords;

    Gloable numbervar recCnt;

    recCnt:=RecCnt+1;

    RecCnt

    Place this formula in details, this works if counting for whole report. If you want to count within a group you will need to reset the var to zero in group header.

    Ian

    Add comment
    10|10000 characters needed characters exceeded