Beginning SQL Server Reporting Services Part 4  Hot PDF Print E-mail
Tag it:
Delicious
Furl it!
Digg
NewsVine
Reddit
YahooMyWeb
Technorati
Articles Reviews Structured Query Language
Written by Steve Joubert   
Tuesday, 19 June 2007

{mos_sb_discuss:29}

This is the last installment of a four part article on SQL Server Reporting Services:

    * Part 1, provided a step-by-step guide to basic report creation and
    * Part 2 took a tour of some of the core SSRS features and functions that you'll need to develop dynamic reports
    * Part 3 focused entirely on the built-in SSRS chart control.



Here, in part 4, we focus on Report Definition Language (RDL). The definition of RDL provided by MSDN2 is succinct and hard to better, so I'll use it here:

"A report definition contains data retrieval and layout information for a report. Report Definition Language (RDL) is an XML representation of this report definition."

We'll examine the component parts of a typical RDL file and discuss how knowledge of RDL will enable you to refine and customize your reports. We'll then take a look at Report Builder Tool, the new ad-hoc reporting tool that ships with SQL Server Reporting Services 2005.

As a report developer, it allows you to create a report-building tool that then allows end-users to build custom reports based on the report definitions you've provided. Confused? Fear not, all will become clear.

In order to follow my examples, you will need to have SQL Server 2005, SQL Server 2005 Reporting Services, and Visual Studio 2005 correctly installed and configured. If you need some help with this, please refer back to the links in Part 1 of this series.

Next, download the code file for this article (see the Code Download link above). The code file contains a sample Visual Studio project and a SQL Script for creating the ReportDemo database. If you've not done so already, go ahead and create the database using the ReportingDemoDatabaseScript.sql script or, alternatively, by restoring the provided ReportingDemo.bak file.

Now start a new Business Intelligence project in Visual Studio 2005 (or using BIDS, which installs with SQL Server 2005). Select Project | Add Existing Item to add to the project the shared datasource (ReportDb.rds) and the sample report definition file, FirstReportMan.rdl
Report Definition Language

Report Definition Language (RDL) is an XML-based schema for defining reports, and the reports that SSRS 2005 generates from the Visual Studio 2005 report designer are basically just XML. Each report has a header, footer and body.

The schema defines:

    * Report layout– the body of the RDL file defines all of the objects that will be displayed in the report, including fields, images and tables
    * Each dataset, the data source for each dataset and database connection information (where no data source is used)
    * A set of fields in each dataset that can be populated with data
    * Any parameters that are used in the report


You can read the full specification for RDL at:

http://www.microsoft.com/sql/technologies/reporting/rdlspec.mspx
Dissecting a typical RDL file

The easiest way to get familiar with the basics of RDL is to dive right in and take a look at the component part of a typical RDL file.

Let's take a look the RDL for the FirstReportMan.rdl included in the download project. Open Visual Studio and open the sample project FirstReportMan.rdl. In the solution explorer, right-click on the FirstReportMan.rdl and select the View Code option. This opens the report in XML mode. The full XML for this file can be found in the code download bundle, but we'll just step through the major sections here.
Document element

Let's first take a look at the document element: 

Read more


User reviews

There are no user reviews for this item.

Add new review




Powered by jReviews

Last Updated ( Wednesday, 20 June 2007 )
 
< Prev   Next >