Row number & filtering records
I want to show the row number in my detailed band but also need to filter
the record set by evaluating the data before printing the band.
I tried the following:
1) Use DBCalc (set to count) and make the row invisible to when my print
condition is false. This resulting row numbers are not valid because it
still counts the "non-printed" records.
2) Increment a counter and set the row number label when a row is printed.
This works OK until I switch between pages in preview mode and the row
numbers begin to change. I have the counter incrementing in the detail band
BeforePrint event. This event appears to be called even when previous
preview pages are selected causing the counter to continue assigning larger
numbers to previous pages.
Any ideas for another solution other than actually filtering the dataset
directly ?
Thanks
Ron
the record set by evaluating the data before printing the band.
I tried the following:
1) Use DBCalc (set to count) and make the row invisible to when my print
condition is false. This resulting row numbers are not valid because it
still counts the "non-printed" records.
2) Increment a counter and set the row number label when a row is printed.
This works OK until I switch between pages in preview mode and the row
numbers begin to change. I have the counter incrementing in the detail band
BeforePrint event. This event appears to be called even when previous
preview pages are selected causing the counter to continue assigning larger
numbers to previous pages.
Any ideas for another solution other than actually filtering the dataset
directly ?
Thanks
Ron
This discussion has been closed.
Comments
ppVariable OnCalc events using option 2) below. All appears to work good.