basics & intro to sql server reporting services: sql server ssrs 2008 r2
DESCRIPTION
How to use SQL Server 2008 R2 reporting services instead of ASP.NET for every data presentation problems? Where SSRS is superior to raw SQL? How it helps QA to automate their test cases?TRANSCRIPT
SQL Server Reporting ServicesBala Subra@bsubra
@bsubra
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
@bsubra
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
@bsubra
SQL Server CatalogSQL Server Catalog
Report Server
Reporting Services Architecture (2005)
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
@bsubra
Reporting Services Architecture (2008)
@bsubra
Service Architecture (Reporting Services)
@bsubra
Component Architecture
@bsubra
Reporting Services available Web service development options
@bsubra
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
@bsubra
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
@bsubra
Report Authoring
Report Designer Integrated with Visual Studio Powerful, XML Report Definition Language (RDL)
Freeform / Table / Matrix / Chart / Tablix 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
@bsubra
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
@bsubra
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
@bsubra
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
@bsubra
Creating Reporting Services Project
Creating a Report Creating a Group Interactive Sorting Creating Drill-Down Reports
@bsubra
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()
@bsubra
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
@bsubra
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 *
@bsubra
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
@bsubra
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
@bsubra
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
@bsubra
@bsubra
Themes Core Product Enhancements
Extend features based on feedback 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
@bsubra
Feature sets
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
@bsubra
@bsubra
Most Requested Items
PPT rendering Shared Styles (Styles sheets) Templates Font embedding in PDF Many Chart enhancement Heterogeneous Join Edit in Preview
@bsubra
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
@bsubra
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
@bsubra
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
@bsubra
Date Picker Parameters
Calendar control for choosing dates
Localized and Globalized
Windows and Web support
@bsubra
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
@bsubra
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
@bsubra
SQL Server 2008 R2 Enhancements New Data Sources
SharePoint List SQL Azure SQL Server Parallel Data Warehouse
Combining Data from More Than One Dataset Conditional Rendering Expressions
=iif(RenderFormat.Name="EXCEL", True, False)
Read/Write Report Variable Shared Datasets Report Parts
@bsubra
Data Synchronization
DomainScope
Text Box Orientation
@bsubra
Data Visualization
Data Bars Sparklines Maps Indicators
@bsubra
MDX Query Builder
MDX and data mining query builders
MDX parameter support
Member extended properties
Support for server aggregates
@bsubra
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
@bsubra
Management Studio Integration
Single point of management for all SQL Server components
Superset of Report Manager functions
Script generation from property dialogs
@bsubra
Server Configuration Tool
Graphical configuration tool for Report Server Database Settings Virtual Directories E-Mail Key Management
@bsubra
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
@bsubra
Visual Studio Integration
Report design completely integrated with Visual Studio language projects
Natural extension of VS data functionality
Included in VS Pro and above
@bsubra
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
@bsubra
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
@bsubra
Why Report Builder?
Report Report ConsumersConsumers
Business Business UsersUsers
Report Viewer
Report Builder
Power UsersPower UsersDevelopersDevelopers Report Designer
@bsubra
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
@bsubra
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
@bsubra
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
@bsubra
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
@bsubra
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
@bsubra
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
@bsubra
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
@bsubra
Model Designer
@bsubra
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
@bsubra
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
@bsubra
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
@bsubra
Comparing Report Authoring Environments
@bsubra
SQL Server Report Builder
@bsubra
Planning a Deployment Topology
@bsubra
or
Thank You!
@bsubra