ActiveReports 13
Formatted Text
ActiveReports 13 > ActiveReports User Guide > Concepts > Page Report/RDL Report Concepts > Toolbox > Formatted Text

The FormattedText report control can perform mail merge operations, plus it displays richly formatted text in HTML. To format text in the FormattedText report control, enter HTML code into the Html property.

The design time editor displays the HTML text with the applied formatting, so you can view the text just as it will be displayed at run time in the Designer tab.

Supported HTML Tags

If you use valid HTML tags that are not in this list, ActiveReports ignores them.

Important: All text used in the Html property must be enclosed in the <body></body> tags.
Tag Description
<%MergeFieldName%> Inserts a mail merge field.
<!-- -- > Defines a comment
<!DOCTYPE> Defines the document type
<a> Defines an anchor
<abbr> Defines an abbreviation
<acronym> Defines an acronym
<address> Defines an address element
<b> Defines bold text
<base /> Defines a base URL for all the links in a page
<bdo> Defines the direction of text display
<big> Defines big text
<blockquote> Defines a long quotation
<body> Defines the body element (Required)
<br /> Inserts a single line break
<caption> Defines a table caption
<center> Defines centered text
<cite> Defines a citation
<code> Defines computer code text
<col> Defines attributes for table columns
<dd> Defines a definition description
<del> Defines deleted text
<dir> Defines a directory list
<div> Defines a section in a document
<dfn> Defines a definition term
<dl> Defines a definition list
<dt> Defines a definition term
<em> Defines emphasized text
<h1> to <h6> Defines header 1 to header 6
<head> Defines information about the document
<hr /> Defines a horizontal rule
<html> Defines an html document
<i> Defines italic text
<img /> Defines an image
<ins> Defines inserted text
<kbd> Defines keyboard text
<li> Defines a list item
<link> Defines a link
<map> Defines an image map
<menu> Defines a menu list
<ol> Defines an ordered list
<p> Defines a paragraph
<pre> Defines preformatted text
<q> Defines a short quotation
<s> Defines strikethrough text
<samp> Defines sample computer code
<small> Defines small text
<span> Defines a section in a document
<strike> Defines strikethrough text
<strong> Defines strong text
<style> Defines a style definition
<sub> Defines subscripted text
<sup> Defines superscripted text
<table> Defines a table
<tbody> Defines a table body
<td> Defines a table cell
<tfoot> Defines a table footer
<th> Defines a table header
<thead> Defines a table header
<tr> Defines a table row
<tt> Defines teletype text
<u> Defines underlined text
<ul> Defines an unordered list
Caution: To enter & in the HTML property, you need to use &amp;.

Formatted Text Dialog

Properties for the FormattedText report control are available in the Formatted Text dialog. To open it, with the control selected on the report, under the Properties Window, click the Property dialog link.

The Formatted Text dialog lets you set properties on the report control with the following page.

General

Name: Enter a name for the FormattedText that is unique within the report. This name can be called in code. You can only use underscore (_) as a special character in the Name field. Other special characters such as period (.), space ( ), forward slash (/), back slash (\), exclamation (!), and hyphen (-) are not supported.

Tooltip: Enter the value or expression you want to appear when a user hovers the cursor over the FormattedText in the viewer at run time.

Visibility

Initial visibility

Visibility can be toggled by another report control: Select this check box to display a toggle image next to another report control. This enables the drop-down box below where you can specify the TextBox control that toggles the visibility of the FormattedText. The user can click the toggle item to show or hide this FormattedText.

Navigation

Document map label: Enter an expression to use as a label to represent this item in the table of contents (document map). 

Bookmark ID: Enter an expression to use as a locator for this FormattedText. You will then be able to provide a bookmark link to this item from another report control using a Jump to bookmark action.

Appearance

Background

Color: Select a color to use for the background of the FormattedText.

Image: Enter an image to use for the background of the FormattedText.

Border

Style: Select a style for the border.

Width: Enter a value in points to set the width of the border.

Color: Select a color to use for the border, or select the <Expression...> option to open the Expression Editor and create an expression that evaluates to a .NET color.

Data Output

Element name: Enter a name to be used in the XML output for this FormattedText report control.

Output: Choose Auto, Yes, No, Contents Only to decide whether to include this FormattedText in the XML output. Choosing Auto exports the contents of the FormattedText report control.

Mail Merge

Click the plus sign button to add a new mail merge field to the FormattedText, and delete them using the X button. Once you add one or more fields, you can reorder them using the arrow buttons.

Field: Enter a name for the field that is unique within the report. This is used in the Html property inside <%FieldName%> tags to display the field in the formatted text.

Value: Enter an expression to pull data into the control for mail merge operations. 

Here is a very simple example of HTML code that you can use to add mail merge fields to formatted text. This example assumes that you have added two mail merge fields named Field1 and Field2.

Paste this code in the Html property of the FormattedText control.
Copy Code
<body><p>This is <%Field1/%> and this is <%Field2/%>.</p></body>
See Also