Summary settings Creating a summary for a matrix requires more information

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

than creating a summary for other kinds of reports. When you create summary columns for your matrix, you need to indicate the following: ■ The frequency of the summary. The frequency specifies the dimension groups for which to compute the summary. ■ The order in which to compute the summary. The order specifies how to traverse the matrix in calculating the summary top to bottom or left to right. In Oracle Reports Builder, you specify this information by setting the Product Order property for your summary. All summaries that are owned by the cross product group require that a Product Order be specified. Suppose that you have a matrix report that looks something like the one below. 1-10 Oracle Reports Users Guide to Building Reports Figure 1–5 Sample nested matrix report This is a nested matrix report. Assume that group G_YEAR contains the YEAR column, G_DEPT contains the DEPTNO column, G_JOB contains the JOB column, and G_CROSS is the cross product group. To create the summary of salaries by job that appears at the bottom of the matrix for each job, you create a summary column in G_CROSS with the following property settings: Figure 1–6 Matrix summary settings These settings specify that the summary should be calculated for each job in the G_JOB group and the summary should be reset to zero for each job in the G_JOB group. To create the summary of salaries by year which appears at the right of the matrix directly underneath the boilerplate lines, you create a summary column in G_CROSS with the following property settings: Figure 1–7 Matrix summary settings These settings specify that the summary should be calculated for each year in the G_ YEAR group and the summary should be reset to zero for each year in the G_YEAR group. To create the summary of salaries by year and department that appears at the right of the matrix for each department row of the matrix that contains a value, you create a summary column in G_CROSS with the following property settings: Basic Concepts 1-11 Figure 1–8 Matrix summary settings These settings specify that the summary should be calculated for each record of G_ DEPT within each record of G_YEAR. G_DEPT comes after G_YEAR in the Product Order because, in this report, it changes more frequently than G_YEAR. If G_YEAR changed more frequently that is, years were listed for each department, it would make more sense to have a Product Order of G_DEPT, G_YEAR. This summary is reset to zero for each record in the G_DEPT group. When you have multiple groups listed in Product Order and you want a non-running summary, the reset group should be the same as the last group in Product Order. When you have multiple groups listed in the Product Order and you want a running summary, the reset group should be a group other than the last one in the Product Order.

1.3.7.2 Matrix layout