Elements and Attributes in XML Rendering

The XML rendering extension renders report items as elements or attributes in an XML document. Each element can have a set of attributes or sub-elements associated with it. The attributes or elements vary depending on the report item.

Report

Report is the XML root node. It contains attributes that specify schema information for the XML document and the report name.

The XSD is specified in the XML root node as follows:

<Report xmlns="SchemaName" xmlns:sxi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="SchemaName ReportURL&rs:ImageID=SchemaName" Name="ReportName">

The following table describes how the attributes and elements in the Report RDL element are rendered by the XML rendering extension.

RDL attribute Renders as

Name

The Name attribute of the root element.

Textbox

The following table describes how the attributes and elements in the Textbox RDL element are rendered by the XML rendering extension. The text box name and value are rendered as an element or as an attribute depending on the value of the DataElementStyle RDL element for the text box.

RDL element Renders as

DataElementName

The name of the text box element or attribute. If DataElementName is not specified, the name is the name of the text box in the RDL.

Value

The value of the data in the text box.

Table

The following table describes how the attributes and elements in the Table RDL element are rendered by the XML rendering extension. The table is rendered as an element.

RDL element Renders as

DataElementName

The name of the table element. If DataElementName is not specified, the name of the element is the name of the table in the RDL.

Header

All items in the header are rendered as sub-elements or attributes of the table element.

Footer

All items in the footer are rendered as sub-elements or attributes of the table element.

TableGroup

The first TableGroup element is rendered as a sub-element of the table element. Each subsequent TableGroup element is rendered as a sub-element of the group instance for the previous TableGroup element. This results in nested groups of data.

Details

A sub-element of each group instance for the last TableGroup element. If there are no table groups, Details is rendered as a sub-element of the table element.

TableGroup

The following table describes how the attributes and elements in the TableGroup RDL element are rendered by the XML rendering extension. The table groups are rendered as elements.

RDL element Renders as

DataCollectionName (Grouping)

The name of the table group element. If DataCollectionName is not specified, the name of the element is the name specified in the DataElementName element plus the string _Collection.

DataElementName (Grouping)

The name of the group instance element. Group instance elements are sub-elements of the table group element. If DataElementName is not specified, the name of the element is the name of the grouping in the RDL.

Header

All items in the header are rendered as sub-elements or attributes of the group instance element.

Footer

All items in the header are rendered as sub-elements or attributes of the group instance element.

Details

The following table describes how the attributes and elements in the Details RDL element are rendered by the XML rendering extension. Details is rendered as an element.

RDL element Renders as

DataCollectionName (Grouping)

The name of the details element. If DataCollectionName is not specified, the name of the element is the name specified in the DataElementName element plus the string _Collection. If Details has no grouping, the name of the element is Detail_Collection.

DataElementName (Grouping)

The name of the group instance element. Group instance elements are subelements of the details element. If DataElementName is not specified, the name of the element is the name of the grouping in the RDL. If Details has no grouping, the name of the element is Detail.

DetailsRows

All items in the detail rows are rendered as sub-elements or attributes of the group instance element.

Matrix

The following table describes how the attributes and elements in the Matrix RDL element are rendered by the XML rendering extension. The matrix is rendered as an element.

RDL element Renders as

DataElementName

The name of the matrix element. If DataElementName is not specified, the name of the element is the name of the matrix in the RDL.

Corner

All items in the corner are rendered as sub-elements or attributes of the matrix element.

RowGrouping

The first RowGrouping element is rendered as a sub-element of the matrix element. Each subsequent RowGrouping element is rendered as a sub-element of the group instance for the previous RowGrouping element. This results in nested groups of data.

ColumnGrouping

The first ColumnGrouping element is rendered as a sub-element of each group instance for the last RowGrouping element. Each subsequent ColumnGrouping element is rendered as a sub-element of the group instance for the previous ColumnGrouping element.

MatrixCell

The Cell sub-element within each group instance for the last ColumnGrouping element. All items in the matrix cell are rendered as sub-elements or attributes of the Cell element.

RowGrouping

The following table describes how the attributes and elements in the RowGrouping RDL element are rendered by the XML rendering extension. A row grouping is rendered as an element.

RDL element Renders as

DataCollectionName (Grouping)

The name of the row grouping element. If DataCollectionName is not specified, the name of the element is the name specified in the DataElementName element plus the string _Collection. This is not used for static row groupings.

DataElementName (Grouping)

The name of the group instance element. Group instance elements are sub-elements of the row grouping element. If DataElementName is not specified, the name of the element is the name of the grouping in the RDL. For static row groupings, the name of the element is the value of DataElementName for the text box in the group header is used. If there is no text box for a static row header, the name of the element is RowN where N is a number assigned to the row grouping.

ReportItems

All items in the row grouping are rendered as sub-elements or attributes of the parent of the row grouping element.

Subtotal

A sibling element to the row grouping element. This element contains a matrix cell. The name of this element is the name specified in the DataElementName element for the subtotal. If no name is specified, the name of the element is Total.

Note

Subtotals are not rendered by default. The XML rendering extension renders subtotals only if the value of the DataElementOutput RDL element for the subtotal is Output.

ColumnGrouping

The following table describes how the attributes and elements in the ColumnGrouping RDL element are rendered by the XML rendering extension. A column grouping is rendered as an element.

RDL element Renders as

DataCollectionName (Grouping)

The name of the column grouping element. If DataCollectionName is not specified, the name of the element is the name specified in the DataElementName element plus the string _Collection. This is not used for static column groupings.

DataElementName (Grouping)

The name of the group instance element. Group instance elements are sub-elements of the column grouping element. If DataElementName is not specified, the name of the element is the name of the grouping in the RDL. For static column groupings, the name of the element is the value of DataElementName for the text box in the group header is used. If there is no text box for a static column header, the name of the element is ColumnN where N is a number assigned to the column grouping.

ReportItems

All items in the column grouping are rendered as sub-elements or attributes of the parent of the column grouping element.

Subtotal

As a sibling element to the column grouping element. This element contains a matrix cell. The name of this element is the name specified in the DataElementName element for the subtotal. If no name is specified, the name of the element is Total.

Note

Subtotals are not rendered by default. The XML rendering extension renders subtotals only if the value of the DataElementOutput RDL element for the subtotal is Output.

List

The following table describes how the attributes and elements in the List RDL element are rendered by the XML rendering extension. The list is rendered as an element.

RDL element Renders as

DataElementName

The name of the list element. If DataElementName is not specified, the name of the element is the name of the list in the RDL.

DataCollectionName (Grouping)

Not used.

DataElementName (Grouping)

The name of the group instance element. Group instance elements are sub-elements of the list element. If DataElementName is not specified, the name of the element is the name of the grouping in the RDL. If the list has no grouping, the name of the element is Detail.

ReportItems

All items in the list are rendered as sub-elements or attributes of the parent of the group instance element.

Subreport

The following table describes how the attributes and elements in the Subreport RDL element are rendered by the XML rendering extension. A subreport is rendered as a Report element in the rendered XML. The contents of the subreport are rendered within this Report element.

RDL element Renders as

DataElementName

The name attribute for the subreport element. If DataElementName is not specified, the name for the attribute is the name of the subreport in the RDL.

The value of the DataElementStyle in the main report overrides the value of DataElementStyle in the subreport. Also, the namespace and XSLT attributes are not used for a Report element for a subreport.

Rectangle

The following table describes how the attributes and elements in the Rectangle RDL element are rendered by the XML rendering extension. The rectangle is rendered as an element.

RDL element Renders as

DataElementName

The name of the rectangle element. If DataElementName is not specified, the name of the element is the name of the rectangle in the RDL.

See Also

Concepts

Designing for XML Output

Other Resources

Report Definition Language

Help and Information

Getting SQL Server 2005 Assistance