by Michael Lisin, Jim Joseph, and Amit Goyal

Chapter 1: Introduction to SQL Server Reporting Services (SSRS)

Analysis
Jun 25, 200926 mins

Sams

In This Chapter

  • What Is SSRS

  • SSRS for End Users

  • Overview of Features

  • SSRS in the Report Development Life Cycle

  • Editions of Reporting Services

  • How Is SSRS Licensed?


Note – This book abbreviates SQL Server 2008 Reporting Services as SSRS and SQL Server 2005 Reporting Services as SSRS2K5.

New features available in SSRS and not in SSRS2K5 are labeled with “New in 2008.”


In today’s ultracompetitive business environment, having good information is essential. Companies are awash in information, and with the advent of technologies such as radio frequency identification (RFID), more and more information is coming. Technology has made the job of gathering information trivial, but making sense of it all still remains elusive. This makes good reporting and business intelligence tools essential.

This first chapter is strictly nontechnical. This chapter focuses on the following:

  • Capabilities of SSRS

  • How it fits into the Microsoft Business Intelligence platform

  • Report development life cycle as it relates to SSRS

  • Editions of SSRS

  • Licensing SSRS

What Is SSRS?

SSRS is Microsoft’s answer to business reporting. It provides a unified, server-based, extensible, and scalable platform from which to deliver and present information. Its scope extends from traditional paper reports to web-based delivery and interactive content. SSRS can also be configured to deliver reports to peoples’ inboxes, file shares, and so on. SSRS is capable of generating reports in various formats, such as the web-oriented Hypertext Markup Language (HTML) and desktop application (Microsoft Excel and CSV) formats, thus allowing users to manipulate their data in whatever format is required. In addition, SharePoint can be used as a front end for SSRS, allowing reports to be presented directly in corporate portals.

SSRS is just one of the components in the Microsoft Business Intelligence (BI) platform. Combined, those components provide an excellent platform for enterprise data analysis. The Microsoft BI platform includes the following:

  • SQL Server: The traditional database engine, which also stores SSRS catalog data.

  • SQL Server Analysis Services (SSAS): A component for online analytical processing (OLAP) and data mining. OLAP performs data aggregation and allows users to traverse from aggregations to details looking through the dimensions (such as geography or time) of data. Data mining helps users to discover patterns in data.

  • SQL Server Integration Services (SSIS): A component for extracting, transforming, and loading (ETL) data.

SSRS for End Users

SSRS is unique in the Microsoft BI suite because it covers a variety of information users. Microsoft divides users into three groups: information consumers, information explorers, and analysts.

Table 1.1 briefly summarizes the percentages of users in each group, the level of technical experience, and the expectations from an enterprise reporting tool. All of these factors will vary from company to company, but generally the breakdown holds true.

TABLE 1.1 Breakdown of Information Workers

Type of User

Percentage

Technical Expertise

Expectation

Analysts

5%–10%

High

Analysts can develop reports, work with ad hoc reports, and perform sophisticated calculations (such as linear regressions and trend analysis). Analysts often publish reports to explorers and consumers.

Information

15%–30%

Medium

Information explorers want to interact with reports to some degree, such as applying filters or performing drill down through.

Information

55%–85%

Low

Information consumers use static, predefined, and preformatted reports.

To address the varying needs of these types of users, SSRS provides three main tools from the user perspective:

  • Report Viewer: The primary mechanism for viewing reports over the Web. Report Manager is the name of the website that SSRS sets up. It provides a very clean and neatly organized user interface for end users. Developers can also embed a Report Viewer control into both ASP.NET and Windows Forms applications.

  • Report Builder: The tool that provides users with a front end for ad hoc reporting against a SQL Server or Analysis Services database. Unlike most ad hoc reporting tools, users of Report Builder do not need to know Structured Query Language (SQL) or anything about joins or grouping to create reports.

  • Report Designer: The tool that takes on the job of building advanced reports. Although Report Builder does a good job as an ad hoc reporting tool, Report Designer was made to tackle really advanced reports.

Figure 1.1 summarizes the types of reporting users, and mentions some of the tools SSRS provides for them.

Figure 1.1

Reporting Services users and tools.

Overview of Features

SSRS has a number of features to address complex business reporting needs. Over the course of this book, these features are explored more closely. For now, here is a brief overview.

As far as creating reports, SSRS is a full-featured report engine. Reports can be created against any data source that has a managed code provider, OLE DB, or ODBC data source. This means you can easily retrieve data from SQL Server, Oracle, Analysis Services, Access, or Essbase, and many other databases. This data can be presented in a variety of ways. Microsoft took the feedback from SSRS2K5 and enhanced 2008 with new Chart and Gauge controls, and a new Tablix control, which is a mix of the Table and the Matrix controls from the earlier release. Combined, these new presentation formats give a whole new experience out of the box. Other enhancements include new output presentation formats, including Word and Excel, and direct integration with SharePoint.

Here is a concise list of SSRS features:

  • Retrieve data from managed providers, OLE DB, and ODBC connections

  • Display data in a variety of ways, including tabular, free form, and charts

  • Export to many formats, including HTML, PDF, XML, CSV, TIFF, Word reports (New in 2008), and Excel

  • Aggregate and summarize data

  • Add in report navigation

  • Create ad hoc reports and save them to the server

  • Create custom controls using a report-processing extension

  • Embed graphics and images and external content

  • Integrate with SharePoint

  • Provide a Simple Object Access Protocol (SOAP) application programming interface (API) and pluggable architecture

  • Provide subscription-based reports and on-demand reports

  • Allow users to store and manage their own custom reports built with SSRS’s Report Builder 2.0 and manage subscriptions to the reports (New in 2008).

  • URL-based report access

  • Gauge and Chart controls to display KPI data (New in 2008)

As you can see, SSRS provides a comprehensive set of features out of the box. Another nice feature of SSRS is its extensibility. Because there is no way that the developers of SSRS could have anticipated every need of an enterprise reporting solution, they made SSRS extensible. This extensibility enables developers to use SSRS in any number of ways, from embedded reports to customized reporting solutions.

Enterprise Report Examples

Each user is likely to have favorite reports to make timely and effective business decisions, and although it is not possible to cover a whole gamut of reports in this book, some common ideas can help you think through practical applications of SSRS.

Scorecard reports are frequently used in today’s businesses and provide information for each manager on how well his group is doing as compared to the goals set for the group. Usually, a scorecard implements a “traffic light” type of highlight or a “gauge” indicator. Values on the scorecard are highlighted in green when the group is meeting its goals, in yellow when the group is doing so-so, and in red when the group’s performance requires immediate attention. Scorecard reports can take advantage of the key performance indicators (KPIs) features of Analysis Services 2008. Gauges and charts have been significantly enhanced in SQL Reporting Services 2008 by the acquisition of the Dundas Gauge and Chart controls by Microsoft.

When users are looking to combine a comprehensive set of business health and “speed” gauges (scorecard) and related information in a small space, a dashboard is used to accomplish this goal. A dashboard provides a short, typically one-page, summary view of a business (much like a car’s dashboard summarizes a car’s status) and allows drill down through the items on the top page to retrieve detailed information. SharePoint is an excellent platform to host dashboards and greatly simplifies arranging reports in a meaningful fashion on a page.

Today, when everybody is so short on time, it might be easy to miss an information point that could prove fatal for a business. Exception reporting is what comes to the rescue of a time-constrained user. Unlike regularly scheduled reports or summaries provided by scorecards, exception reports are created and delivered to a user when an unusual event occurs. An exception report removes the “noise” created in periodic reports, focusing instead on mission-critical anomalies. An example of such an anomaly could be a sudden drop in daily sales for a particular region.

Other typical reports include various views of sales (geographic, demographic, product, promotion breakdowns), inventory, customer satisfaction, production, services, and financial information.

SSRS in the Report Development Life Cycle

To understand all the ways SSRS can be used and deployed, you can simply walk through the report development life cycle and see what features are useful in each stage.

A typical reporting application goes through three stages (see Figure 1.2): authoring, managing, and delivery. SSRS provides all the necessary tools to work with a reporting application in all three stages.

Figure 1.2

Reporting life cycle.

Authoring Stage

During this stage, the report author defines the report layout and sources of data. For authoring, SSRS maintains all the features of SSRS2K5 and adds some new features. SSRS still maintain Report Designer as its primary tool for developing reports in the 2008 release. Report Builder 1.0 is also available as a tool for developing reports against report models. Report models are metatdata models describing the physical structure and layout of the underlying SQL Server database. The biggest new enhancement for SSRS as far as tools for authoring go is the addition of Report Builder 2.0. Report Builder 2.0 fits nicely into the high-powered analyst space and gives them almost all the power of Business Intelligence Development Studio (BIDS), but with an Office 2007 look and feel.


Note – Report Builder 2.0 is not installed along with the SQL Server Reporting Services, but is available as a free download in the SQL Server 2008 feature pack.


Figure 1.3 shows the Report Designer interface.

Figure 1.3

Report Designer.

Report Designer is a full-featured report-authoring tool that targets developers and provides extensive design capabilities and can handle a variety of data sources. Report Designer can work with all reports generated for SSRS, including reports generated by Report Builder. Report Designer incorporates the following productivity features:

  • Import Access Reports, a feature that enables report designers to import Microsoft Access reports and create a report definition in turn. In complex cases, it might not be able to successfully or compleM tely import an Access report. The general rule of thumb is that SSRS will be able to convert approximately 80% of the existing Access reports.

  • IntelliSense for Expression Editing, which provides assistance with the syntax of a function used in expressions, names of class members, and indicates syntax errors in expressions by underlining them with squiggly red lines. You will see more details about this feature in Chapter 10, “Expressions.”

  • Multidimensional Expressions (MDX) and Data Mining Expressions (DMX) Query Designer, which provides a drag-and-drop interface for writing MDX and DMX queries. This feature is covered in more detail in Chapter 17, “Working with Multidimensional Data Sources.”

  • Relational Query Designer, which provides a drag-and-drop interface for writing SQL queries.

  • Report Wizard, which provides step-by-step instructions to create a report.

  • Preview mode, which enables a report author to preview the report design and layout before he publishes the report. This is a powerful feature of a Report Designer that does not require Reporting Services to be installed on a computer on which the preview is generated.

  • Publishing and deployment functionality, which allows a report designer to publish a report to a target server. For example, the developer might choose to publish to a development or to a test reporting server.

SSRS also allows end users to design reports with SSIS. Three tools make this possible: Report Builder and Model Builder, and the new Report Builder 2.0. For those familiar with SSRS 2K5, Report Builder and Model Builder are carryover with little to no changes. Report Builder 2.0, however, is a brand new addition, which is a break from the previous edition. It is a smart client application that enables users to design reports with the full capability of SSRS. It also works directly against the client database.

With Report Builder 1.0, before an end user can develop a report, a developer must create a model, using the Model Builder tool. Figure 1.4 depicts the Model Builder’s interface. A model is similar to a report, in that a model is a file written in Extensible Markup Language (XML) with an extension of .smdl. A model defines layout, data sources, data entities, and relationships in terms that are understood by end users and not in terms of SQL or MDX.

Figure 1.4

Model Builder 1.0.

When a model is published, an end user can choose a report’s layout and drag and drop model items on a report. This is how an end user can create ad hoc reports, based on the published model. Figure 1.5 shows the Report Builder interface.

Figure 1.5

Report Builder 1.0.

Report Builder 1.0 targets end users and provides access to data sources predefined in a mode.


Note – Report Builder 1.0 cannot modify reports generated by Report Designer.


Report Builder 1.0 is a click-once .NET-smart client application that is launched from Report Manager’s toolbar.

Report Designer and Report Builder (both versions) generate reports in Report Definition Language (RDL). RDL is an XML-based language, a code presentation of a report that defines data, presentation elements of a report, calls to the outside .NET assemblies, custom VB.NET functions, and expressions. RDL has powerful design elements (controls), such as the familiar Table, Chart, Subreport, and Matrix. SSRS has the capability to parameterize, sort, filter, drill down through, and aggregate data. RDL can be saved as a file on a file system or as data in the Reporting Services database. RDL is an open language that allows third-party vendors to develop custom authoring tools.

Report Builder 2.0 (New in 2008) represents a clean break with Report Builder 1.0. It is a full-feature smart client application that enables you to design and preview reports, then publish them either to the Report Server or to a SharePoint site. Report Builder 2.0 does not use metadata models; instead, it queries data direct from any .NET provider data source, including relational, multidimensional, XML, and ODBC data sources.

Report Builder 2.0 also breaks in terms of user interface (UI). It is not a click-once application like the 1.0 version. Rather, it is a separate install distributed with the SQL Server 2008 feature pack. It has an Office 2007 Ribbon look and feel. Unlike the earlier version, it is also a full-featured Report Designer. There were lots of limitations in Report Builder 1.0, from difficulty assigning print margins to using complicated expressions.

Figure 1.6 shows Report Builder 2.0.

Figure 1.6

Report Builder 2.0

Managing Stage

During this stage, the report author publishes the report to a central location where it can be managed by a report administrator in terms of security and delivery. This central location is an SSRS database. After the report is published, the administrator can use Report Manager, SharePoint, custom written scripts, third-party tools, or SQL Server Management Studio to manage published reports. The report administrator can

  • Assign the report’s security or the right a user might have to a report.

  • Establish execution control, such as selecting a time of an execution or caching options.

  • Access and organize subscriptions from a single location.

  • Control report-execution properties, which control how and when reports are processed. For example, the administrator can set processing options to prevent a large report from running on demand.

  • Set timeout values to prevent a single report from overloading system resources.

  • Automate report delivery through a standard subscription. Users can use subscriptions to set report presentation preferences. Users who prefer to view a report in Excel, for example, can specify that format in a subscription.

  • Automate report distribution through data-driven subscriptions. A data-driven subscription generates a recipient list and delivery instructions at runtime from an external data source. A data-driven subscription uses a query and column-mapping information to customize report output for a large number of users.

  • Set delivery methods for a report, such as file share, printer (this would require a custom extension in the current release, which is discussed in Chapter 29, “Writing Custom Reporting Services Extensions”), or email.

Figure 1.7 shows the Report Manager’s interface.

Figure 1.7

Report Manager.

The default URL for Report Manager is http:///reports (as shown in Figure 1.7). This is a default virtual directory in which Report Manager is installed. A report administrator can later change this URL by editing configuration files or using the Reporting Services Configuration Manager, as shown in Figure 1.8.

Figure 1.8

Reporting Services Configuration Manager.

Using SQL Server Management Studio, shown here in Figure 1.9, an administrator can perform most of the operations that she would otherwise perform through Report Manager. SQL Server Management Studio can access the SSRS catalog directly and does not require the SSRS Windows Service to be running to change the report’s properties. However, an administrator will not be able to view the report if the SSRS Windows Service is not running.

Figure 1.9

Managing within SQL Server Management Studio.

Table 1.2 presents a summary of the management features of SSRS.

TABLE 1.2 SSRS Management Features

Feature

Details

Browser-based management: Report Manager

Manages and maintains reports and the reporting environment.

Windows-based management: SQL Server Management Studio

Provides slightly better performance than the browser-based tool, in addition to the convenience of a single point of access (SQL Server Management Studio) for management of all SQL Server–related components.

Command-line utilities

Configure, activate, manage keys, and perform scripted operations.

Scripting support

Helps automate server administration tasks. For example, an administrator can script deployment and security settings for the group of reports, instead of doing the same one by one using Report Manager.

Folder hierarchy

Organizes reports by certain criteria, such as reports for specific groups of users (for example, a folder for the sales department).

Role-based security

Controls access to folders, reports, and resources. Security settings get inherited through the folder structure, similar to Windows folders security inheritance. Security can be inherited through the hierarchy or redefined at any level of hierarchy: folder or report. Role-based security works with Windows authentication. Security is installed during SSRS installation.

Job management

Monitors and cancels pending or in-process reports.

Shared data sources

Share data source connections between multiple reports, and are managed independently from any of the reports.

Shared schedules

Share schedules between multiple reports, and are managed independently from any of the reports.

History

Allows storing snapshots of a report at any particular moment of time. You can add report snapshots on an ad hoc basis or as a recurring scheduled operation. History can be used to view past versions of a report and see how information on a report has changed.

Linked reports

Create a link to an existing report that provides a different set of properties, parameter values, or security settings to the original report. To the user, each linked report appears to be a standalone report.

XML-based server configuration

Edits configuration files to customize email delivery, security configuration tracing, and more.

Database server and report logging capability

Contains information about the reports that execute on a server or on multiple servers in a single web farm. You can use the report execution log to find out how often a report is requested, what formats are used the most, and what percentage of processing time is spent on each processing phase

The true test of an enterprise system is its ability to scale from a single user to up to thousands across an enterprise. The second test of an enterprise system is to maintain uptime and reliability. SSRS passes both tests.

SSRS manages these tasks by using underlying Windows technologies. The simplest deployment of SSRS just places all the components on a single machine. That single machine can then be updated with bigger and better hardware. The single machine deployment model provides a relatively cheap and cost-effective way to get up and running with SSRS.

SSRS can also be deployed across a network load-balanced (NLB) cluster, giving it scalability and availability. The database catalog that SSRS uses can also be deployed across a clustered database server apart from the web servers. This allows for nearly limitless growth in terms of number of users (scalability) and, at the same time, maximum availability.

Delivery Stage

During this stage, the report is distributed to the report’s users and is available in multiple output formats. The SSRS retrieval mechanism enables users to quickly change an output format.

SSRS supports various delivery methods: email, interactively online (usually through a web browser, a portal such as SharePoint, or custom application), printer (requires custom extension), or file system. If the delivery method of interest is not available by default from SSRS, you can relatively easily develop custom delivery extensions. SSRS Books Online provides a complete set of samples for various custom delivery extensions. You can learn more about custom extensions in Chapter 29, “Extending Reporting Services.”

Reports are structured as items in a folder structure and allow for easy browsing and execution. You can see an example of viewing a report online in Figure 1.10. Note that the report is shown inside of Report Manager. Report Manager provides an additional functionality, such as assigning security or subscribing to a report. You can also view the report directly in the browser without Report Manager.

Figure 1.10

Online viewing.

Alternatively, a user can subscribe to a report that subsequently will be delivered via email, as shown in Figure 1.11. Email delivery is a push model of report delivery. The push model is especially useful for the cases in which report generation takes a long time, the report needs to be delivered to an outside user, or there is an emergency situation that generates an exception report.

Figure 1.11

Email delivery.

Online and scheduled deliveries are great, but for a single solution to be truly ubiquitous, it has to offer more. SSRS does this, again, by making itself extensible rather than being all-encompassing.

A perfect example of this is via embedded reporting. With Visual Studio 2008, Microsoft has developed an integrated Report Viewer control. This control enables developers to embed SSRS reports into their Windows and web applications. Figure 1.12 shows the Report Viewer control.

Figure 1.12

Report Viewer control.

If developers need to do more than just view reports, they can access the SSRS web services directly. This set of SOAP-based calls (SOAP API) provides access to just about every function on the Report Server. In fact, Report Manager does nothing more than make the same web service calls. For example, with the API, developers can modify permissions and create custom front ends.

Editions of Reporting Services

SSRS comes in four editions, which mirror the editions of SQL Server and Visual Studio. These editions range from free starter editions to full-scale Enterprise editions.

Chapter 5, “Reporting Services Deployment Scenarios,” has more information about the different editions and supported features. Table 1.3 offers a high-level overview of the different editions of SSRS.

TABLE 1.3 Overview of SSRS Editions

Edition

Quick Overview

Express

Express Edition offers a lightweight edition of SSRS for developers who want to learn how to use SSRS.

Workgroup

Workgroup is for use in small departmental organizations or branch offices. Should the need arise, Workgroup Edition can be upgraded to Standard or Enterprise editions.

Standard

Standard Edition is for use in small- to medium-sized organizations or in a single-server environment. Standard Edition supports all the features of SSRS, except highly specialized data-driven subscriptions, and infinite drill down through Report Builder.

Enterprise

Enterprise Edition is for use in large organizations with complex database and reporting needs. Enterprise Edition is fully functional, and supports scale-out functionality across a web farm.

Developer

Developer Edition is essentially the same as Enterprise Edition, but has different licensing requirements to make it easy for people to develop enterprise applications. Developer Edition is licensed per developer in development (nonproduction) environments.

How Is SSRS Licensed?

The short answer is that every machine running SSRS has to be licensed as if it were running SQL Server. This means that any machine running SQL Server is automatically licensed for not just SQL Server, but for the entire Microsoft BI platform. This includes SSRS, SSAS, SSNS, and SSIS. This makes it really easy to get one’s feet wet with SSRS. Just install SQL Server on one machine, and then install SSRS. On the flip side, if the choice is made to use the Enterprise Edition in a web farm scale-out scenario, every machine in the web farm must be licensed to run SQL Server.

Microsoft offers three ways to license SQL Server. Table 1.4 summarizes the licensing options for SQL Server. For more information and specific costing options, contact your Microsoft sales representative or reseller.

TABLE 1.4 Licensing Options for SQL Server

License Options

Description

Per processor

Licenses are paid for each processor on the machine running SQL Server. This license is optimal for web-facing or business-to-business machines running SQL Server. It is also helpful for very large user populations.

Server license plus device client access licenses (CALs)

Licenses are paid for the machine running SQL Server, and for every device connecting to SQL Server. An ideal situation for this type of licensing (CALs) is kiosks for which there are multiple users per device.

Server license plus user CALs

Licenses are paid for the machine running SQL Server and per user accessing the machine. This is useful for enterprises in which every user can access the SQL Server machine for multiple devices.


Tip – When determining the most appropriate licensing model, make sure to calculate the total license cost for each option and combination of licensing options. Select a licensing model combination that is the most financially sound for your business.


Summary

This chapter provided a high-level overview of SSRS features. It started by introducing you to some end-user tools. From there, it showed how different SSRS features can be leveraged in the report development life cycle. Finally, it concluded with a discussion about the different editions of SSRS and how it is licensed.

The following chapters build on the content covered here, and delve into the capabilities of SSRS reports and into the architecture of SSRS. Chapter 6, “Installing Reporting Services,” concludes Part I, with a discussion about different installation scenarios and how to install SSRS.

© Copyright Pearson Education. All rights reserved.