Number of queries Although matrix reports always require at least four Group structure Matrix reports are built with four or more groups:

Basic Concepts 1-7 Figure 1–1 Example matrix report Thus, to create a matrix report, you need at least four groups in the data model: one group must be a cross-product group, two of the groups must be within the cross-product group to furnish the labels, and at least one group must provide the information to fill the cells. The groups can belong to a single query or to multiple queries. A distinguishing feature of matrix reports is that the number of columns is not known until the data is fetched from the database. With Oracle Reports Builder, you can create many different matrix reports. The four general types of matrix reports are simple matrix, nested matrix, multiquery matrix with break, and matrix break, but you are not confined to these designs. For a detailed example, see Chapter 25, Building a Matrix Report .

1.3.7.1 Matrix data model

In building your matrix data model, you should consider the following: ■ number of queries ■ group structure ■ summary settings

1.3.7.1.1 Number of queries Although matrix reports always require at least four

groups, they can be built with any number of queries. If you build a matrix report with only one query usually the most efficient structure, you must create at least three groups in addition to the one created by default. If you build a matrix report with multiple three or more queries, you still need to create at least one additional group. The figure below illustrates the two types of query structures that you can use for your matrix data model. 1-8 Oracle Reports Users Guide to Building Reports Figure 1–2 Matrix data models One advantage to a one-query data model is that the resulting report is generally more efficient than a report based on a multiquery data model. Multiquery matrix. You may consider using a multiquery data model, as it often has simple queries and can be easier to maintain than the equivalent one-query data model. In addition, a multiquery data model is required for some types of matrices for example, some nested matrix reports.

1.3.7.1.2 Group structure Matrix reports are built with four or more groups:

■ Two or more dimension groups. Dimension groups are contained within the cross product group. In the layout, the information in at least one group goes across the page, and the information in at least one group goes down the page, forming a grid. The information in these groups is sometimes referred to as matrix labels, as they appear to provide column and row labels for the matrix. ■ One or more cross product groups. The cross product group represents all possible combinations of the values of the dimension groups. In the layout, the cross product group is represented by the intersection of the repeating frames for the across and down dimension groups. When the report is run, it expands, and each instance of data intersection becomes a separate cell. This concept is sometimes best understood graphically, as in the figure below. The rectangles are cells, and show where each departmentjob combination is valid. Figure 1–3 Conceptual matrix ■ One cell, or filler group. The cell group contains the actual information that is represented by the cells of the cross product. For each intersection of the values of the dimension groups cell, the cell group contains zero, one, or multiple values. When the report is run, these values appear in the appropriate cells. Basic Concepts 1-9 The following figure shows graphical representations of how groups are related for both single and multiquery data models. Figure 1–4 Matrix data model relationships Notice that for each data model the cross product group is represented by the large rectangle, while the dimension groups are the smaller rectangles enclosed by it, and the cell group is shown outside of the cross product group.

1.3.7.1.3 Summary settings Creating a summary for a matrix requires more information