ORACLE BI PUBLISHER/UNIFIER
DOWNLOAD THE PDF HERE
A report could comprise of many sections. When these sections run too many pages it can be useful to have bookmarks available to quickly jump between them when reviewing the data. This Tech Tip will outline the steps to create bookmarks in the PDF output format.
There are two bookmarking methods:
A simple custom report was created that uses one subview for Change Order records and one for listing Risks & Issues records.
The following is the output when the sample XML is generated and is used for this Tech Tip.
For this example, there is a simple RTF built which includes two tables (on separate pages) that lists Change Order records and Risks & Issues records grouped by project.
The placeholders have the following code.
(for-each) : <?for-each:Main?>
Change Orders (F) :
Risks & Issues (F) :
When previewed, the PDF output is as shown below. One page lists Change Order records. The next section starting on a new page lists Risks & Issues records.
If the number of records for the Change Orders and Risks and Issues sections runs over many pages, it would be helpful to have bookmarks to get to the different sections easily.
Highlight the first report section heading ‘Change Orders’ and select Heading 1 from the Home tab.
The settings in the Modify Style window can be modified to fit the report’s style. In this example, the defaults are used. Click OK.
The heading has been set.
Repeat the same steps for the Risks & Issues heading.
A Table of Contents (TOC) needs to be included in the RTF file. This can be included on the very last page. In the References tab, select Table of Contents, and for this example, Automatic Table 1 is selected.
With the TOC section now included, two lines of code (in red) are added. One line before and one after the TOC display section. This will support the bookmarking feature when the PDF output is generated.
The PDF bookmarks are visible when previewing the output in PDF format.
This method allows the bookmark label to dynamically change to be more specific to a section. This RTF file builds from the first method where there are Change Order and Risks & Issues sections split out by each Vendor and Risk Category respectively. A new page section will start for each.
With each section, an additional grouping is included. The following code is added.
(for-each) : <?for-each-group:CO;./CO_VENDOR_ID?>
Risks & Issues:
(for-each) : <?for-each-group:RI;./RI_RISKCATEGORY?>
Using the same sample XML the previewed PDF output would show as follows. As the bookmarks are static the bookmark label is repeated and the same. This makes it difficult to distinguish the difference between the bookmarks and what each section lists.
The bookmarks would be more useful if the Vendor/Risk Category was also displayed.
As the headings are already set to the Heading style, all that is needed is to add the XML tag name.
After Changes Orders heading ‘for <?CO_VENDOR_ID?>’ is added.
Before Risks & Issues heading ‘<?RI_RISKCATEGORY?>’ is added.
It is important to note the XML tag names are entered directly as text and not within a placeholder. The bookmarking feature only recognizes tag name as text.
The code in the TOC must change to the following for dynamic support. The TOC must now be updated to account for the heading changes. Right-click on the TOC section and click Update Field.
In the pop-up window select Update Entire Table.
The TOC is now updated.
Now the output is previewed and the bookmark labeling is more meaningful for each section.
In summary, this Tech Tip provided the two methods for adding PDF bookmarks. Static method where each heading is already unique and the dynamic method where more meaningful bookmark labeling is required.