Home General
New Blog Posts: Merging Reports - Part 1 and Part 2

Row number & filtering records

edited November 2003 in General
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

Comments

  • edited November 2003
    I found a solution. I was using ppLabel OnPrint events and switched to
    ppVariable OnCalc events using option 2) below. All appears to work good.


This discussion has been closed.