51
SQL Server 2005 Reporting Services Bala Subra [email protected]

Ssrs 2005 Reporting Services

Embed Size (px)

DESCRIPTION

Generate reports with SSRS - SQL Server Reporting Services: This session will be a cornucopia of three sub-sessions. The first part will be to convince the skeptics. Why does every organization should consider SQL Server Reporting as part of its front-end solution? What will SSRS do better than a typical web application/site or a client-server application? The second portion will be a quick demo of the possibility and will be the shortest. The final part will talk about the best practices, tips from the field and will cover the implementation techniques.

Citation preview

Page 1: Ssrs 2005 Reporting Services

SQL Server 2005 Reporting ServicesBala [email protected]

Page 2: Ssrs 2005 Reporting Services

Executive Summary

Delivered through: Traditional and interactive reports Scalable, manageable and embeddable

server infrastructure Integration with SharePoint, Office applications, browser and

other familiar tools Single platform and tools for all types of structured data

(relational, hierarchical, multidimensional)

Product enabling employees at all Product enabling employees at all levels of an organization to realize the levels of an organization to realize the promise of BI and to promote better promise of BI and to promote better decision makingdecision making

Page 3: Ssrs 2005 Reporting Services

BI User Profiles

Information Information ConsumersConsumers

Information Information ExplorersExplorers

5-10% of users5-10% of users

15-25% of users15-25% of users

65-80% of users65-80% of users

SQL ServerSQL ServerReportingReportingServicesServices

SQL Server SQL Server Analysis ServicesAnalysis Services

AnalystsAnalysts

Page 4: Ssrs 2005 Reporting Services

SQL Server CatalogSQL Server Catalog

Report Server

Reporting Services Architecture

Delivery

Delivery Targets(E-mail, File share,

Custom)

Security Services(NT, Passport,

Custom)

Security

Data Sources(SQL, OLE DB, ODBC,

Oracle, Custom)

Output Formats (HTML, Excel, PDF, Custom)

Report Processing

Browser

Management

Custom App

URLURL WMIWMI Web ServiceWeb Service

Data Retrieval Rendering

Page 5: Ssrs 2005 Reporting Services

Reporting Services Architecture

Page 6: Ssrs 2005 Reporting Services

Business Scenarios

Enterprise Reporting In-house reports (Sales, Finance, HR)

Manageability, portal and LOB integration

Embedded Reporting Report processing included in applications

Extensible, embeddable architecture

B2B Reporting Partner reporting via extranets, Internet

Data isolation, extensible security

Page 7: Ssrs 2005 Reporting Services

AuthoringAuthoring ManagementManagement DeliveryDelivery

Reporting Lifecycle

SQL Server Reporting Services supports the full SQL Server Reporting Services supports the full reporting lifecycle, including Authoring, reporting lifecycle, including Authoring, Management and DeliveryManagement and Delivery

Page 8: Ssrs 2005 Reporting Services

Report Authoring

Report Designer Integrated with Visual Studio .NET 2003 Powerful, XML Report Definition Language (RDL)

Freeform / Table / Matrix / Chart Parameters (Dynamic, Hierarchical) Sorting / Filtering / Grouping / Aggregates Interactivity (Drill-down, Drill-through) Full VB.NET Expression Language

Published RDL definition to enable 3rd parties to create custom authoring tools

Extensible query execution architecture SQL Server / Analysis Services OLE DB / ODBC / Oracle

Page 9: Ssrs 2005 Reporting Services

Report Management

Web Service APIs for management Web management user interface Report Management Functions

Report Metadata (Name, Description, Connections, Credentials, Parameters)

Scheduling integrated with SQL Server Agent Execution properties (live, cache or snapshot) History of prior executions

Extensible, role-based security architecture

Page 10: Ssrs 2005 Reporting Services

Report Delivery

Single report definition can be rendered to diverse output formats Web Formats (HTML 4, HTML 3.2, HTML w/OWC) Print Formats (TIFF, RTF, PDF) Data Formats (Excel, XML, CSV)

Personalized and administrator defined subscription and delivery Ability to select output formats per subscription Can deliver links as well as rendered reports Data-driven subscriptions for personal delivery

Extensible delivery provider architecture E-mail, File System, Custom

Page 11: Ssrs 2005 Reporting Services

Reporting Services Terminology

Data Source – a database Dataset – a query against a data source Data Region – an item that displays repeated rows

of data Types of Data Regions

Table – a banded, tabular report Matrix – a cross-tab (or pivot table) report List – data arranged in free-form fashion Chart – a graph

Page 12: Ssrs 2005 Reporting Services

Creating Reporting Services Project

Creating a Report Creating a Group Interactive Sorting Creating Drill-Down Reports

Page 13: Ssrs 2005 Reporting Services

Calculations & Formatting

Reporting Services uses VB-like expressions You can use standard +. -, *, /, mod operators String concatenation with & (don’t use +)

Aggregate functions: Sum, Count, Avg, Min, Max, First, Last, etc.

Also supported: IIf(), Len(), Switch()

Page 14: Ssrs 2005 Reporting Services

Expressions

Fields to access values from current row e.g. =Fields!LastName.Value

Globals to access global report data e.g. =Globals!PageNumber

User to access info about authenticated user running the

report e.g. =User!UserID; =User!Language

Page 15: Ssrs 2005 Reporting Services

Expressions

Parameters to access value of input parameters e.g., =Parameters!Country.Value

ReportItems to access values from other sections of report e.g.= ReportItems!txtQuantity.Value *

Page 16: Ssrs 2005 Reporting Services

Using Custom Code You can write your own VB functions and

include them in the Code tab of the Report|Report Properties dialog

Visual Basic is the only language supported by SSRS in the code window

You can also develop custom assemblies that you can call from reports Assemblies can be developed in any .NET

language You have to follow a number of steps to reference,

deploy, and access your assemblies

Page 17: Ssrs 2005 Reporting Services

Custom Code Example

Public Function ColumnSel (ByVal parameter as Parameter, ByVal ColID as integer) as Boolean

If parameter.IsMultiValue then For i as integer = 0 to parameter.Count-1 If val(parameter.Value(i)) = ColID

then Return True End If Next Return False Else Return False End If Return FalseEnd Function

Page 18: Ssrs 2005 Reporting Services

Formatting Fields

Conditional Formatting Use IIf, Switch, or a custom function as value for

property in property sheet You can do this for textboxes and table rows

(sections of a report) Need to display sales over $1,000 bolded and

in green

Page 19: Ssrs 2005 Reporting Services

Bala Subra

Page 20: Ssrs 2005 Reporting Services

Themes Core Product Enhancements

Extend features based on feedback from SQL2K version Incremental enhancements, performance and scalability

Tighter Integration Strengthen SQL Server end-to-end BI scenarios Tighter integration with Office and SharePoint

Developer Focus Unparalleled integration for the Visual Studio developer Freely redistributable Windows and ASP.NET controls

Empowering End Users Report Builder enables end-user reporting scenarios Increased interactivity

Page 21: Ssrs 2005 Reporting Services

What’s new in 2005

Report Builder VS Integration VS Controls Interactive Sort Multi-valued parameters Parameter Date Picker Management Studio

Integration MDX Query builder

Configuration Tool Custom Report Item Floating headers Printing from IE (SP2) Web Parts (SP2) 64 bit Support Multi-instance Support Expression builder

enhancements

Page 22: Ssrs 2005 Reporting Services

Bala Subra

Page 23: Ssrs 2005 Reporting Services

Most Requested Items Not in 2005

Rich Text support RTF/Doc rendering PPT rendering Shared Styles (Styles sheets) Templates Font embedding in PDF Many Chart enhancement (Same as SP2) Heterogeneous Join Edit in Preview

Page 24: Ssrs 2005 Reporting Services

Rich Client Printing

Direct routing of print jobs without needing to export

Small ActiveX control downloaded via browser

Select page range, orientation, margins

Preview page output Server enhancements for

performance

Page 25: Ssrs 2005 Reporting Services

Enhanced Expression Editor

Available for all expressions in VS Report Designer

List of available VB.NET functions

Inline parameter information

Statement completion

Real-time syntax checking

Page 26: Ssrs 2005 Reporting Services

Multi-Valued Parameters

Report developer can specify any parameter is multi-valued

Report processing constructs SQL or MDX syntax

Multiple default values also supported

Value sets can passed via URL or SOAP API

Page 27: Ssrs 2005 Reporting Services

Date Picker Parameters

Calendar control for choosing dates

Localized and Globalized

Windows and Web support

Page 28: Ssrs 2005 Reporting Services

Interactive Sort

Report author can add ability for end user to resort data within data regions

Resorting happens without re-querying the database

Support for multi column and for nested / grouped sort

Page 29: Ssrs 2005 Reporting Services

Floating Headers

New type of interactivity similar to freeze panes in Excel

Works Horizontally and Vertically Table header Matrix column and row headers Table columns

Must be continuous columns anchored on the right or left

Page 30: Ssrs 2005 Reporting Services

MDX Query Builder

MDX and data mining query builders

MDX parameter support

Member extended properties

Support for server aggregates

Page 31: Ssrs 2005 Reporting Services

Custom Report Item

Enables ISVs and Developers to add custom visualizations to a report Primary scenario is enhanced charting

Additional chart types Maps Gauges

Supports interactivity Actions Sort

Supports all data region features Filter Grouping Group Filters Etc…

The Report Designer supports a conversion API

Currently limited to images Future plans for all report item types

Page 32: Ssrs 2005 Reporting Services

Management Studio Integration

Single point of management for all SQL Server components

Superset of Report Manager functions

Script generation from property dialogs

Page 33: Ssrs 2005 Reporting Services

Server Configuration Tool

Graphical configuration tool for Report Server Database Settings Virtual Directories E-Mail Key Management

Page 34: Ssrs 2005 Reporting Services

SharePoint Web Parts

Report Explorer provides browsing of server namespace and subscription

Report Viewer used to view reports

Parts can be connected or used standalone

Works in both SPS and WSS

Page 35: Ssrs 2005 Reporting Services

Visual Studio Integration

Report design completely integrated with Visual Studio language projects

Natural extension of VS data functionality

Included in VS Pro and above

Page 36: Ssrs 2005 Reporting Services

Report Controls Controls make it easy

to embed reporting functionality into applications

Windows Forms (rich client) and Web Forms (ASP.NET) control

Local processing mode (no server) or connected server mode

Page 37: Ssrs 2005 Reporting Services

Report Builder

A new ad-hoc report design tool for Reporting Services

Targeted at business users who want to find and share answers to interesting questions

Driven from a business model of the data so users do not need to understand the underlying data structures

Fully integrated with Reporting Services and delivered in SQL Server 2005

Page 38: Ssrs 2005 Reporting Services

Why Report Builder?

Report Report ConsumersConsumers

Business Business UsersUsers

Report Viewer

Report Builder

Power UsersPower UsersDevelopersDevelopers Report Designer

Page 39: Ssrs 2005 Reporting Services

What Report Builder is not…

A replacement for Pivot Tables Can be used for some data slice and dice but not specifically

designed for this capability An analytical client

No support for advanced financial calculations, what ifs, writebacks, financial or business modeling, etc.

A developer-focused design tool No nested data regions, freeform layout, multiple queries,

conditional formatting, or custom code An HTML-based design tool

Report Builder is a WinForms (.NET Framework) application

Page 40: Ssrs 2005 Reporting Services

Report Builder Architecture

SQL Server CatalogSQL Server CatalogSQL Server CatalogSQL Server Catalog

Web Service / URL interfaceWeb Service / URL interfaceWeb Service / URL interfaceWeb Service / URL interface

Report ServerReport Server

Report BuilderReport BuilderClientClient

Report BuilderReport BuilderClientClient

ModelModelDesignerDesigner

ModelModelDesignerDesigner

Data Sources(SQL Server,

Analysis Services)

Drill through report generationDrill through report generation

Query generationQuery generation

ReportReport ManagerManager

ReportReport ManagerManager

ReportReportDesignerDesigner

ReportReportDesignerDesigner

SQL MgmtSQL MgmtStudioStudio

SQL MgmtSQL MgmtStudioStudio

Page 41: Ssrs 2005 Reporting Services

Report Builder Client

Built on top of familiar Microsoft Office paradigms (Excel, PowerPoint)

Reports built via report templates (table, matrix, chart, combinations)

“Click once” application deployed from the Report Server

Users download and launch the client from Report Manager (new or existing report)

Finished reports can be saved on the server

Page 42: Ssrs 2005 Reporting Services

Report Builder Reports

Report Builder reports are just like any other Reporting Services report… Report Builder reports are defined in RDL Managed by the same APIs Secured by the same APIs

Except: Report Builder reports contain semantic model metadata When an Report Builder report is requested by report

processing, the metadata is used to generate a query in the source language

A new component on the Report Server handles the query generation

Page 43: Ssrs 2005 Reporting Services

Infinite Drill

Automatic generation of new drillthrough reports allows users to explore data along model navigation paths

Queries for navigation reports are generated on the fly, passing the context of the user’s current “location”

Users can keep drilling as long as there is a path to follow from the current item

Custom reports can be specified for model items Generated navigation reports are not saved unless

the user explicitly saves them

Page 44: Ssrs 2005 Reporting Services

Report Builder Model Designer

Hosted in Visual Studio (new project type)

For editing models used by Report Builder

Auto-generation of models from data sources

Page 45: Ssrs 2005 Reporting Services

Model Design

Model Designer is interface for designing/editing a model New project type in BI Development Studio Define fields and roles Define calculated fields Organize model

Models can be auto-generated in Model Designer or on the Report Server Generates entities, fields and roles based on source

metadata Auto-generation against SQL Server and Analysis Services

databases

Page 46: Ssrs 2005 Reporting Services

Model Designer

Page 47: Ssrs 2005 Reporting Services

Report Models Models define entities, fields and roles available for Report

Builder Models reference a data source (either SQL Server or Analysis

Services)

Models are stored in the Report Server as a new item type Includes new management APIs

Published models can be secured Items within models (entities, fields, roles) can also be secured Users only see items they have permissions to see

Model security and management through SQL Server Management Studio

Page 48: Ssrs 2005 Reporting Services

Report Builder vs. Report DesignerReport Builder Report Designer

Targeted at business users Targeted at IT pros and developers

Ad hoc reports Managed reports

Auto-generates queries using semantic layer on top of the source

Native queries (SQL, OLE DB, XML/A, ODBC, Oracle)

Reports built on templates Free-form (nested, banded) reports

Click-once application, easy to deploy and manage

Integrated into Visual Studio

Cannot import Report Designer reports

Can work with reports built in Report Builder

Page 49: Ssrs 2005 Reporting Services

Wrap-up

Report Builder is… a new ad hoc report design tool for SQL Server Reporting

Services targeted at business users who want to find and share

answers to interesting questions driven from a business model of the data so users do not

need to understand the underlying data structures is fully integrated with SQL Server Reporting Services and

delivered in SQL Server 2005

Page 50: Ssrs 2005 Reporting Services

SQL Server Report Builder

Bala Subra

Page 51: Ssrs 2005 Reporting Services

Thank You!