GETTING STARTED WITH SQL SERVER REPORTING SERVICES SSRS

  • Slides: 21
Download presentation
GETTING STARTED WITH SQL SERVER REPORTING SERVICES (SSRS) Tim Leung SQL Bits October 2007

GETTING STARTED WITH SQL SERVER REPORTING SERVICES (SSRS) Tim Leung SQL Bits October 2007

Agenda � Features and Advantages � Architecture � Installation � Creating Reports

Agenda � Features and Advantages � Architecture � Installation � Creating Reports

Features � Cost – Free! Included as part of SQL 2005 � Web based

Features � Cost – Free! Included as part of SQL 2005 � Web based solution making deployment simple � Reports viewable from browsers, Win/Web Controls � Data can come from various data sources � Report types include tabular, matrix, charts/graphs, and interactive drill down reports � Subscription capabilities through email/file share � Output formats: HTML, PDF, TIFF, XLS, CSV, XML � Report Caching/Snapshots for performance

Report Builder � Report Builder enables end users to create their own reports �

Report Builder � Report Builder enables end users to create their own reports � Deployed to users using ‘Click Once’ technology � Start report builder using browser http: //<server>/reportserver/reportbuilder. application � A report model must be built beforehand – this is not a job for the end user

Managing Reports � The Report Server can be managed through a web based ‘Report

Managing Reports � The Report Server can be managed through a web based ‘Report Manager’ � The default address for SQL Express is: http: //localhost/reports$SQLExpress � Reports can also be managed by connecting via Management Studio � Command line tools are also available. These include rs. exe, rsconfig. exe � Demo…

Reporting Services Architecture � Reports are created in Report Definition Language (RDL). � It

Reporting Services Architecture � Reports are created in Report Definition Language (RDL). � It is well documented XML structure � RS is based on a web service architecture � 2 SQL Databases Report Server/Report Use Code. Smith to automatically generate your reports

IIS – (Internet Information Services) Reporting Service Web Service Reporting Services Report Processor Rendering

IIS – (Internet Information Services) Reporting Service Web Service Reporting Services Report Processor Rendering Extensions Data Processing Extensions Scheduling Delivery Processor Delivery Extensions SQL Server Reportdb. Temp. DB SQL Server Agent

Security � Windows authentication is used. � Report Server is managed on a role

Security � Windows authentication is used. � Report Server is managed on a role basis – there are several predefined roles � Consider using SSL to encrypt report traffic � You can set up security at the IIS Virtual Directory level � Security can also be set at the Data. Source level There are many security considerations when deploying reports over the Internet. Report Manager is not designed for use in this scenario.

Installation � Run SQL Server Setup to install download SQLExpress with Advanced Services/Toolkit �

Installation � Run SQL Server Setup to install download SQLExpress with Advanced Services/Toolkit � Prerequisites: IIS, ASP. Net, . Net Framework 2. 0, SSL (Optional) � You can install RS in a web farm � Setup will upgrade a RS 2 k installation � Multiple Installations require separate SQL instances Install Adventure. Works and download the free report packs from Microsoft

Configure Report Server If Reporting Services fails to work, make sure to check here

Configure Report Server If Reporting Services fails to work, make sure to check here

Creating Reports � Reports are created with Visual Studio or the Business Intelligence Dev

Creating Reports � Reports are created with Visual Studio or the Business Intelligence Dev Studio (BIDS) � The Report Wizard is a good place to start � Demo. . . Create reusable styles and templates in order to save time

Formatting � Standard. Net formatting is used in RS � Beware that formatting is

Formatting � Standard. Net formatting is used in RS � Beware that formatting is data type specific � It’s a good idea to learn some of the standard formats � C for currency � N for numbers � F for fixed point

Expressions � Most attributes can be controlled using expressions. 2 useful functions are: -

Expressions � Most attributes can be controlled using expressions. 2 useful functions are: - IIF( Condition, True. Value, False. Value) - Switch( Fields!profit. Value < 1, "red", Fields!profit. Value > 0, "Green", Fields!profit. Value > 100, "blue") Expressions are an essential part of writing good reports

Adding Styles/Templates � Add Styles (Style. Templates. xml): Program FilesMicrosoft Visual Studio 8Common 7IDEPrivate.

Adding Styles/Templates � Add Styles (Style. Templates. xml): Program FilesMicrosoft Visual Studio 8Common 7IDEPrivate. AssembliesBusiness Intelligence WizardsReportsStyles � Add Templates: Program FilesMicrosoft Visual Studio 8Common 7IDEPrivate. AssembliesProject. Ite msReport. Project

Input Parameters � Report Parameters can be added to accept user input � UI

Input Parameters � Report Parameters can be added to accept user input � UI elements include textboxes, checkbox lists and calendar controls � Cascading parameters can be created. This is where one parameter value causes another parameter list to be populated with related values

Stored Procedures � To use SP’s, set the Data. Source to the SP Name

Stored Procedures � To use SP’s, set the Data. Source to the SP Name � To pass report parameters to the stored procedure, mappings must be set up � Remember also to change the ‘command type’ from text to stored procedure Beware that changing the Stored Procedure Name will likely clear the parameter mappings

Final Tips � Report Manager or rs. exe can be used to deploy reports

Final Tips � Report Manager or rs. exe can be used to deploy reports � Text. Boxes contain link and culture settings � Use snapshots and caching to help performance

Summary � Features and Advantages � Architecture � Installation � Creating Reports

Summary � Features and Advantages � Architecture � Installation � Creating Reports

Resources � Newsgroups: microsoft. public. sqlserver. reportingsvcs � Samples Microsoft Report Packs � www.

Resources � Newsgroups: microsoft. public. sqlserver. reportingsvcs � Samples Microsoft Report Packs � www. vbug. com � tim@vbug. co. uk