This chapter describes the concepts of associating XML data to layout elements in a report template. It describes basic techniques as well as advanced techniques for creating complex and highly conditionalized report formats.
If you are using Microsoft Word to create RTF templates, then see Creating RTF Templates Using the Template Builder for Word before reading this chapter. The demos and samples provided in the Template Builder installation can help orient you to the process of creating templates in Microsoft Word.
It is not required to have Microsoft Word or the Template Builder to create RTF templates and this chapter describes how to add components without using the Template Builder. Many of the layout components described in this chapter can also be inserted in a template using the Template Builder.
This section covers the following topics:
Rich Text Format (RTF) is a specification used by common word processing applications, such as Microsoft Word.
When you save a document, RTF is a file type option.
BI Publisher converts documents saved as the RTF file type to XSL-FO enabling you to create report layouts using many standard word processor features.
During design time, you add data fields and other markup to the template using BI Publisher's simplified tags for XSL expressions. These tags associate the XML report data to the report layout and include other processing instructions.
In addition to the word processor's formatting features, BI Publisher supports other advanced reporting features such as conditional formatting, dynamic data columns, running totals, and charts.
If you are familiar with XSL and prefer not to use the simplified tags, BI Publisher also supports the use of pure XSL elements in the template. If you want to include code directly in the template, then you can include any XSL element, many FO elements, and a set of SQL expressions that BI Publisher extends.
You must perform these tasks before designing a template.
Before you design a template, you must:
Know the business rules that apply to the data from the source report.
Generate sample data from the report data model.
For information on generating sample data from a data model, see Testing Data Models and Generating Sample Data in Data Modeling Guide for Oracle Business Intelligence Publisher.
Be familiar with the formatting features of Microsoft Word.
BI Publisher uses the XSLT processor provided by Oracle XDK 11.1.0.7.0, which supports the W3C XSL Transformations 1.0 recommendation.
The processor also implements the current working drafts of the XSLT and XPath 2.0 standards. For more information about Oracle XDK, see: Oracle XML Developer's Kit Programmer's Guide.
By default, BI Publisher is compatible with XSLT 1.0. If you want to use XSLT and XPath 2.0 features in the template, then you must disable XSLT 1.0 compatibility. This configuration is performed at the template level. The template-level setting overrides the server setting.
XSLT compatibility is set as a Build Option in the Template Builder for Word. See Setting UI Options.
When you design the template layout, you must understand how to associate the XML input file to the layout.
This chapter presents a sample template layout with its input XML file to illustrate how to make the proper associations to add the markup tags to the template.
Use the word processor's formatting features to create the design.
For example:
Select the size, font, and alignment of text
Insert bullets and numbering
Draw borders around paragraphs
Include a watermark
Include images (jpg, gif, or png)
Use table auto formatting features
Insert a header and footer
For additional information on inserting headers and footers, see Defining Headers and Footers.
For a detailed list of supported formatting features in Microsoft Word, see Supported Formatting Features of Microsoft Word.
When you create an RTF template, you add BI Publisher code to the RTF document. Follow one of these methods that are supported for adding code.
BI Publisher supports the following methods for adding code:
Basic RTF Method
Use any word processor that supports RTF version 1.6 writer (or later) to design a template using BI Publisher's simplified syntax.
Form Field Method
Using Microsoft Word's form field feature allows you to place the syntax in hidden form fields, rather than directly into the design of the template.
Note:
If you use XSL or XSL-FO code rather than the simplified syntax, then you must use the form field method.
This chapter describes how to create RTF templates using the preceding methods.
If you are using Microsoft Word, you can use the BI Publisher Template Builder for Word to facilitate inserting BI Publisher code fields. For detailed information, see Creating RTF Templates Using the Template Builder for Word.