Methods of RTF Template Creation
Although there are a virtually limitless
number of ways that RTF templates for Oracle BI Publisher could be created,
only two methods are supported:
• Basic RTF method
• Form field method
Methods of Creating RTF Templates
Basic RTF method: Using any word-processing
application that supports RTF version 1.6 (or later) to design a template using
Oracle BI Publisher’s simplified syntax
Form Field method: Using Microsoft Word’s
form field feature, place the syntax in hidden form fields rather than directly
into your design. Oracle BI Publisher supports this using Microsoft Word 2000
(or later) running Microsoft Windows 2000 (or later).
What Is Oracle BI Publisher Desktop?
following functions:
• Insert data fields.
• Insert data-driven tables.
• Insert data-driven forms.
• Insert data-driven charts.
• Preview your template with sample XML data.
• Browse and update the content of form fields.
• Extract boilerplate text into an XLIFF translation file and test
translations.
• All of these steps, and many others, can be performed manually.
Oracle BI Publisher Desktop simplifies the common tasks associated with
creating an Oracle BI Publisher RTF template.
• Oracle BI Publisher Desktop is available for download from MetaLink.
Use patch #4461378 (or later as directed) to obtain the Oracle BI Publisher
Desktop program.
Basic Method
Start with the User Listing Start 2.rtf
file. Edit the RTF template using the basic method to place the fields.
• Start Microsoft Word.
• In the template, you replace all the text within < > (angle
brackets) with the appropriate Oracle BI Publisher tags.
• Enter <?USER_NAME?> in the User Name field.
• Enter <?for-each:G_RESPS?> and <?APPLICATION_NAME?> in
the Application Name column of the table.
• Enter <?RESPONSIBILITY_NAME?> and <?START_DATE?> in the
corresponding columns.
By default, the User Listing Start 2.rtf
file is kept at the following directory path:
C:\Program Files\Oracle\XML Publisher
Desktop\samples\RTF templates\User Listing\
By default, you use Microsoft Word to
create and edit your RTF files. But, any program capable of creating and
editing RTF files can be used for the Basic method. The Form Field method
relies upon the Oracle BI Publisher Desktop plug-in that works only with
Microsoft Word 2000 and later.
Finishing the Basic Method
• Enter <?END_DATE?> and <end for-each?> in the End Date
column of the table.
• Save the new template as User Listing End 2.rtf.
• Exit Microsoft Word.
Viewing the Report
Start Oracle BI Publisher Viewer:
Why do you use the Template Viewer? In most
cases, if you have to put in fields using the Basic method, you are doing so
for one of three reasons.
1. You
prefer the Basic method.
2. You
are using an editor other than Microsoft Word 2000 or later.
3. You
are entering advanced tags.
Most users do not use the Basic method by
preference. They do so either because they are not using Microsoft Word, or
they are using advanced tags. Because you are not using any advanced tags in
this exercise, assume that you are not using Microsoft Word.
If you are using Microsoft Word, you could
view the results of your report directly within Oracle BI Publisher Desktop.
But the Template Viewer reproduces the same capabilities, and it has
capabilities that are not available to you via Microsoft Word, namely viewer
PDF templates.
Viewing the Report
Point the Template Viewer to your
working directory.
In this case, your working directory is:
C:\Program Files\Oracle\XML Publisher
Desktop\samples\RTF templates\User Listing\
Viewing the Report
•
Select the Data source
(FNDSCURX.xml)
•
Select the Template (User
Listing End 2.rtf)
•
Select the Output Format (PDF)
•
Click the Start Processing
button to produce your output.
Viewing the Report
If you have done everything correctly, you
should see Adobe Acrobat Reader open with the output of your report. If not,
you have done something in error, and you need to return to Microsoft Word to
edit your file until it produces the correct output.
Form Field Method
Start with the User Listing Start.rtf
file. Edit the RTF template using the Form Field method to place the fields.
- Start Microsoft Word.
- In the template, you replace all the text within < > (angle brackets) with the appropriate Oracle BI Publisher tags.
- Before you can use the Form Field method, you must load the associated XML data.
By default, the User Listing Start 2.rtf
file is kept at the following directory path:
C:\Program Files\Oracle\XML Publisher
Desktop\samples\RTF templates\User Listing\
By default, we are using Microsoft Word to
create and edit our RTF files. But, any program capable of creating and editing
RTF files can be used for the Basic Method. The Form Field Method will rely
upon the Oracle BI Publisher Desktop plug-in that only works in Microsoft Word
2000 and later.
Loading the XML Data
- Load the XML data using the Oracle BI Publisher Desktop (Template Builder) menu.
Loading the XML Data
- Select your XML data source (FNDSCURX.xml), and check for the confirmation message.
- Choose Insert > Field from the Oracle BI Publisher Desktop menu.
Inserting the Field
- When the Field selector opens, select USER_NAME from the list, and then click Insert.
Progress So Far
- Your RTF template should look similar to the following at this point:
- Notice that the USER_NAME field is GRAY in color, indicating that it is a form field.
Creating Your Table
- Create a data table for the rest of the data. Unlike the basic method, you are not going to start with a table created for you. You are going to allow Oracle BI Publisher Desktop create one for you.
- Choose Insert > Table/Form > Advanced from the menu.
Inserting Table/Form
- This opens the Insert Table/Form window.
Selecting G_RESPS
- Click G_RESPS in the Data Source pane, and drag it to the Template pane.
- You are prompted to select Drop Single Node, Drop All Nodes, or Cancel. Select Drop All Nodes to grab the four fields beneath G_RESPS.
Dropping the Nodes
- When you drop all the nodes, the Template pane will look as follows:
- Click the OK button in the Insert Table/Form window to save your work, and return to the template.
Your Finished Template
- When you return to your template, your table will have been created for you. Your template should look similar to the following:
- Notice that it has created the table, created the fields in the table, and created the <for-each> looping mechanism to loop through all the data.
Previewing Your Report
- Save your template as User Listing End.rtf.
- You can preview your results within Microsoft Word, or you can use the Template Viewer. Within Word, choose Preview > PDF from the menu.
Viewing the Report
If you have done everything correctly, you
should see Adobe Acrobat Reader open with the output of your report. If not,
you have done something in error, and you need to return to Microsoft Word to
edit your file until it produces the correct output.
Your report should look exactly the same
whether you produce it from within Microsoft Word or you use the Template
Viewer.
Designing the RTF Template
• Premarkup layout
• Supported native formatting features
• Add markup
• Images and charts
• Template features
• Conditional formatting
• Page-level calculations
• Data handling
• Variables, parameters, and properties
• Advanced report layouts
Premarkup Layout
Oracle BI Publisher converts all
formatting that you apply in the word-processing program to XSL-FO. But, some
features of your word processor may not be mappable to XSL-FO.
Student Lab
• Complete the files using the Basic and Form Field methods outlined in
the lesson. Test both methods via Template Viewer and within Microsoft Word to
ensure that everything works.
• Follow the same steps on your PC.
- Open Microsoft Word.
- Open the starting template, C:\Program Files\Oracle\XML Publisher Desktop\samples\RTF templates\User Listing\User Listing Start 2.rtf.
- Replace the <Put USER_NAME here> marker with <?USER_NAME?>.
- Replace the <put APPLICATION_NAME here> marker with <?APPLICATION_NAME?>.
- Replace the <put RESPONSIBILITY_NAME here> marker with <?RESPONSIBILITY_NAME?>.
- Replace the <put START_DATE here> marker with <?START_DATE?>.
- Replace the <put END_DATE here> marker with <?END_DATE?>.
- Replace the <put for-each here> marker with <?for-each:G_RESPS?>.
- Replace the <put end for-each here> marker with <?end for-each?>.
- Save your progress at User Listing End 2.rtf.
- Exit Microsoft Word.
- Start the Template Viewer (Start > Programs > Oracle XML Publisher Desktop > Template Viewer).
- Point to the C:\Program Files\Oracle\XML Publisher Desktop\samples\RTF templates\User Listing\ directory.
- Select FNDSCURX.xml as your Data.
- Select User Listing End 2.rtf as your Template.
- Set the Output Format drop-down to the format of your choice (for example, PDF).
- Click the Start Processing button.
- View the resulting output.
- Close the output.
- Open Microsoft Word.
- Open the starting template, C:\Program Files\Oracle\XML Publisher Desktop\samples\RTF templates\User Listing\User Listing Start.rtf.
- Load the XML data at C:\Program Files\Oracle\XML Publisher Desktop\samples\RTF templates\User Listing\FNDSCURX.xml.
- Choose Insert > Field from the menu to replace the <INSERT USER NAME HERE> marker.
- Position your cursor in the document where you wish to create your data table at the <INSERT TABLE OF RESPONSIBILITIES HERE> marker.
- Choose Insert > Table/Form > Advanced from the menu.
- Click <G_RESPS> and drag it from the Data Source pane to the Template pane.
- Select Drop All Nodes when prompted.
- Click the OK button to insert the data table.
- Save your progress as User Listing End.rtf.
- Preview your report within Microsoft Word by choosing Preview > PDF (or the output format of your choice).
- Exit Microsoft Word.
0 comments:
Post a Comment