About templates About template attributes

Advanced Concepts 2-53

2.7.1 About templates

Templates define common characteristics and objects that you want to apply to multiple paper-based reports. For example, you can define a template that includes the company logo and sets fonts and colors for selected areas of a report. When you use the Report Wizard to create a paper-based report, you use the Templates page of the wizard to apply a template .tdf file to the report. The Templates page lists the default templates, as well as any templates that you have created. When you choose a template, objects in the margin area of a template are imported into the same locations in the current report section, overwriting any existing objects. The characteristics formatting, fonts, colors, and so on of objects in the body area of the template are applied to objects in the body area of the current report section. Any template properties, parameters, report triggers, program units, and attached libraries you have defined are also applied. You can apply different templates to each section of the report. However, if you are applying one of the default templates, you cannot combine two report blocks that use different default templates in a single report. All of your report blocks in any one report must use the same default template. If you later apply another template to a report, the existing template objects will be deleted in the current report section. See also Section 4.12, Define a Template

2.7.2 About template attributes

In the Layout Body area of a template, you can define Default and Override attributes under the following Object Navigator nodes: ■ Frames , which contains the following: ■ a Section Frame node, which defines attributes for the parent frame surrounding the currently selected section. ■ a Headings Frame node, which defines attributes for the parent frame surrounding the column headings. ■ a Fields Frame node, which defines attributes for the parent frame surrounding the fields. ■ a Summaries Frame node, which defines attributes for the parent frame surrounding the summaries totals. ■ Field LabelsHeadings , which contains the following: ■ a Character node, which defines attributes for the labels or column headings of character fields. ■ a Number node, which defines attributes for the labels or column headings of number fields. ■ a Date node, which defines attributes for the labels or column headings of date fields. Note: If the list of templates does not appear, make sure that the REPORTS_PATH environment variable includes the location of the templates for example, ORACLE_HOME\reports\templates. 2-54 Oracle Reports Users Guide to Building Reports ■ Fields , which contains the following: ■ a Character node, which defines attributes for character fields. ■ a Number node, which defines attributes for number fields. ■ a Date node, which defines attributes for date fields. ■ Summary Labels , which contains the following: ■ a Character node, which defines attributes for the labels of summaries on character fields. ■ a Number node, which defines attributes for the labels of summaries on numeric fields. ■ a Date node, which defines attributes for the labels of summaries on date fields. ■ Summaries , which contains the following: ■ a Character node, which defines attributes for summaries on character fields. ■ a Number node, which defines attributes for summaries on number fields. ■ a Date node, which defines attributes for summaries on date fields. Default attributes The Default node in the Object Navigator defines the default visual attributes formatting, fonts, colors, and so on for all report styles. If you want to define attributes for individual report styles, you do so under the Override node. When you apply a template to a report, all Default attributes are applied to the report, except for attributes that are localized under the Override node. Override attributes Under the Override node in the Object Navigator, you can define attributes for individual report styles. Each report style contains one or more sections that map to groups in the report: Single-section report styles : Tabular, Form, Mailing Label, Form Letter Multiple section report styles : Group Left, Group Above, Matrix, Matrix with Group For the report styles that support multiple groups, you can create additional sections as needed. Sections are mapped to groups as follows: Same number of groups as sections : one-to-one mapping the first section is mapped to the first group, the second section to the second group, and so on. More groups than sections : one-to-one mapping until the next-to-last section. Then, all subsequent groups are mapped to the next-to-last section, and the last group is mapped to the last section. If only one section exists, all groups are mapped to it. More sections than groups : one-to-one mapping until the next-to-last group. Then, the last group is mapped to the last section. See also Section 4.12.2, Defining default template attributes Section 4.12.3, Defining override template attributes Advanced Concepts 2-55

2.7.3 About applying templates