HTML Box
An HTML Box displays an external HTML document in the report.
For information about when to use elements, see Choose report elements.
HTML Box (HTMLBox type) is a layout container, found in the Other Markup group in the Tool Box view.
Properties
Select the object on the Report Design page to display its properties in the Properties view.
Use the Location property to specify the location of the HTML document.
By default, the content of an HTML box does not propagate across pages. To split a large HTML Box into chunks using breakpoints, make it the child of a Vertical Box (Mini Page) and set the Split Oversized Items property of the Vertical Box to TRUE.
Embedding HTML
To embed a document, use a URL type that allows encoding the data in the body of the URL text. The full syntax of data URLs is:
data:[MIME-type][;charset=encoding][;base64],data
See data URI scheme (Wikipedia link) for a complete description of the concept and the syntax.
For our purposes, it is sufficient to support a simplified subset
that omits the charset
and assumes that characters are encoded in
UTF-8. Image data is always encoded in base64 (Wikipedia link) while other data such as HTML content is
typically “Percent encoded” (Wikipedia
link).
data:text/html, data
where data is the percent encoded data of the HTML document.
To embed HTML, use the data protocol syntax in the Location property of the HTMLBOX element.
To automatically construct this URL, click the ... button for the Location property. Choose the file and select the Embed in document check box:
Populating HTML content from text variables
Enter the code in the Expression Editor for the Location property of the HTML Box, including the name of the text variable.
To encode the data using percent encoding, use the function String.urlEncode().