You are previewing Learning SQL Server 2008 Reporting Services.
O'Reilly logo
Learning SQL Server 2008 Reporting Services

Book Description

A step-by-step guide to getting the most of Microsoft SQL Server Reporting Services 2008

  • Everything you need to create and deliver data-rich reports with SQL Server 2008 Reporting Services as quickly as possible

  • Packed with hands-on-examples to learn and improve your skills

  • Connect and report from databases, spreadsheets, XML Data, and more

  • No experience of SQL Server Reporting Services required

  • In Detail

    Microsoft SQL Server Reporting Services 2008 is the third generation Microsoft reporting software that is more tightly integrated with SQL Server 2008 than ever before. It provides a complete server-based platform that is designed to support a wide variety of reporting needs, including managed enterprise reporting, special purpose reporting, embedded reporting, and web-based reporting.

    Ideal for beginners who need to create reports as quickly as possible, this book will lead you through practical examples to teach you a full range of skills for reporting with SQL Server 2008 Reporting Services. A series of carefully picked exercises help you practice the most important aspects of report creation. By the end of the book, you will have the confidence to take on the most complex of reports, and be producing reports that will make you the envy of your organization.

    Downloading the example code for this book. You can download the example code files for all Packt books you have purchased from your account at http://www.PacktPub.com. If you purchased this book elsewhere, you can visit http://www.PacktPub.com/support and register to have the files e-mailed directly to you.

    Table of Contents

    1. Learning SQL Server 2008 Reporting Services
    2. Credits
    3. About the Author
    4. Acknowledgement
    5. About the Reviewers
    6. Preface
      1. What this book covers
      2. What you need for this book
      3. Who is this book for
      4. Conventions
      5. Reader feedback
      6. Customer support
        1. Errata
        2. Piracy
        3. Questions
    7. 1. Overview of SQL Server Reporting Services 2008
      1. Overview of enterprise reporting
      2. Some highlights of SQL Server Reporting Services 2008
        1. Scalability
        2. New Tablix design feature
        3. Enhancement to Report Design
        4. Data visualization
      3. Installing SQL Server 2008
        1. Version of SQL Server 2008 to be installed
        2. Hardware requirements
        3. System and software requirements
        4. Hardware and software used for working with the book
      4. Hands-on exercise 1.1: Installing a named instance of SQL Server 2008
        1. Getting ready
        2. Follow the steps
        3. Installation choices and notes
      5. Hands-on exercise 1.2: Reviewing the installation
        1. Program shortcuts
        2. Reviewing installed services
        3. Starting/stopping Reporting Services
        4. Accessing installed services from the SQL Server Management Studio
        5. Post installation checks
      6. Hands-on exercise 1.3: Installing a test database
        1. Getting sample databases into the server
      7. Hands-on exercise 1.4: Configuring the Report Services
        1. Report Server configuration options
      8. Summary
    8. 2. Overview of SSRS 2008 Architecture and Tools
      1. Architectural details and components
      2. Report Server
        1. Report Server and HTTP
        2. Report processing
        3. Report Server backend
        4. Reporting Services and the database engine
      3. Report Manager
        1. Starting Report Manager
      4. Model designer
      5. Report Builder
        1. Report Builder 1.0
        2. Report Builder 2.0
          1. Report Builder features
      6. Extension components
        1. Data processing
        2. Rendering
        3. Scheduling and delivery
      7. Support for reporting in Visual Studio 2008
        1. ReportViewer controls
          1. ReportViewer control for Windows applications
          2. ReportViewer control for Web applications
          3. Business intelligence support
      8. Reporting Server configuration file
      9. Summary of Extensions
      10. Summary
    9. 3. Report Integration with Microsoft ReportViewer Controls
      1. ReportViewer features
        1. Toolbar
      2. Difference between web server and Windows forms versions
      3. Hands-on 3.1: Using ReportViewer control for Windows
        1. Getting ready
        2. Follow the steps
          1. Create a Windows project
          2. Add a ReportViewer control
          3. Configure the report using the Report Wizard
            1. Configure the Data Source
            2. Design the report
            3. Preview the report
        3. Report details of the RDLC file
        4. Features of report binding to form
      4. Hands-on 3.2: Modifying the previous report
        1. Follow the steps
          1. Modifying an existing report
      5. Hands-on 3.3: Adding a graphic to the report
        1. Follow the steps
      6. Hands-on 3.4: Using ReportViewer control for a web application
        1. Getting ready
        2. Follow the steps
          1. Creating an ASP.NET web site project and adding a dataset using the Query Builder Tool
          2. Adding a report template
      7. Summary
    10. 4. Visual Studio 2008 Business Intelligence Template Projects
      1. Visual Studio 2008 Business Intelligence Projects
        1. Using the Report Server project template
        2. Using the Report Server wizard project template
        3. Using the Report Model project template
      2. Report authoring
        1. Data sources used in reports
          1. Embedded data sources
          2. Shared data sources
          3. Report Data and Query Designer
        2. Report designer
          1. Report items toolbox
          2. Expression builder
          3. Other design tools
      3. Hands-on exercise 4.1: Creating a Report Server project using the Report Server Wizard project
        1. Connecting to a data source
        2. Building a query
        3. Designing the report
      4. Deploying the report to the Report Server
        1. Methods of deploying reports to the Report Server
      5. Hands-on exercise 4.2: Deploying and viewing the report designed in Hands-on 4.1
      6. Report Model
      7. Using the Report Model project template
      8. Hands-on exercise 4.3: Creating a Report Model using the Visual Studio 2008 template
        1. Getting ready
        2. Follow the steps
          1. Creating a new Report Model Project
          2. Defining a Data Source for the Report Model
          3. Defining a Data Source view for the Report Model
          4. Defining the Report Model
      9. Deploying the Report Model to the Report Server
      10. Hands-on exercise 4.4: Deploying the Report Model
      11. Hands-on exercise 4.5: Importing reports from MS Access 2003
        1. Getting ready
        2. Follow the steps
      12. Summary
    11. 5. Working with the Report Manager
      1. Report Manager components
        1. Folder structure and hierarchy
        2. Sub-items in folder hierarchy
      2. Hands-on exercise 5.1: Creating, deleting, and modifying folders
        1. Creating a folder
        2. Deleting a folder
        3. Moving a folder
        4. Modifying a folder
      3. Report management
        1. Permissions in Reporting Services
      4. Hands-on exercise 5.2: Assigning users (or groups) to roles and permissions to access reports
        1. Getting ready
        2. Hands-on 5.2.1: Assigning a Windows user to System Administrator role
          1. Creating a Windows user
          2. Assigning a user to the System Administrator role
        3. Hands-on 5.2.2: Assigning users to item-level roles
          1. Creating a Windows user
          2. Assigning users to roles
        4. Hands-on 5.2.3: Assigning a user to a custom role
        5. Hands-on 5.2.4: Creating a permission to a specific report
          1. Permitting only the user Navika to this report
          2. Report Data Sources
      5. Report viewing and printing
      6. Hands-on exercise 5.3: View, print, and search
        1. Viewing reports
        2. Printing reports
          1. Printing report from the Print button on report
          2. Changing report format for printing
        3. Search for reports
        4. Find text in a report
        5. Managing data source connections with Report Manager
        6. Connecting to report data sources
          1. Connect using user supplied credentials
          2. Connect using stored credentials
          3. Connect using Windows integrated security
          4. Connection that does not require credentials
      7. Hands-on exercise 5.4: Windows user access to a report on the Report Manager
        1. Getting ready
        2. Deploying reports
      8. Hands-on exercise 5.5: Deploying reports
        1. Deploying a single report
        2. Deploying a report with a shared data source
        3. Uploading a report using the Report Manager
      9. Creating a new data source in Report Manager and generating a model from the data source
      10. Hands-on exercise 5.6: Creating a new data source and generating a model using Report Manager
        1. Create new data source
        2. Generating a model using Report Manager
      11. Modifying reports on a Report Server and creating linked reports with Report Manager
        1. Modifying reports
        2. Linked reports
      12. Hands-on exercise 5.7: Downloading a report definition file from the Report Server
        1. Report delivery (new or cached)
        2. On demand
        3. Report caching
      13. Hands-on Exercise 5.8: Working with the report cache
        1. Turn on cache and cache a report
        2. Schedule a report cache
        3. Create a cache from execution snapshot
        4. Report subscription
      14. Hands-on exercise 5.9: Working with standard email, fileshare and data-driven subscriptions
        1. Creating an email subscription
        2. Creating a file share subscription
        3. Creating a data-driven subscription
          1. Create a Subscriber database in SQL Server 2008
          2. Populate a table in Subscribers database
          3. Creating the data-driven subscription and testing it
      15. Summary
    12. 6. Working with the Report Builder
      1. Report Builder overview
      2. Report Builder 2.0 user interface description
        1. The menu for file operations
        2. The ribbon
          1. Home
          2. Insert
            1. Data Regions
              1. Table
              2. Matrix
              3. List
              4. Chart
              5. Gauge
            2. Report Items
            3. Subreports
            4. Header and footer
          3. View
        3. Report Data, the Report Designer, and the properties
          1. Report Data
          2. Report Designer pane
          3. Properties
        4. Server status and tools
      3. Hands-on exercise 6.1: Enabling and reviewing My Reports
        1. Getting ready
      4. Hands-on exercise 6.2: Modifying a basic report
        1. Getting ready
        2. Follow the steps
          1. Open Report Builder and open the ByOrders.rdl report
          2. Review the imported MS Access report
      5. Hands-on exercise 6.3: Creating reports with charts and gauges
        1. Getting ready
        2. Follow on
          1. Creating a Microsoft Excel spreadsheet with some data
          2. Create an ODBC DSN to access the data
          3. Create a datasource using a DSN in Report Builder 2.0
          4. Create a Dataset based on the data in the Excel file
          5. Design a report to display the data
            1. Format a column based on some criterion
          6. Create a chart to display the data
            1. Add gauges to display the data
            2. Add a report item to display the average value of a column
            3. Add a gauge to display this average
          7. Create a bookmark and jump to it
            1. Create a bookmark using the Bookmark property
            2. Jump to bookmark using the Action property
      6. Summary
    13. 7. Report Authoring with Report Builder 2.0
      1. Report authoring
      2. Hands-on exercise 7.1: Filtering data at source using a query parameter
        1. Parameterized reports
        2. Follow on
          1. Creating a data source
          2. Query design
          3. Parameter design
          4. Viewing the Report
      3. Hands-on exercise 7.2: Working with a column group and setting up a document map
        1. Follow on
          1. Removing the parameter from the previous hands-on
          2. Group the results by "City"
          3. Adding a Document Map for the report
          4. Add interactive sort
      4. Hands-on exercise 7.3: Working with a subreport
        1. Follow on
          1. Create a data source for the subreport
          2. Add a dataset to the subreport
          3. Add a table to the subreport
          4. Changing background color of alternate rows
          5. Create a data source and a dataset for the main report
          6. Add a list to the main report
          7. Create a second dataset
          8. Get parameter list from this query
          9. Add the subreport to the report
          10. Making the subreport a drill-down
      5. Hands-on exercise 7.4: Creating a linked report
        1. Follow on
          1. Creating named folders for reports
          2. Customizing the linked report for London Office
          3. Customizing the linked report for Buenos Aires
      6. Hands-on exercise 7.5: Creating a drillthrough report
        1. Follow on
          1. Create a main report
          2. Verifying drillthrough action
      7. Hands-on exercise 7.6: Creating a report with XML data
        1. Follow on
          1. Create the dataset for the report
          2. Set image properties
      8. Hands-on exercise 7.7: Ad hoc 1: Creating a tabular report with a Report Model
        1. Follow on
          1. Create a data source
          2. Creating a dataset
          3. Fashioning a query
          4. Design and run the report
      9. Hands-on exercise 7.8: Ad hoc 2: Creating a matrix report with a Report Model
        1. Follow on
          1. Add customer details and product information to the query
          2. Apply filter to the report
      10. Creating a report based on the Analysis Services cube
      11. Summary
    14. 8. Programming Interfaces to Reporting Services
      1. Overview of programming interfaces
        1. URL access
        2. ReportViewer control
        3. The Reporting web services API
        4. Windows Management Instrumentation
        5. Reporting services utilities
        6. Miscellaneous
      2. Programming using URL access
      3. Hands-on exercise 8.1: Displaying a report on the Report Server with an ASP.NET Web application using URL access
        1. Follow on
          1. Using a link
            1. Passing the format to URL
          2. Using an <iframe/>
            1. Using the POST method of a form
      4. Hands-on exercise 8.2: Integrating a report on the Report Server with a Windows application using URL access
        1. Follow on
            1. Using the WebBrowser control
            2. Using Process.Start () method
      5. Programming the ReportViewer control
      6. Hands-on exercise 8.3: Integrating a report on the Report Server with an ASP.NET Web application
        1. Follow on
      7. Hands-on exercise 8.4: Displaying a report on the Report Server in a Windows application
        1. Follow on
          1. Publishing to the local web server
      8. Programming with the Report Server web services API
      9. Hands-on exercise 8.5: Rendering a report on the Report Server with an ASP.NET Web application to other formats
        1. Finding reports and folders on the Report Server
        2. Create DataSource () Method
      10. Hands-on exercise 8.6: Rendering a report on the Report Server with an ASP.NET Web application to other formats.
        1. Follow on
      11. Windows Management Instrumentation
      12. Hands-on exercise 8.7: Identifying the Report Server instance and modifying some of the properties
        1. Setting up access permission to WMI namespace
          1. Accessing information about Report Server instances using WMI
      13. Miscellaneous
      14. Hands-on exercise 8.8: Creating a SQL Server Integration Services Package to display a report from the Report Server
        1. Follow on
      15. Hands-on exercise 8.9: Using custom code in an expression
        1. Follow on
      16. Summary
    15. 9. Crystal Reports 2008 in Visual Studio 2008
      1. Crystal Reports 2008
      2. Hands-on exercise 9.1: Integrating a saved Crystal Report into an ASP.NET application in Visual Studio 2008
        1. Follow on
          1. Review source and customize options
            1. Filtering the displayed report
          2. Exporting the page using code
      3. Hands-on exercise 9.2: Creating a Crystal Report and integrating it into a Windows forms application
        1. Follow on
          1. Creating a typed dataset
          2. Add a blank Crystal Report and add META data
          3. Add the report to the CrystalReportViewer
      4. Hands-on exercise 9.3: Creating a Crystal Report and populating it with data at runtime
        1. Follow on
          1. Create project and add references
          2. Add a Crystal Report and apply fields
          3. Add code, build, and run
      5. Hands-on exercise 9.4: Creating a Crystal Report and populating it with data from a stored procedure at run time
        1. Follow on
          1. Create a stored procedure and test it
          2. Add Crystal Report and configure the field source
          3. Add fields to the Crystal Report
          4. Add code for data binding
      6. Hands-on exercise 9.5: Creating a Crystal Report and populating it with XML data.
        1. Follow on
      7. Summary
    16. 10. On Programmatically Creating an SSRS Report
      1. Introduction
      2. The XMLTextWriter Class
      3. Hands-on exercise 10.1: Generating a Report Definition Language file using Visual Studio 2008
        1. Follow on
          1. Create project and add reference
          2. Copy and paste code
          3. Build and execute
          4. Notes on adding style
      4. Summary
    17. A. Queries and Datasets in SSRS 2008
      1. Reporting Services data
      2. Queries
        1. SQL
        2. MDX
        3. Semantic queries
        4. Query Designer
      3. Datasets
      4. Summary
    18. B. Converting Reports between RDL and RDLC
      1. Conversion of report files with extensions RDL and RDLC
      2. Status of RDL to RDLC conversion
      3. RDLC to RDL conversion
      4. Hands-on exercise B.1: RDLC to RDL conversion
        1. Follow on
      5. Summary
    19. C. Command line utilities
      1. Command line utilities
        1. rs.exe
          1. Syntax for using rs.exe
      2. Hands-on exercise C.1: Creating a data source and deploying to a folder on the server which uses the Pubsx database in SQL Express
        1. Follow on
      3. Summary
    20. D. Notes and References
      1. Looking beyond Visual Studio 2008
      2. SQL Server bugs and remediation
      3. Best practices
      4. Report definition and security
      5. Report authoring
      6. Troubleshooting
      7. ReportViewer control
      8. Moving and migrating
      9. Free Microsoft software
      10. Source control
      11. White papers
      12. Forums
      13. Blogs
      14. Miscellaneous
        1. Browser Response
        2. Customizing the look of Report Manager
        3. New Open Source Project's Report Designer
        4. Dundas Maps for RS and .NET