RDL Elements and Attributes in XML (Report Builder 1.0)
When a report is saved as an XML file, Report Builder needs to translate the report definition language (RDL) into XML. The XML export option saves 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. This topic discusses what the RDL schema is changed to when saved as XML.
Report
Report is the XML root node. It contains attributes that specify schema information for the XML document and the report name.
The XML Schema (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 saved by the XML export option.
RDL attribute |
Saved as |
---|---|
Name |
The Name attribute of the root element. |
Text Boxes
The following table describes how text boxes are saved by the XML export option. The text box name and value are saved as an element or as an attribute depending on the value of the DataElementStyle RDL element for the text box.
RDL element |
Saved as |
---|---|
DataElementName |
The name of the text box element or attribute. If DataElementName is not specified, the default 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 tables are saved by the XML export option. The table is saved as an element.
RDL element |
Saved 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. |
TableGroup |
The first TableGroup element is saved as a sub-element of the table element. Each subsequent TableGroup element is saved 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 saved as a sub-element of the table element. |
TableGroup
The following table describes how table groups are saved by the XML export option. The table groups are saved as elements.
RDL element |
Saved 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 saved 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 saved by the XML export option. Details is saved as an element.
RDL element |
Saved 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 sub-elements 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 saved as sub-elements or attributes of the group instance element. |
Matrix
The following table describes how matrices are saved by the XML export option. The matrix is saved as an element.
RDL element |
Saved 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 saved as sub-elements or attributes of the matrix element. |
RowGrouping |
The first RowGrouping element is saved as a sub-element of the matrix element. Each subsequent RowGrouping element is saved 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 saved as a sub-element of each group instance for the last RowGrouping element. Each subsequent ColumnGrouping element is saved 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 saved as sub-elements or attributes of the Cell element. |
RowGrouping
The following table describes how row groupings are saved by the XML export option. A row grouping is saved as an element.
RDL element |
Saved 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 saved 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 saved by default. The XML export option saves subtotals only if the value of the DataElementOutput RDL element for the subtotal is Output.
ColumnGrouping
The following table describes how column groupings are saved by the XML export option. A column grouping is saved as an element.
RDL element |
Saved 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 saved 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 saved by default. The XML export option saves subtotals only if the value of the DataElementOutput RDL element for the subtotal is Output.
To better understand how the XML export option saves the Report Definition Language (RDL) elements in a report as a XML file, you might want to learn more about the elements. For more information about RDL elements, see the Report Definition Language topic in SQL Server Books Online.