Understanding Cross-Tabular Reports
Cross-tabular reports are matrix-like or spreadsheet-like reports. These reports are useful for presenting summary numeric data. Cross-tabular reports vary in format. The following example shows sales revenue summarized by product by sales channel:
Revenue by product by sales channel
Product Direct Sales Resellers Mail Order Total
---------- ------------ --------- ----------- -------
A 2,100 1,209 0 3,309
B 120 311 519 950
C 2 0 924 926
---------- ------------ --------- ----------- -------
Total 2,222 1,520 1,443 5,185
This report is based on many sales records. The three middle columns correspond to sales channel categories. Each row corresponds to a product. The records fall into nine groups: three products sold through three sales channels. Some groups have no sales (such as mail order for product A).
Each category can be a discrete value of some database column or a set of values. For example, Resellers can be domestic resellers plus international distributors.
A category can also represent a range, as shown in this example:
Orders by Product by Order Size
Product
Category Less than 10 10 to 100 More than 100 Total
----------- ------------ --------- ------------- -------
Durable 200 120 0 320
Nondurable 122 311 924 1876
----------- ------------ --------- ------------- -------
Total 322 431 1443 2196
In this example, the rows correspond to the categories Durable and Nondurable. The columns represent ranges of order size.
For each record that is selected, the program must determine the range to which it belongs and add 1 to the count for that category. The numbers in the cells are counts, but they could be sums, averages, or any other expression.
Of course, other types of cross-tabular reports exist. These reports become more complex when the number of columns is not predefined and when more columns exist than can fit across a page.