Working with HTML

This section explains how to use HTML in the Report Designer.

When you add/edit a static text element the Report Designer displays the HTML Editor dialog. In this dialog you can enter plain text, but you can also use the HTML Editor features to embed HTML tags into the text to modify parts of it - for example, you can assign different foreground color, different background color or different font to different parts of the text (see below):

and this is the result:

You can embed tag expressions into such text, just like it is done for regular text.

The example above uses simple HTML formatting, but you can also use big HTML blocks inside the Report Designer. Most likely the HTML will be copied from outside of the Report Designer. In order to use this code inside the HTML Editor, click on the </> icon in the toolbar of HTML Editor (it is the last icon on the right) and paste the HTML code into the popup up dialog. Then click OK and HTML will be displayed in the HTML editor as shown below:

and this is the result:

You can embed tag expressions into HTML blocks as well.

HTML support is probably the most useful when it is used with dynamic text elements. If you have an object with an attribute of the Plain Text type with and HTML Content type, you can define a tag expression that points to this attribute like so

<<SomeObject.HtmlAttribute>>

. Then at runtime the report will be automatically populated with the HTML content of the attribute.

Note that there are some limitations on the structure of the HTML if the report with HTML is exported in the PDF format - specifically, styles that include padding, margins, width and height directives.

Examples of unsupported constructs:

<div style="padding: 5px; margin-left: 10px; width: 200px">

The following style attributes ARE supported: font-family, font-size, font-style, font-weight, text-decoration, color, line-height, text-align

There are no limitations on the supported HTML if the report is exported in the HTML format.