Specifying auto-expand layout for HTML output
As described previously, by default, the contents of a report appear in a fixed‑width area determined by the page and margin sizes set in the master page. While this behavior is standard for page-based formats, such as PDF and DOC, it is not always desirable for HTML output. Typically, HTML documents are formatted to display content that adjusts to the size of the browser window.
If you are designing an HTML report and you want the report to expand or contract with the browser window or the BIRT report viewer window, set the report’s Layout Preference property to Auto Layout. The Auto Layout setting changes the layout of HTML output only and has no effect on the other output formats.
Compare the reports in Figure 8‑42 and Figure 8‑43. Figure 8‑42 shows a report in which Layout Preference is set to Fixed Layout. The table and column widths do not have specified values, so BIRT creates a table with columns of equal widths.
Figure 8‑42 HTML report in which Layout Preference is set to Fixed Layout
Figure 8‑43 shows the same report, but the Layout Preference property is set to Auto Layout. The table does not have a fixed width, nor do the columns in the table. The content fills the area in the window.
Figure 8‑43 HTML report in which Layout Preference is set to Auto Layout
How to specify auto-expand layout for an HTML report
1 In the layout editor, click in an empty area of the report page.
2 In Property Editor, in the report’s general properties, set Layout Preference to Auto Layout, as shown in Figure 8‑44.
Figure 8‑44 Property Editor showing the general properties of the report, including the Layout Preference property
3 Make sure there are no values specified for the width property of the table or any of the columns. Specific width values create a fixed-width report.