Share via


Designing for XML Output

The XML rendering extension returns a report in XML format. The schema for the report XML is specific to the report, and contains data only. Layout information is not rendered by the XML rendering extension. The XML generated by this extension can be imported into a database, used as an XML data message, or sent to a custom application.

General Rules

The following table describes how report items are rendered.

Item Rendering behavior

Report

Renders as the top-level element of the XML document.

Data regions

Renders as an element within the element for its container.

Group and detail sections

Each instance renders as an element within the element for its container.

Text box

Renders as an attribute or element within its container.

Rectangle

Renders as an element within its container.

Matrix column groups

Renders as elements within row groups.

Reports that are rendered using the XML rendering extension also have the following considerations:

  • XML elements and attributes are rendered in the order that they appear in the report definition.
  • Pagination is ignored.
  • Page headers and footers are ignored.
  • Hidden items that cannot be made visible through a toggle are not rendered. Initially visible items and hidden items that can be made visible through a toggle are rendered.
  • Image, CustomReportItem, and Line are ignored.

Data Types

The text box element or attribute is assigned an XSD data type based on the values that the text box displays.

If all text box values are Assigned data type is

Int16, Int32, Int64, UInt16, UInt32, UInt64, Byte, SByte

xsd:integer.

Decimal (or Decimal and any integer or byte data type)

xsd:decimal

Float (or Decimal and any integer or byte data type)

xsd:float

Double (or Decimal and any integer or byte data type)

xsd:double

DateTime

xsd:dateTime

Boolean

xsd:boolean

String, Char

xsd:string

Other

xsd:string

XML Elements and Attributes

For information about how the XML rendering extension renders each of the elements in the report definition, see Elements and Attributes in XML Rendering.

Custom Formats and XSL Transformations

XML files produced by the XML rendering extension can be transformed into almost any format using XSL Transformations (XSLT). This functionality can be used to produce data in formats not already supported by existing rendering extensions. Consider using the XML rendering extension and XSLT before attempting to create your own rendering extension. For more information, see Applying Transformations to XML Output.

Rendering

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

  • A transformation (XSLT) to apply to the XML.
  • The MIME type of the XML document.
  • Whether to apply format strings to data.
  • Whether to indent the XML output.
  • Whether to include the XML schema name.
  • The encoding for the XML document.
  • The file extension of the XML document.

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