Inserting Bookmarks Dynamically

Note
This feature is supported by version 20.3 or greater
Note
The code uses some of the objects defined in The Business Layer.

Dynamic insertion of bookmarks for Word Processing documents and emails with HTML and RTF bodies

You can insert bookmarks to your reports dynamically using bookmark tags. Syntax of a bookmark tag is defined as follows.

<<bookmark [bookmark_expression]>>
bookmarked_content
<</bookmark>>

Here, bookmark_expression defines the name of a bookmark to be inserted during run-time. This expression is mandatory and must return a non-empty value. While building a report, bookmark_expression is evaluated and its result is used to construct a bookmark start and end that replace corresponding opening and closing bookmark tags respectively.

Warning
A bookmark tag cannot be used within a chart.

The following code snippet shows how simple you call the document assembler to generate report from the template:

Dynamic naming of cell ranges for Spreadsheet documents

Template syntax and usage of Document Assembler is same as above section for dynamic naming of cell ranges for Spreadsheet documents. The difference is that it results to insertion of named cell ranges instead of bookmarks.

Download Templates