Adding Fragments to an RTF Template

An RTF Template Fragment is a template that can be used as a smaller sub-section of a standard RTF Template. You do not generate a report from a Template Fragment on its own; instead you use a standard RTF Template that includes references to one or more Template Fragments.

Fragments can be called into any of the following sections in the RTF template:

Package
Element
Attribute
Method
 

When generating an RTF report, as the report generator processes each section in the RTF template, if it encounters a reference to a Template Fragment it will process that Fragment, inserting its output in the appropriate location of the generated report.

Access    Project Browser package context menu | Documentation | Rich Text Format (RTF) Report (F8) > Templates

Incorporating Template Fragments into an RTF Template

Step

Action

See also

1

Create the Template Fragment(s) to be included in your RTF Template.

Creating an RTF Template Fragment

 

2

Create a new RTF Template, or open an existing template in the RTF editor.

 

RTF Templates

3

In the Sections panel, select the checkbox against each section that will refer to the Template Fragment(s).

Setting Sections for Reporting

 

4

In the Content panel, at the appropriate point within one of these sections, right-click and select the Insert Template context menu option.

The Select Template dialog displays.

 

 

5

Click on the drop-down arrow and select the Template Fragment to insert.

 

 

6

Click on the OK button.

The tag {Template - <template name>}  is inserted at the current cursor position.

 

 

7

Repeat steps 4 to 6 for each Fragment you want to insert into the RTF Template.

Complete any other work you need to do on the template, then save it and use it to run reports.

 

 

Editing or Switching Template Fragments

Access    Right-click on the red Template tag > <required option>

Action

Detail

See also

Edit Template

Open the selected Template Fragment in another instance of the Document Template editor.

Design Custom RTF Templates

 

Switch Template

Display the Select Template dialog; click on the drop-down arrow and select a different Template Fragment.

 

 

Notes

You can also add a Fragment to an RTF Template by locating the Fragment in the Resources window and dragging the Template Fragment into the RTF Template Editor; Template Fragments are identified by an icon with a red T in the Document Templates > Global folder, or in any Fragment group that you have set up
It is possible to embed Template Fragments within a Fragment; however, this will slow down report generation

Learn more

Resources
 

Learning Center topics

(Alt+F1) | Reporting | RTF Template Fragments |
Add a SQL Fragment to Template
Add Script Fragment to Template