7.9 Level Breaks

Sorting a file places all records with equal sort fields together. For instance, if you were to sort the subscriber file by zip code, all of the records with a zip code of 97011 would appear together. When you scan through a sorted file, you may find places where the value of the sort field changes (e.g., 97010 to 97011). This change is called a break.

If the file has been sorted by more than one field, there will be breaks at more than one level. For example, if the file were to be sorted first by zip code and then by last name, all the subscribers with the same zip code would appear together, and they would also be listed alphabetically within each zip code 'group'. When the zip code changes, it is referred to as a level 1 break. This is because the zip code was the first sort field. When the last name changes, it is called a level 2 break, since the last name was the second sort field. With visual reports, up to three levels of sorting may be specified.

It is often necessary to indicate on a report when a level break begins and ends. For example, if you were listing invoices by customer, you would probably want to print the name of the customer at the beginning of all of their invoices and print the total of their invoices at the end. Thus, the customer name would be printed in the heading, and the customer total in the footing, of that particular level.

When you add sort fields in the Report Description form, the necessary Report Section screens are added to the report to handle the level break headings and footings. Likewise, when sort fields are deleted from the Report Description form, the correlating Report Section screens are also deleted.