Data Regions in Excel Rendering

RDL/RDLC (Reporting Services )导出 Excel的数据呈现方式 

A data region is an area on a report containing data from a data source. Types of data regions are charts, lists, tables, and matrices. This topic describing rendering behavior when exporting data regions to Microsoft Excel.

  Charts

Charts are rendered as pictures, not Excel charts. A chart is rendered the same way as an image element.

  Lists

List elements show only their contents. The list is rendered for each data row or data group in Excel. Items in the list are positioned on the worksheet relative to their location in the report, which can lead to unexpected results. For this reason, lists are not recommended for incorporation in reports designed to be rendered in Excel.

  Tables

Tables in reports are rendered as rows and columns of cells in Excel. Page breaks on report items inside a table cell are ignored.

  Matrices

Matrices in reports are rendered as a set of formatted cells in the Excel file, much like the report in HTML. Matrix subtotals are not rendered as formulas, and the matrix is not rendered as an Excel PivotTable. Matrix data regions are fully expanded when rendered in Excel. If you hide all or part of a matrix at design time, at run time the hidden property is ignored and all rows and columns are visible in the report.

For groups, when a group is expanded, both the detail and the subtotal row is displayed. This is different than how groups are shown when viewing them in the HTML Viewer. In the HTML Viewer, when groups are expanded, the subtotal is hidden and the detail is displayed. For an example of this behavior, view the Company Sales report in the HTML Viewer, then Export it to Excel. For more information about sample reports, see AdventureWorks Report Samples.

ms155976.note(en-US,SQL.90).gifNote:

Any data region nested inside of a table or matrix data region is not supported. An error is displayed in Excel if this layout is encountered.

http://msdn.microsoft.com/en-us/library/ms155976%28SQL.90%29.aspx

 

Report Items in Excel Rendering

Report items are items other than data regions (tables, matrices, lists, and charts). If a report item is in a container, such as a rectangle or list, the coordinates for the item are relative to the container. For example, if the report item is defined in a rectangle, the coordinates of the individual item are relative to the rectangle.

This topic describes the rendering behavior when exporting text boxes, rectangles, images, subreports, and actions to Microsoft Excel.

  Text boxes

When the Textbox element is rendered in Excel, the data type may be converted to one of the data types available in Excel. Numeric values convert to the value of the number with full precision, and a period as a decimal separator. Boolean values of 0 and 1 convert to the strings "true" or "false".

  Rectangles

Rectangles are converted to groups of cells. If rectangles contain other items, the rectangle becomes a region of cells, and the border and background color of the rectangle is applied to the region of cells. The borders are converted to cell borders, and the background is converted to background colors for the contained cells. This applies to all items that act as rectangular free-form layout areas, including lists, the body, the page header, and page footer.

Page breaks are translated according to the values of the attributes PageBreakAtStart and PageBreadAtEnd defined in the rectangle item. If there are no items contained in the rectangle, no page breaks are created.

  Images

An image can be a logo or picture, or it can be a picture that is repeated with rows of data. You can also use an image as a background for certain report items. When you use a URL-based image in a report, the image item contains a URL that points to an image on the report server or a separate Web server. When images are rendered to Excel, they are rendered as static pictures.

  Subreports

A subreport is an item in a report that points to another report on the report server. When rendering to Excel, subreports are rendered as rectangles in the current report, containing the contents of the other report. The subreport is rendered on the same Excel worksheet as the parent report, not on a separate Excel sheet. However, a subreport is not rendered if there is no data associated with the subreport.

The border of a subreport is rendered, and the name given to the report item may not be unique across the subreports.

  Actions

When a hyperlink, a bookmark link, or a drillthrough link is created on a report, an Action element is created in Report Definition Language (RDL). The following table describes how Excel translates actions.

Action child elements
Excel translation

Hyperlink

Becomes a hyperlink in the worksheet.

BookmarkLink

Becomes a hyperlink pointing to the name of the report item.

Drillthrough

Becomes a hyperlink pointing to the report referenced by the drillthrough link.

For more information on the Action element, see Action Element (RDL).

http://msdn.microsoft.com/en-us/library/ms157399%28SQL.90%29.aspx

你可能感兴趣的:(Excel)