Page 1 of 1
Comparing previous/next records in reports
Posted: Tue Aug 07, 2001 10:53 am
by Stephen_Horwood_(Guest)
I am writing a report to analise trainee data, and need to compare fields in multiple records for individual trainess in order to determine certain criteria.____Whilst I can easily compare the current record to the previous record using the Previous() function, I also need to compare the current record to the next record, and can see no way of doing this in Arpeggio v2.____I did think about using the Recno() function to assign record numbers but could not see any way of using the record number to access specific records.____I know that forward/reverse record navigation is possible in most if not all databases, and many report writters, and I just hope that someone might have an idea of how I can do it in Arpeggio.
=> RE: Comparing previous/next records in reports
Posted: Wed Aug 08, 2001 6:36 am
by kfleming
No good way to accomplish this that I can immediately think of.____Kathleen__R&R Support
=> RE: Comparing previous/next records in reports
Posted: Wed Aug 22, 2001 11:43 am
by robh_(Guest)
I^ve done this. Details depend on your report, but in a nutshell:____1. Create a running and a pre-processed count of records within some desired group.____2. Use line-logical and running count to suppress record band if you^re on the first record (running count = 1.)____3. Use the PREVIOUS() function to compare current to previous record. In essence, the current record is the "next" record and the PREVIOUS() values are the "current" record.____4. Use line-logical to print group footer when on the last record (running count = pre-processed count.)____Rob Hershfield__rob@plan-be.com__www.Plan-Be.com____