Progress
Programming
Handbook
Using Work Tables for Cross-tab Reports
A cross-tab report typically lists information in tabular (or spreadsheet) format. For example, suppose you want a report that breaks down order values by catalog page and sales rep. The report might look like the following.
![]()
This report lists the order value for each of the catalog page for each of three sales reps.
There are two ways to produce this report without using work tables:
- Usually, your report has more rows than columns or more columns than rows. If the number of rows is larger than the number of columns, sort the records represented by each row (for example, catalog page) and then accumulate values acquired during that sort into an array whose elements represent each of the columns (for example, the order value for each sales rep).
- Displays results whenever Progress encounters a new catalog page value.
Using work tables simplifies the task of producing cross-tab reports: you do not have to sort the data and you do not have to be concerned with the dimensions of the table as you do when using arrays. The
p-wrk5.p
procedure produces this report using work tables:
Copyright © 2004 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |