Comparing previous/next records in reports
-
- Posts: 1
- Joined: Tue Oct 10, 2017 12:44 pm
Comparing previous/next records in reports
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
No good way to accomplish this that I can immediately think of.____Kathleen__R&R Support
-
- Posts: 2
- Joined: Tue Oct 10, 2017 12:44 pm
=> RE: Comparing previous/next records in reports
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____