Oracle 10g Reports 4 of 4
Oracle 10g Reports 4 of 4
Oracle 10g Reports 4 of 4
Layout Templates
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS
COMPUTER IS STRICTLY PROHIBITED
You can use templates to define common characteristics and objects that you want to apply to
multiple reports. For example, you can define a template that includes the company logo and
sets fonts and colors for selected areas of a report.
To create an Oracle Reports Web Layout template:
1. Create a template file (.tdf file).
2. Create an HTML file that describes the layout.
3. Update the Web Template description file (rwTemplates.xml).
4. Test the new template.
5. Deploy the template in Oracle Reports and Oracle Application Server.
6. Add the template to the template library.
Oracle
Reports
Developer
10g: Build
Reports
C-2
THESE eKIT MATERIALS ARE
FOR YOUR
USE IN
THIS CLASSROOM
ONLY.
COPYING
eKIT MATERIALS FROM THIS
COMPUTER IS STRICTLY PROHIBITED
TDF file
HTML CSS
file
HTML file
Oracle
Reports
Developer
10g: Build
Reports
C-3
THESE eKIT MATERIALS ARE
FOR YOUR
USE IN
THIS CLASSROOM
ONLY.
COPYING
eKIT MATERIALS FROM THIS
COMPUTER IS STRICTLY PROHIBITED
3. A Cascading Style Sheet (CSS) file that is used to define the HTML font of the different
parts of a report.
Oracle
Reports
Developer
10g: Build
Reports
C-4
THESE eKIT MATERIALS ARE
FOR YOUR
USE IN
THIS CLASSROOM
ONLY.
COPYING
eKIT MATERIALS FROM THIS
COMPUTER IS STRICTLY PROHIBITED
2. Put all your generic HTML below the following HTML tags:
3. The <rw:style> tag is used to create the link between the template and the CSS that we
created and references into the rwTemplates.xml file:
4. Put all your generic HTML, such as the company logo in the <BODY> tag:
5. Specify the <rw:dataArea> tag, where the Wizard will insert the report block:
Oracle
Reports
Developer
10g: Build
Reports
C-5
THESE eKIT MATERIALS ARE
FOR YOUR
USE IN
THIS CLASSROOM
ONLY.
COPYING
eKIT MATERIALS FROM THIS
COMPUTER IS STRICTLY PROHIBITED
In an HTML editor, such as Macromedia Dreamweaver, create an HTML page that will define
the areas of your Web layout template.
1. Add the JSP header and taglib, then add the rw:report tag to reference the report
environment:
Oracle
Reports
Developer
10g: Build
Reports
C-6
THESE eKIT MATERIALS ARE
FOR YOUR
USE IN
THIS CLASSROOM
ONLY.
COPYING
eKIT MATERIALS FROM THIS
COMPUTER IS STRICTLY PROHIBITED
Oracle
Reports
Developer
10g: Build
Reports
C-7
THESE eKIT MATERIALS ARE
FOR YOUR
USE IN
THIS CLASSROOM
ONLY.
COPYING
eKIT MATERIALS FROM THIS
COMPUTER IS STRICTLY PROHIBITED
Attribute
id
cssFile
classSet
htmlFile
Value
references the name of the module in the Reports template file, for
example, mycompany.tdf. This is not the name of the file, but
the name that you see in the Object Navigator.
references the name of the CSS file that Report Wizard will place in
the <LINK> tag.
references the classSet id into the current XML file. The classSet
makes the relationship between each field type and the CSS Class.
references the file name of the HTML template, for example
myCompany.html.
Oracle
Reports
Developer
10g: Build
Reports
C-8
THESE eKIT MATERIALS ARE
FOR YOUR
USE IN
THIS CLASSROOM
ONLY.
COPYING
eKIT MATERIALS FROM THIS
COMPUTER IS STRICTLY PROHIBITED
Name
Value
TableStyle
ColumnHeader
RowHeader
CellText
specifies the class name of the <td> tag used for alphanumeric data
CellNumber
specifies the class name of the <td> tag used for numeric data.
CellDate
specifies the class name of the <td> tag used for date data
TotalText
specifies the class name of the <th> tag used for the summary empty
cells
specifies the class name of the <td> tag used for the summary non
empty cells
specifies the class name of the <th> and <caption> tags used for the
group above section
TotalNumber
GroupAboveHeader
3. After adding the <webTemplate> and <classSet> entries, save the rwTemplates.xml
file and restart Reports Builder.
Oracle
Reports
Developer
10g: Build
Reports
C-9
THESE eKIT MATERIALS ARE
FOR YOUR
USE IN
THIS CLASSROOM
ONLY.
COPYING
eKIT MATERIALS FROM THIS
COMPUTER IS STRICTLY PROHIBITED
2. If you have a specific CSS file with new class names, you need to add a new classSet
entry in the rwTemplates.xml file. The classSet tag contains all the class name (css)
for each field type. You add the <classSet> tag between the <classSets> </classSets> tags.
2. When you click Finish, you see the new report with your template code. The Report
Wizard replaces the empty <rw:style> and <rw:dataArea > tags with the generated code.
Oracle
Reports
10g: Build
Reports
C-10
THESE eKIT MATERIALS ARE
FOR YOUR
USE Developer
IN THIS CLASSROOM
ONLY.
COPYING
eKIT MATERIALS FROM THIS
COMPUTER IS STRICTLY PROHIBITED
1. Create a new report using the Report Wizard, and choose the TDF file you created, for
example, MyCompany.tdf template.
Location
$ORACLE_HOME/reports/docroot/
Description
Default root directory of Oracle
Reports Builder
$ORACLE_HOME/reports/docroot/images
$ORACLE_HOME/reports/docroot/css
While deploying a Web report on the Oracle Application Server, you need to make sure that all
the associated elements such as images and CSS files are in the correct location on the server.
Oracle
Reports
10g: Build
Reports
C-11
THESE eKIT MATERIALS ARE
FOR YOUR
USE Developer
IN THIS CLASSROOM
ONLY.
COPYING
eKIT MATERIALS FROM THIS
COMPUTER IS STRICTLY PROHIBITED
Oracle
Reports
10g: Build
Reports
C-12
THESE eKIT MATERIALS ARE
FOR YOUR
USE Developer
IN THIS CLASSROOM
ONLY.
COPYING
eKIT MATERIALS FROM THIS
COMPUTER IS STRICTLY PROHIBITED