The required Extension types are: Security Extensions, Data Processing Extensions, Rendering Extensions, Report Processing Extensions, and Delivery Extensions.. Reporting Services includ
Trang 1Extensions be deployed You can create additional Extensions that perform operations
specific to your own needs and business practices The required Extension types are:
Security Extensions, Data Processing Extensions, Rendering Extensions, Report
Processing Extensions, and Delivery Extensions
Security Extensions
It is the Security Extension’s function to authenticate users and groups to a Report Server
You can create a custom Security Extension to replace the default Security Extension,
but only one Security Extension can be used in each installation of Reporting Services
Windows authentication is used in the default Security Extension
Data Processing Extensions
Data Processing Extensions query a data source and return a tabular result set
Reporting Services provides Data Processing Extensions for SQL Server, Oracle,
Analysis Services, OLE DB, and ODBC data sources You can also develop your
own Data Processing Extensions Reporting Services can also use any ADO.NET
data provider
Query requests from the Report Processor are processed with the Data Processing
Extensions and perform tasks such as: opening a connection, analyzing or running
a query, returning a list of field names or a rowset, iterating through rows or rowsets,
passing parameters to a query, and retrieving metadata information
Rendering Extensions
Rendering Extensions do the work of transforming the retrieved data and layout
information from the Report Processor into a device-specific format Reporting
Services includes seven rendering extensions:
䉴 HTML Rendering Extension The Report Server uses the HTML Rendering
Extension to render the report, when a report is requested through a Web
browser
䉴 Excel Rendering Extension The Excel Rendering Extension is used to
render reports that can be viewed and changed in Microsoft Excel 2000 or later
䉴 CSV Rendering Extension The Comma-Separated Value (CSV) Rendering
Extension is used to render reports in comma-delimited plain text fi les
䉴 XML Rendering Extension The XML Rendering Extension is UTF-8
encoded and renders reports in XML fi les
Trang 23 4 0 M i c r o s o f t S Q L S e r v e r 2 0 0 5 D e v e l o p e r ’s G u i d e
䉴 Image Rendering Extension The Image Rendering Extension renders reports
to bitmaps or metafi les and can render reports in the following formats: BMP, EMF, GIF, JPEG, PNG, TIFF, and WMF The default image rendered is in TIFF format
䉴 PDF Rendering Extension The PDF rendering extension renders reports in
PDF fi les Adobe Acrobat 6.0 or later is used to open or view these reports
Report Processing Extensions
The Report Server uses Report Processing Extensions to process report items such
as tables, charts, text boxes, lists, images, lines, rectangles, and even subreports You can add custom Report Processing Extensions to handle specialized report items or actions pertinent to your business operations
Delivery Extensions
The Delivery Extensions are used by the Scheduling and Delivery Processor to deliver reports to various locations Reporting Services includes two Delivery Extensions:
䉴 E-mail Delivery Extension This extension sends an e-mail message via the
Simple Mail Transport Protocol (SMTP) and can include the report or a URL link to the report You can also send notices that do not include the report or URL link to devices such as pagers or telephones
䉴 Shared Folder Delivery Extension This extension sends reports to a shared
folder on your network and allows you to specify a location, fi lename, format, and overwrite options for the fi le
You can use Delivery Extensions to work in combination with subscriptions You can create a subscription and choose a Delivery Extension for report delivery
Report Manager
The Report Manager is the primary tool for accessing and managing Reporting Services reporting solutions The Report Manager is an ASP.NET Web-based application and is accessed by pointing your Web browser to http://<servername>/ reports You can see the Report Manager in Figure 9-3
You can use the Report Manager to manage the content of the Report Server instance such as the folder hierarchy and security access settings The Report
Trang 3Manager enables you to view and manage all of the reports that have been deployed
to the Report Server Using the Report Manager, you can create and manage data
sources and connection strings, folders, report models, linked reports, report history,
schedules, and subscriptions The Report Manager allows the Reporting Services
Administrator to set up the security and manage role definitions for the reports that
can be accessed using Reporting Services You can also launch the Report Builder
design tool to create or modify model-based reports
Reporting Services Configuration
and Management Tools
Reporting Services includes a visual tool called the Reporting Services Configuration
tool, as well as several command-line utilities, that allow you to deploy, upgrade, and
manage Report Servers
Figure 9-3 Reporting Services Report Manager
Trang 43 4 2 M i c r o s o f t S Q L S e r v e r 2 0 0 5 D e v e l o p e r ’s G u i d e
Reporting Services Confi guration Tool
The Reporting Services Configuration tool is a visual utility that allows you to configure Report Server instances This tool can be used to modify the settings of a Report Server that was installed with the default configuration and can also be used
to configure local or remote Report Server instances You can also use the Reporting Services Configuration tool to update a ReportServer database to a new format from
a previous version If you modify the configuration through other tools, such as the command-line utilities, the Reporting Services Configuration tool will automatically detect those changes when you connect to the instance of Report Server
NOTE
If you installed a Report Server in an offline state, you need to use this tool to configure the server
so that it can be used.
To start the Reporting Services Configuration tool, go to Start | Programs | Microsoft SQL Server 2005 | Configuration Tools Then click the Reporting Services Configuration option An Instance Selection dialog will be displayed like the one in Figure 9-4
After selection of an instance of Report Server to configure, the Report Server Configuration Manager will be displayed Figure 9-5 shows the Report Server Configuration Manager
As you can see in Figure 9-5, each of the Report Server components is shown on the left side of the dialog, and each component that is already configured includes
a green check mark next to it Each of the components that need to be configured has
Figure 9-4 Report Server installation instance selection
Trang 5a red x-mark next to it You can select each of the components regardless of whether
they have been configured already or not, and make changes to their settings
䉴 Server Status This displays the Report Server instance information and
properties
䉴 Report Server Virtual Directory This allows you to specify a virtual
directory for the Report Server You can also create a new virtual directory and
optionally require Secure Socket Layer (SSL) connections
䉴 Report Manager Virtual Directory This allows you to specify a virtual
directory for the Report Server reports You can also create a new virtual directory
䉴 Windows Service Identity This allows you to specify the user account under
which the Report Services Windows service runs
䉴 Web Service Identity This allows you to specify the account under which the
Report Services Web service runs For those machines running IIS 5 or older, the
specifi ed account is a ASP.NET Machine account, and for those running IIS 6 or
later, the Web service runs under the context of the application pool
Figure 9-5 Report Server Configuration Manager
Trang 63 4 4 M i c r o s o f t S Q L S e r v e r 2 0 0 5 D e v e l o p e r ’s G u i d e
䉴 Database Setup Here you can select the ReportServer database and connection
permissions that are used by this instance of Report Server You can also create the database if it does not already exist, verify a ReportServer database version, set the DSN, and grant user access rights from this display
䉴 Encryption Keys This option lets you back up, restore, and manage the
encryption keys for the Report Server instance
䉴 Email Settings This allows you to set the e-mail address and delivery
method for the Report Server to send e-mail notifi cations
䉴 Execution Account Use this option to set the account to use if the Report
Server is to perform unattended operations
Report Server Command-Prompt Utilities
When you install a Report Server, three command-prompt utilities that you can use to administer the Report Server are also automatically installed They are the rsconfig utility, the rs utility, and the rskeymgmt utility
The rsconfig Utility
The rsconfig utility is a tool that allows you to configure and manage a Report Server connection to the ReportServer database It also permits you to configure an account that the Report Server can use for unattended report processing The rsconfig utility stores connection and account values in an RSReportServer.config file
You can run the rsconfig utility on a local or remote instance of Reporting Services, but you need to be a local administrator on the computer that hosts the Report Server you are configuring and Windows Management Instrumentation (WMI) must be installed on the computer that you are configuring To use the rsconfig utility, you execute the rsconfig.exe program that is located in the \Program Files\Microsoft SQL Server\90\Tools\Binn directory The following shows an example, and the arguments that can be used with the rsconfig utility are listed in Table 9-4
rsconfig -?
rsconfig -e -u <DOMAIN\ACCOUNT> -p <PASSWORD> -t
The rs Utility
The rs utility is a tool you can use to run VB NET scripts and perform scripting operations to publish reports and create or copy items in ReportServer databases The script file must be written in VB NET code and stored in a Unicode or UTF-8 text file with an rss file extension
Trang 7To run the rs utility, you need to have the proper authority to connect to the Report
Server instance you are running the script against To use the rs utility, run the rs.exe
file located in the \Program Files\Microsoft SQL Server\90\Tools\Binn directory
The following code shows example uses of rs, and the arguments that can be used
with the rs utility are listed in Table 9-5
rs -?
rs –i c:\script_copy.rss -s http://localhost/reportserver
The rskeymgmt Utility
The rskeymgmt utility is an encryption key management tool that you can use to
back up, delete, or restore the key set that is defined during Setup You can also use
Command-Line Switch Requirement Description
{–c} Required if –e argument is
not used
Indicates the connection string and data source values to connect a Report Server to the ReportServer database, will be included in arguments –m, –s, –i, –d, –a, –u, –p, or –t
{–e} Required if –c argument
is not used
Indicates that the unattended report execution account will be included with arguments –u and –p,
or –t
{–m computername} Required if configuring a
remote Report Server instance
Name of the computer hosting Report Server Default value is localhost
{–i instancename} Required if you are using
named instances
The named instance of the ReportServer database
{–s servername} Required The SQL Server instance that hosts the ReportServer
database
{–d databasename} Required The name of the ReportServer database
{–a authmethod } Required The Report Server authentication method for
connection to the ReportServer database Values can
be Windows or SQL (not case-sensitive)
{–u [domain\]username} Required with –e, optional
with –c
A user account for the ReportServer database connection
{–p password } Required if –u is specified The password to use with the –u argument Can be
blank, is case-sensitive
{–t} Optional Outputs error messages to the trace log
Table 9-4 Arguments to rsconfig
Trang 83 4 6 M i c r o s o f t S Q L S e r v e r 2 0 0 5 D e v e l o p e r ’s G u i d e
this tool to attach a report server instance to a shared report server database You can use the rskeymgmt utility in database recovery operations, and if the keys cannot be recovered, the rskeymgmt tool provides a way to delete the encrypted content that is
no longer useful
The rskeymgmt tool can be run only on a computer that hosts the Report Server, and you need to be a local administrator on that computer You cannot use the rskeymgmt utility to manage the encryption keys of a remote Report Server instance, but it can be used it to join a remote Report Server instance to a Report Server Web farm
To run the rskeymgmt utility, you need to have the proper authority to connect to the Report Server instance you are running the script against To use the rskeymgmt utility, run the rskeymgmt.exe file located in the \Program Files\Microsoft SQL Server\90\Tools\Binn directory
The following code shows an example, and the arguments that can be used with the rskeymgmt utility are shown in Table 9-6
rskeymgmt -?
rskeymgmt -a -f a:\backupkey\keys -p <password>
Command-Line Switch Requirement Description
{–i input_file} Required The rss file to execute
{–s serverURL} Required The Web server name and Report Server virtual
directory name
{–u [domain\]username} Optional A user account for the ReportServer connection If
omitted, the default is the current Windows user account
{–p password } Required if –u is specified The password to use with the –u argument Is
case-sensitive
{–l time_out} Optional The number of seconds before server connection
times out Default is 60 A value of 0 specifies no timeout
{–b} Optional Sets commands in the file to run in batch mode
{–v globalvar} Optional Global variables that are used in the script
{–t} Optional Outputs error messages to the trace log
Table 9-5 Arguments to rs
Trang 9Command-Line Switch Requirement Description
{–e} Optional Extracts key for encryption/decryption for copying to
a file Requires –f and –p arguments
{–a} Optional Applies a saved copy of the key to a report server
instance Requires –f and –p arguments
{–d} Optional Deletes all encrypted data in a Report Server database
and identifiers from the public key table for a Report Server instance
{–s} Optional Generates a new key and re-encrypts all content using
the new key
{–j} Optional Joins a remote Report Server instance to an existing
Report Server Web farm
{–r installationID} Optional Removes the installationID (GUID) value for a Report
Server instance
{–f file} Required if –e or –a
is specified
Path to the file that stores a backup copy of the keys
For –e argument, file is written to a file For –a argument, key value stored in the file is applied to the Report Server instance
{–p password } Required if –f is specified The password used to back up or restore a key Cannot
be empty
{–i instancename} Required if you are using
named instances
A local Report Server instance
{–m computername} Optional Name of the remote computer hosting Report Server
that you are joining to a Web farm
{–n servername} Required if you are using
named instances
The name of the Report Server instance on a remote computer
{–u useraccount} Optional The administrator account on the remote computer that
you are joining to the Web farm
{–v password } Required if –u is specified The password to use with the –u argument
{–t} Optional Outputs error messages to the trace log
Table 9-6 Arguments to rskeymgmt
Trang 103 4 8 M i c r o s o f t S Q L S e r v e r 2 0 0 5 D e v e l o p e r ’s G u i d e
Report Authoring Tools
Reporting Services reports are created using the Report Designer or the Report Builder The Report Designer has a fully graphical design surface and interface program using the Visual Studio 2005 shell to enable you to interactively design and test reports The Report Builder is a client-side report designer that allows end users to create ad hoc reports based on a report model and then deploy them to the server or export them to
a local computer Another tool, the Report Model Designer, is used to define the report models that the Report Builder uses
After a report is designed, the report definitions are stored in the ReportServer database Reporting Services reports are stored in a new XML-based data format called Report Design Layout (RDL) By default, these RDL definitions are stored
in SQL Server 2005’s ReportServer database In addition to the report’s RDL
specifications, the ReportServer database also stores information about a report’s security and destination
Report Designer
Report Designer is a graphical tool with design surfaces used to preview and publish reports Within the Report Designer environment, tabbed windows are provided that allow you to interactively design reports, including data panes, layout panes, report elements, and preview panes Tools such as query builders, an Expression editor, and wizards are also included to help you step through the process of creating a simple report
There are several ways you can create a report using the Report Designer The Report Wizard is a tool that will guide you through the steps necessary to create
a simple tabular or matrix-type report You can create a blank report using the Report Project template in the development environment and add data queries and layout information to it
Using the Report Wizard to Create a Report
To use the Report Wizard to create a report, you open up SQL Server 2005’s
Business Intelligence Development Studio and then select the File | New | Project
On the New Projects dialog, click the Business Intelligence Projects options from the Project Types list box to view the installed BI project templates and select the Report Project Wizard template Type a name and location for the project and click OK
A series of wizard dialog boxes will be displayed to step you through the report creation process The first wizard dialog will prompt you for a data source The next