Add HTML to a report with the Bold Reports® textbox

The text box report item in the Bold Reports® Web Report Designer lets you insert HTML-formatted text into a report. The text can be any simple or complex expression, or a value retrieved from a field in your dataset.

How do I format plain text as HTML?

To render text as HTML in the Bold Reports® Web Report Designer, set the textbox Markup Type property to HTML. Follow these steps:

  1. Drag and drop a textbox report item onto the design surface.

    Add textbox

  2. Enter the text in valid HTML format in the text area.

    Enter valid html text

  3. Select the text and set HTML in the Markup Type property.

    Set Markup Type

You can also use the markup property to format a dataset field that returns HTML text from a database, or an expression that evaluates to text in HTML format.

On report preview, the text is rendered as HTML, as shown in the following image.

Markup type preview

Which HTML tags and CSS attributes are supported?

The Bold Reports® textbox ignores invalid HTML markup tags and cascading style sheet attributes and renders them as plain text. The following HTML tags and cascading style sheet attributes render as HTML when defined with the HTML markup type:

  • Hyperlinks: <A HREF>

  • Fonts: <FONT>

  • Header, style and block elements: <H{n}>, <DIV>, <SPAN>,<P>, <DIV>, <LI>, <HN>

  • Text format: <B>, <I>, <U>, <S>

  • List handling: <UL>, <LI>

  • Break: <BR>

  • text-align, text-indent

  • font-family

  • font-size

  • color

  • padding, padding-bottom, padding-top, padding-right, padding-left

  • font-weight

Download the HTML in a report design (RDL)

Frequently asked questions

What happens to invalid HTML tags in a textbox?

The Bold Reports® textbox ignores invalid HTML markup tags and cascading style sheet attributes and renders them as plain text.

Can a dataset field contain HTML?

Yes. You can use the markup property to format a dataset field that returns HTML text from a database, or an expression that evaluates to text in HTML format.

See also