About matrix objects Data Model Objects

Advanced Concepts 2-23 query and three groups the query will establish a relationship between the two detail groups. Figure 2–4 Masterdetaildetail report See also Section 1.7.2, About groups Section 1.7.4, About data links

2.3.7 About matrix objects

A matrix object merely defines a relationship between two repeating frames: it isnt really owned by any object, nor does it own any object. A matrix object is created only for layouts with a Matrix layout style. A report may have multiple matrices within it, provided that the data model contains the necessary groups. Oracle Reports Builder creates one matrix object for each pair of intersecting, perpendicular repeating frames. The repeating frames are the dimensions of the matrix and the matrix object contains the field that will hold the filler or values of the cell group. One of the repeating frames must have the Print Direction property set to Down and the other must have the Print Direction property set to Across in order to form a matrix. Restrictions ■ The down repeating frames must be below the across repeating frames in a matrix. Note: When running a JSP-based Web report that includes a matrix object, the JSP rw:include tag expects the matrix object to format on only one page. However, if the cells in the across repeating frame expand, the column headers of the matrix may be forced onto a second page regardless of the page size. Therefore, these matrix headers will not appear in the report output. Additionally, in this situation, the paper layout does not display correctly as header fields move to subsequent pages where the cell values remain on the first page. To resolve this, it is important to carefully define in the Report Editor the space available to the across repeating frame to allow for displaying the largest values, then set the Vertical Elasticity property of the across repeating frame to Fixed. 2-24 Oracle Reports Users Guide to Building Reports ■ A matrix object must always be on top of the repeating frames that form it that is, it must be one or more layers above its horizontal and vertical repeating frames. Oracle Reports Builder prevents you from moving the matrix below its horizontal and vertical repeating frames. ■ Moving a matrix also causes its two repeating frames to move. ■ A matrix object cannot be anchored to another object and other objects cannot be anchored to it that is, a matrix object cannot be the parent or child object for an anchor. ■ To copy a matrix, you must select the matrix and its two repeating frames. If you select the matrix object by itself, nothing will be copied to the paste buffer. If you select the matrix and one of the repeating frames, only the repeating frame is placed in the paste buffer. ■ A matrix object can only be resized by resizing its associated repeating frames. ■ You cannot use Alignment or Size Objects from the Layout menu on matrix objects. ■ The source groups of the repeating frames that make up the dimensions of a matrix must be from the same cross-product group. ■ Repeating frames whose source groups are in the same family hierarchy that is, are descendants or ancestors of each other must have the same Print Direction. Parent-child relationships within a cross-product group are used to create nesting in the matrix. As a result, the repeating frames associated with such groups must print in the same direction on the page. ■ You can put a border on a matrix object just as you would any other object, but the width will always be the minimum width possible. You cannot widen the border due to the closeness of the objects in a matrix layout. Example Suppose that you have a group named Group1 that contains a column called C_ DEPTNO, which gets its values from the database column DEPTNO. A group called Group2, contains column C_JOB, which gets its values from the database column JOB, and column C_DEPTNO1, which is used for linking to Group1s query. A group called Group3 contains a column called SUMSAL, which is a summary of the database column SAL. Job Analyst Clerk Manager 10 1300 2450 Dept 20 6000 1900 2975 30 950 2850 In this example: ■ The Vertical Repeating Frame is the repeating frame that contains Group2 the job titles. ■ The Horizontal Repeating Frame is the repeating frame that contains Group1 the department numbers. ■ The Cross Product Group is Group4 the group that is the parent of Group1 and Group2. If you need to build a more complex matrix, you can do so by adding more columns to Group1 and Group2. For example, instead of having Group1 just contain department Advanced Concepts 2-25 numbers, it could also contain the locations LOC of the departments. The matrix might then look something like this: Job Loc Dept Analyst Clerk Manager New York 10 1300 2450 Dallas 20 6000 1900 2975 Chicago 30 950 2850 See also Section 1.3.7, About matrix reports Section 2.1.7, About nested matrix reports Section 2.1.8, About matrix with group reports Section 4.9.1.3, Creating a matrix object Section 4.8.8, Creating a matrix cross-product group Section 4.5.3, Creating a nested matrix report

2.4 Layout Objects

The topics in this section build on the basic concepts discussed in Section 1.8, Layout Objects . ■ About layout objects ■ About layout defaulting ■ About images ■ About anchors ■ About changing colors and patterns ■ About resizing objects ■ About moving and layering objects in the Paper Layout view

2.4.1 About layout objects

Several important concepts and properties apply to layout objects: ■ the frequency with which you want the object to appear in the report, specified by the Print Object On property ■ how Oracle Reports Builder fetches and formats data for instances of repeating frames, specified by the Column Mode property ■ whether to keep an object and the object to which it is anchored on the same logical page, specified by the Keep With Anchoring Object property ■ whether to try to keep the entire object and its contents on the same logical page, specified by the Page Protect property ■ format triggers, which are PLSQL functions executed before an object is formatted that can dynamically change the formatting attributes of objects ■ report layout, generated by defaulting applied by Oracle Reports Builder, modified in the Paper Layout view, or created from scratch.