Designing for Image Output

The Image rendering extension renders a report to a bitmap or metafile. By default, the Image rendering extension produces a TIFF file of the report, which can be viewed in multiple pages. When the client receives the image, it can be displayed in an image viewer and printed.

The Image rendering extension can generate files in any of the formats supported by GDI+: BMP, EMF, GIF, JPEG, PNG, and TIFF. For TIFF format, the file name of the primary stream is ReportName.tif. For all other formats, which render as a single page per file, the file name is ReportName_Page.ext where .ext is the file extension for the chosen format.

Report Appearance

The Image rendering extension processes the report by assembling all elements of the report on a virtual page (or set of pages) on the server, then creating an image from that virtual page. With extensions like the HTML rendering extension, you rely on the client browser to display the final report to the user. This can lead to varying user experiences, based on browser versions, settings and fonts. With an image, you are assured that each user is viewing the same font and layout.

Because the report is rendered on the report server, you will need to make sure that the appropriate fonts are installed on it.

Positioning of Items

Many items can change size when they are rendered in a report. For example, text boxes can grow or shrink depending on the data contained within them. Matrices and tables expand based on rows of data. Items appear and disappear as they are shown and hidden. When the Image rendering extension renders a page, it calculates the sizes of each item and then positions the items around it. For example, a text box below a table is moved down as the table expands.

If an item overlaps another item, the value of the ZIndex element in the report definition for those items determines how the items are rendered. The item with the higher ZIndex value is rendered on top of the item with a lower ZIndex value.

The page header and footer are rendered inside the margins of the report. The space for the page header and footer is always reserved, even if the header or footer is not rendered on a particular page. Page headers and footers span all columns that may exist in the body of the report.

Pagination

The size of the page produced by the Image rendering extension is determined by the page width and height for the report, plus margins. This can be overridden by device information settings when the report is rendered.

The body width and the page width of the report can be different. If the body width is greater than the page width, a single "page" of a report displays on two physical pages. If the body width is smaller than the page width, extra white space is displayed on the page.

An item below a page break is pushed onto the start of a new page. If the page break is inside a container such as a rectangle, the container is split between pages.

Keep Together

Items on a report can be set to keep together on a single page. For some items, such as data regions, this must be explicitly set on the item. For others, such as table rows, items are kept together, if possible. If the item contains no page breaks and its height is less than the height than the available area on the page, the whole item is rendered on that page. If the item does not fit, a page break is placed at the beginning of the item and it is rendered on the next page. If a report item or set of report items is larger than the page, the item will split when it reaches the bottom of the page. Items that repeat on new pages will display once on each page on which the related item appears.

The following table describes how individual items keep together on a page.

Item Behavior

List

If the KeepTogether property for the list is True, all repeating instances of the list are kept together, unless the list contains a page break.

Table

If the KeepTogether property for the table is True, all rows of the table are kept together, unless they contain a page break.

Matrix

If the KeepTogether property for the list is True, all cells of a matrix are kept together, unless they contain a page break.

Chart

A chart is always kept together.

Table row

A table row is always kept together, unless it contains a page break.

Table column

A table column is always kept together.

Table group header

A table group header and the first detail row following the header are kept together.

Table group footer

A table group footer and the last previous detail row before the footer are kept together.

Matrix row

A matrix row is always kept together, unless it contains a page break.

Matrix column

A matrix column is always kept together, unless it contains a page break.

Rectangle

A rectangle is always kept together, unless it contains a page break.

Image

An image is always kept together.

Line

A line is always kept together.

Text box

A text box is always kept together. If it must split, it splits between lines, never in the middle of a line.

Subreport

A subreport is not kept together.

Table group

A table group is not kept together.

Matrix group

A matrix group is not kept together.

Rendering

When you render a report using the Image rendering extension, you can specify several device information settings, including the following:

  • A range of pages to render.
  • Page width and height.
  • Margin size.
  • Number of columns and column spacing.
  • Resolution of the image.
  • Format of the image.
  • Color depth of the image.

For more information about device information settings, see Reporting Services Device Information Settings.

In This Section

See Also

Concepts

Design Considerations for Report Rendering

Help and Information

Getting SQL Server 2005 Assistance