Click to Rate and Give Feedback

  Switch on low bandwidth view
Community Content
In this section
Statistics Annotations (0)
Other versions are also available for the following:
SQL Server 2008 Books Online (June 2009)
Tutorial: Generating RDL Using the .NET Framework

This tutorial illustrates how to write Report Definition Language (RDL) to a report definition file using the System.Xml.XmlTextWriter class. The writer provides a fast, forward-only way of generating XML, thus RDL, and helps you to build report definition documents that conform to the RDL specification. The System.Xml.XmlTextWriter writes to a stream rather than using an object model such as the XML DOM, and so gives better performance.

Typically, you use an System.Xml.XmlTextWriter if you need to write XML as raw data without the overhead of a DOM. The System.Xml.XmlTextWriter is an implementation of the System.Xml.XmlTextWriter class that provides the API which writes XML to a file stream. The XmlTextWriter class provides several methods that are useful for creating a report definition file. In particular, the following tutorial shows you how to construct a report definition file using the System.Xml.XmlTextWriter.WriteStartElement, System.Xml.XmlTextWriter.WriteAttributeString, System.Xml.XmlTextWriter.WriteElementString, and System.Xml.XmlTextWriter.WriteEndElement methods.

During the course of this tutorial, you will complete the following activities:

  • Create an application using the Visual Studio Console Application project template.
  • Add a connection to the AdventureWorks sample database.
  • Write code to retrieve a list of fields for the data source.
  • Write code to generate a simple report definition file that can be used to build a report.

To complete the tutorial, you must have the following:

  • Microsoft Reporting Services.
  • Microsoft Visual Studio 2005 or a similar Microsoft .NET Framework-compatible development tool.
  • The AdventureWorks sample database installed to an instance of SQL Server 2008. The samples are not installed automatically during setup, but you can install them at any time. For information about installing the samples, see Considerations for Installing SQL Server Samples and Sample Databases.

Estimated time to complete the tutorial: 60 minutes

Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker