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 on the preview.
By clicking on the FormattedText control, you can set its properties in the Properties window.
Property | Description |
---|---|
AccessibleDescription | Enter the alternative description of the control for use by accessibility client application. The property on exporting the report adds the ‘alternative text’ in PDF and ‘alt’ attribute in HTML. |
EncodeMailMergeFields | Select whether you want to encode mail merge fields or not. |
Html | Enter HTML code to format text. |
MailMergeFields | Add new mail merge fields to the FormattedText. |
Size | Set the Width and Height of the FormattedText control. |
You can set the FormattedText properties in the FormattedText dialog. To open it, with the FormattedText selected on the report, under the Properties window, click the Property dialog link.
The FormattedText control supports almost all HTML tags and attributes from the XHTML 1.1 specification (see https://www.w3.org/TR/xhtml11/ for details) with some extensions to partially support the HTML5 specification (see https://www.w3.org/TR/2011/WD-html5-20110405/ for details). Additionally, the FormattedText control supports many (but not all) CSS styles.
For example, the FormattedText control supports these HTML tags and attributes. If you use valid HTML tags that are not in the list below, ActiveReports ignores them.
Supported HTML Tags and Attributes
HTML Tags | Attributes | 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> | style | 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> | align | 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 /> | align src height width |
Defines an image. Use src attribute to define path of the image, for example: To refer an image embedded within the report, specify the image name: |
<ins> | Defines inserted text | |
<kbd> | Defines keyboard text | |
<li> | Defines a list item | |
<link> | href | Defines a link |
<map> | Defines an image map | |
<menu> | Defines a menu list | |
<ol> |
type |
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> |
align |
Defines a table |
<tbody> |
|
Defines a table body. |
<td> | align bgcolor colspan height nowrap rowspan valign width |
Defines a table cell |
<tfoot> | Defines a table footer | |
<th> | abbr align axis bgcolor colspan headers height nowrap rowspan scope sorted valign width |
Defines a table header |
<thead> | Defines a table header. It is used along with <tbody> and <tfoot>. | |
<tr> | align bgcolor bordercolor height valign |
Defines a table row |
<tt> | Defines teletype text | |
<u> | Defines underlined text | |
<ul> | Defines an unordered list |