Designing for HTML Output
The HTML rendering extension renders a report in HTML format. The rendering extension can produce the following types of HTML: HTML 3.2, HTML 4.0, or MHTML. The rendering extension can also produce fully formed HTML pages or fragments of HTML to embed in other HTML pages. All HTML is generated with UTF-8 encoding.
The HTML rendering extension is the default rendering extension for reports that are viewed in a browser. The default HTML type is HTML 4.0.
- To use HTML 4.0, open the report in Report Manager, a SharePoint Web part, or a report URL.
- To use HTML 3.2, you must reference it on the a report URL (for example, http://<webserver>/reportserver?%2fProduct%sfSales&rs:Command=Render&rs:Format=HTML3.2).
- To use MHTML, you can reference it on a report URL or select it from the list of export formats on the report toolbar. The export format for MHTML is Web archive.
HTML 4.0 reports conform to the HTML 4.0 and Cascading Style Sheets level 2 (CSS2) specifications, with some exceptions. HTML 3.2 reports conform to the HTML 3.2 specification, but some styles may be included to improve appearance. The HTML rendering extension supports the MIME Encapsulation of Aggregate HTML Documents (MHTML) standard. This rendering extension embeds resources such as images, documents, or other binary files as MIME structures within the report HTML, in a single file. The encoded resources within the report increase the size of the report, but embedding the resources is useful for clients that do not have access to resources stored on the report server or in another location. MHTML reports are also useful for embedding within e-mail messages, because all resources are included with the report.
|When you define a parameter of type String, the user is presented with a text box that can take any value. If a report parameter is not tied to a query parameter and the parameter values are included in the report, it is possible for a report user to type expression syntax, script, or a URL into the parameter value, and render the report to HTML. If another user then views the report and clicks the rendered parameter contents, the user may inadvertently execute the malicious script or link. To mitigate the risk of inadvertently running malicious scripts, open rendered reports only from trusted sources. For more information about securing reports, see Securing Reports and Resources.|
Positioning of Items
The HTML rendering extension builds a table in HTML to contain the items in each set of report items. Items are positioned within the table to preserve the layout of the report. If the set of report items contain only one report item, the report item is rendered without the table. All locations and item sizes are expressed in millimeters (mm). Differences in sizes and positions less than 0.2 mm are rendered as 0 mm.
HTML does not support item overlap. If a report item overlaps another item, the items are arranged so that they do not overlap. This may result in items appearing on the page in different positions than was designed. In some cases, items may appear to not overlap in a design tool, but in fact do overlap. The size and position properties for the report items will reveal the true position of the report items. To determine the position of overlapping items, the rendering extension first considers the value of the Top element for the items, then the value of the Left element, and then the value of ZIndex.
The HTML rendering extension renders pages as separate HTML pages, also known as "sections," as follows:
- Page breaks will render when the following items are placed within a list with a page break or placed directly within the body of the report:
- Rectangles with PageBreakAtEnd or PageBreakAtStart set to True.
- Lists or list groups with PageBreakAtEnd or PageBreakAtStart set to True.
- Tables or table groups with PageBreakAtEnd or PageBreakAtStart set to True. The table must have at least one visible column. All parent groups for a table group must be visible.
- Matrices or row groups with PageBreakAtEnd or PageBreakAtStart set to True.
- Subreports with any of the above items.
- Items that begin above an item that contains a page break will appear on the page before the page break.
The HTML rendering extension will attempt to render all page breaks in items as described previously; however, two items with page breaks that are positioned next to each other on the page may yield unpredictable results. Items that have page breaks and that are contained within a table, matrix, or rectangle may also yield unpredictable results.
Any item placed next to an item with a page break will be rendered on the same page if the top of the item is above the bottom of the item with the page break. For example, a text box that is placed directly to the right of a table that has a page break at the end of the table will appear on the same page as the table. A text box that is placed to the right of and below the bottom of the same table will appear on the next page.
The HTML rendering extension will also insert page breaks at the approximate height of the page as defined in the properties for the report. This is primarily to prevent a large report with no page breaks from generating extremely large HTML pages when rendered.
When you render a report using the HTML rendering extension, you can specify several device information settings, including the following:
- Browser type
- Whether to render the HTML as a fragment or as a full HTML document
- Visibility of the document map
- Visibility of the parameters area
- Visibility of the toolbar
- Search information
- Stream information
- Zoom information
- The ID of a bookmark to display
- The target for hyperlinks
For more information about device information settings, see Reporting Services Device Information Settings.
In This Section
- Data Regions in HTML Rendering
Describes how data regions are rendered by the HTML rendering extension.
- Report Items in HTML Rendering
Describes how report items are rendered by the HTML rendering extension
- Page Layout in HTML Rendering
Describes how report layout and properties are rendered by the HTML rendering extension.
- MHTML Reports
Describes how MHTML reports are rendered by the HTML rendering extension.
Help and Information
14 April 2006