Sie sind auf Seite 1von 49

Building Reporting Services

and Excel Reports with


Analysis Services Cubes
April 25, 2010
Jen Underwood
MCITP, MCDBA, MCSD
jen@jenunderwood.com

Session Agenda

Reporting Solution Architecture Options


Excel*
Excel OLAP features and limitations
Pivot tables, charts, conditional formatting, cube formulas and online/offline cubes

Demo: Excel with Analysis Services Cubes


Reporting Services with Analysis Services Cubes

Reporting Services OLAP features and limitations


BIDS and Report Builder 2.0 (and 3.0)
Analysis Services and OLE DB providers
MDX Query Designer
Filters, parameters, groups, sorts, charts, aggregates and KPIs

Demo: Using BIDS Reporting Services Projects


Resources

*Note the new Excel 2010 and PowerPivot is not covered in this session.
2009 by Jen Underwood. All rights reserved.

Reporting Solution
Architecture Options

Native Reporting Services (Default Mode)

Reporting Services provides

Report Authoring with BIDS and greatly


improved Report Builder 2.0 and 3.0

SQL Server, Oracle, Teradata, DB2, SAP NetWeaver BI,


Hyperion Essbase, web service, XML and others

Manages and Delivers Reports

Enhanced report design controls such as Matrix


Ad-hoc reporting control through Report Models
Expanded data visualization controls (Dundas)

Supports a wide range of data sources

Managed enterprise reporting


Ad-hoc reporting
Web-based reporting

Report Manager and Configuration Manager


My Reports personalization feature
Custom Application and Web Service Extensions

High-Performance Report Processing

Caching
Snapshots
Subscriptions

SOURCE: Microsoft MSDN


2009 by Jen Underwood. All rights reserved.

Reporting Services
Report
management

Report authoring
Visually design
reports & layout
via the
Report Designer

Manage report
categorization,
data sources,
security,
subscriptions via
the Report
Manager

Model design

End user report


creation

Design semantic
models that map
to real business
entities via the
Model Designer

Enable end users to


create their own Adhoc reports via the
Report Builder

SOURCE: January 2007 presentation by Tom Casey, Microsoft


Source: January 2007 presentation by Tom Casey, Microsoft
2009 by Jen Underwood. All rights reserved.

SharePoint Options

Reporting Services can be configured with SharePoint

Report Center BI Portal and/or Report Explorer and Report Viewer web parts

Create dashboards with varied data sources and common filtering of web parts

Integration requires SQL Server and Reporting Services Add-in for SharePoint
Two modes Full Integrated Mode and Partial

Windows SharePoint Services 3.0 MOSS SharePoint 2007 and 2010

Full Integrated Mode offers shared storage, security and centralized access to reports;
report server still performs processing, rendering, and delivery
Partial Integrated allows Reporting Services Server to stay in Native Mode

Full integrated mode

Report, Report Model and Data Source content types in Document Library
Report Viewer web part can be connected to SharePoint filters
Report Builder accessible via right click on a report
Version Control, check in/check out
Manage subscriptions
Alerts

SOURCE: Microsoft MSDN


2009 by Jen Underwood. All rights reserved.

SharePoint Options

Review integration feature limitations

Integration is not supported if SharePoint is enabled for Anonymous access


URL addressing is different
Linked reports are not supported
Security extension issues
My Reports feature is not supported
Batching is not supported

Endpoint referencing can be used to leverage features from both modes

2009 by Jen Underwood. All rights reserved.

Report Viewer Controls


.NET Windows Form Controls and ASP.NET Controls
Remote (Server) Mode and Local Mode
Remote Mode
Reporting Services parameter controls
All export formats supported
Easier than Local Mode when working with Analysis Services cubes

Local Mode
Requires creation of parameter controls and passing of parameter values
Only exports to Excel and PDF
Challenging when working with Analysis Services cubes

New Report Viewer features in 2008


Templates create a blank report and a form bound to a ReportViewer control
Report wizard and improved Expression Editor with code samples
ReportViewer controls now compress PDF exports

2009 by Jen Underwood. All rights reserved.

Reporting Services with PerformancePoint*

*MOSS 2010 PerformancePoint M&A is now


included with SharePoint Server Enterprise
In 2009, Microsoft announced that SharePoint
enterprise clients can use PerformancePoint at
no additional cost
PerformancePoint Server Dashboards

Combine SharePoint, Reporting Services, Excel Services


and PerformancePoint content into single page views
Link Reporting Services parameters to PerformancePoint filters

Side notes

PerformancePoint Add-in for Excel

PerformancePoint SharePoint Web Parts

2009 by Jen Underwood. All rights reserved.

Excel and Excel Services

Excel stand-alone, interactive workbook reports


more later on this option!

Connect to cubes using Data tab using Other Sources>Analysis Services

Excel Services is a SharePoint service

Excel Web Access Web Part enables display, edit, computation and interaction
with a live workbook
Also programmatic access and custom Excel Calculation Services using
user-defined functions (UDFs)

Excel Services 2007 doesn't support Excel workbooks with macros/code

Analysis Services 2008 uses MSOLAP.4 it does not ship with Excel Services
Install the client access components of
SQL Server 2008 on each SharePoint server
Connect to cubes using an trusted data providers
in Excel Services
Publish Excel Workbook to Excel Services

SOURCE: Microsoft TechNet


2009 by Jen Underwood. All rights reserved.

Excel
Data connection
library
Conditional
formatting
Spot trends and
exceptions in your
data to better inform
your decisions

Quickly access the


most common data
sources in your
enterprise for data
analysis

Rich interactivity
Excel Services
Enhanced Sorting
and Filtering
Sort by cell color or
filter data to work
with only the data
you need

Analyze data with


new PivotTable tools
and enhanced
support for SQL
Server Analysis
Services

SOURCE: January 2007 presentation by Tom Casey, Microsoft


2009 by Jen Underwood. All rights reserved.

11

Excel

Excel OLAP Features and Limitations


Excel 2007

OLAP@Work Excel 97 Add-In

Excel 2007

Excel Add-In
Pivot Table Services
Office Web Components

Online/Offline cubes
Allows multiple Fact tables
Named sets, filters and visual totals
KPIs, Conditional formatting and server
defined formatting
Drill throughs and custom actions
Cube formulas and convert to formulas
Charts
Data mining add-ins
More columns and rows
16,384 columns
1,048,576++ rows limited by memory

Gemini
PowerPivot

Warning!
Excel pivot tables are inflexible but
can be extended using VBA and
convert to formulas features
To see MDX use a Profiler trace or
CodePlex PivotTableExtender add-in
Excel applies different MDX syntax
and Pivot Table versions, some older
features do not work in 2007 unless
specified as an older version
Be prepared for challenging issues
and research known issues
Do a proof-of-concept BEFORE
committing to requirements

2009 by Jen Underwood. All rights reserved.

Analysis Services Provider Connection

2009 by Jen Underwood. All rights reserved.

Analysis Services Provider Connection

2009 by Jen Underwood. All rights reserved.

Excel with Analysis Services Cubes


OLAP and Pivot Features

Measures,
Dimensions, KPIs

Pivot Chart
Filters

Pivot Table Fields

2009 by Jen Underwood. All rights reserved.

Report Design

Report pivot table design theme templates


Pivot table dimensions, named sets, KPIs and measures fields
Interactively expand or collapse hierarchies
Multiple selection, custom label and value filters with and optional Visual Totals
Excel issues derived MDX queries SELECT FROM (SELECT) for filters
Some calculated members do not work with filters and non-visual totals in 2007 versions

Show or hide selected dimension fields


Optional hover over Property display in tooltips
Charts and chart layout templates
Conditional formatting
Default and custom sorting and grouping
VBA can be used to extend features

2009 by Jen Underwood. All rights reserved.

Conditional Formatting

Advanced Conditional Formatting


and Icons
No longer limited to 3 conditions
Able to choose icons
Analysis Services defined icons are
not transferred; redefine in Excel
Can also filter by conditional format

2009 by Jen Underwood. All rights reserved.

Drill Through Actions and Show Details

Drill through is a cube defined Action


Actions access is new in Excel 2007
Returned data can be customized
Max detail rows to return can be
controlled
Other cube Actions also supported

Show Details is an Excel feature


Displays lowest level of row
granularity in the cube
Different than Drill to Detail
cube Action

2009 by Jen Underwood. All rights reserved.

Cube Formulas
7 new cube formula functions
Escape the pivot table restrictions
Can use anywhere in workbook
outside of the pivot table
Nice intellisense prompting

2009 by Jen Underwood. All rights reserved.

Convert to Formulas Techniques


Allows OLAP pivot table data to be converted to linked tabular data
Additional custom columns and functions can be created, can re-pivot but
no longer have the nice cube OLAP pivot table data controls
VBA or macros can be made to automate the workaround tasks

Cells now reference


OLAP Cube Formulas

2009 by Jen Underwood. All rights reserved.

Online and Offline Cubes

Offline OLAP stores OLAP pivot table view data locally in cube (.cub) files

Select Offline OLAP and step through the Create Offline Cube Data File wizard
Pivot table defined filter settings are pre-applied to wizard
Only fields used in the pivot table will be shown in the field list while offline
Skipped dimension levels, KPIs and distinct count measures not supported

Online/Offline connection can be toggled


Offline cubes allow advanced filtering not enabled with Online
Requires the OLE DB Analysis Services Provider connection

2009 by Jen Underwood. All rights reserved.

Demo: Excel with Analysis Services Cubes

2009 by Jen Underwood. All rights reserved.

Tips

Fabulous Excel 2007 OLAP Add-In on CodePlex at


http://www.codeplex.com/OlapPivotTableExtend

View MDX
Private calculated members
Settings options
Searching calculations

Not in the Add-Ins tab, accessed


via right-click in Pivot Table

2009 by Jen Underwood. All rights reserved.

Tips
Check all of the Excel 2007 PivotTable Option Settings
Show calculated members not under Measures set Show Calculated Members to True
PivotTable Options>Display Tab>Show Calculated Members from OLAP Server
Parent-Child Dimensions using Role Security
change Show Properties in ToolTips to False
PivotTable Options>Display Tab> Show Properties in ToolTips

Windows Firewall
Need to open 2 tcp ports 2382 and 2383
or it may block connections

2009 by Jen Underwood. All rights reserved.

Tips

Define security within the cube


Test security views of data on the cube by toggling between users
Test security views of data when in Excel using the Roles property of the
connection string or logging in under that user

Click Users
Icon

Define Cube
Role Security
Select Role
to Test

2009 by Jen Underwood. All rights reserved.

Set Role to Test


in Connection

Reporting Services with


Analysis Services Cubes

Reporting Services with Analysis Services Cubes


SSRS 2005
MDX Query Designer, Date Picker
and Multiple Value Parameters
SSRS 2000

SSRS 2008R2
Maps, Indicators, Report Builder 3.0,
Shared Data Sets, Report Parts Gallery

SSRS 2008
Tablix, Report Builder 2.0
and Data Visualization

2008 new architecture improves


performance and scalability
Ability to use multiple OLAP report
parameters and cascading parameters
Flexible report design layout with Tablix
Enhanced data visualization (Dundas)
Analysis Server aggregates, custom
aggregates, calculated measures,
extended properties
Cell set and row set (flattened) format
results with different OLAP providers

Warning!
More flexible than Excel - still clunky
Toggling between MDX query design
views might clear custom MDX
Measures do need to be on columns
but there are workarounds
Research known issues and consider
hybrid workarounds
Do a proof-of-concept BEFORE
committing to requirements
Test report scalability

2009 by Jen Underwood. All rights reserved.

BIDS and Report Builder 2.0 (and 3.0)

Typically BIDS for developers and Report Builder for business users
BIDS only report design features
Custom report controls, .NET assemblies
Source code control integration

Report Builder 2.0 and 3.0

Blows away 1.0 with a much more usable interface


Improved, flexible report design capabilities that previously were BIDS only features
New optional Report Model use
Shared and multiple data sources
Query designer is available for
SQL Server data sources
Click-Once user deployment
after manually configuring server
settings from 1.0 to 2.0
(3.0 pointer should be resolved)

2009 by Jen Underwood. All rights reserved.

Report Builder 3.0

Report Builder 3.0 New Features

Getting so much better with each release!


Improved overall usability
Ad-hoc reporting tool for non-technical
business users or power users
Publish new reports to SharePoint
or edit existing reports
New reusable Report Parts and the Gallery
New shared datasets offer a way to share
a query for multiple reports

SharePoint List Data Extension

Improved visualizations

Dataset query can include dataset parameters


Query results can be cached for specific
parameter combinations

Sparklines, indicators and basic thematic mapping

Rendering Reports to Data Feeds


Cube reporting appears to be almost identical to 2.0
with the exception of the new general features previously noted

Source: http://blogs.msdn.com/seanboon/archive/2008/10/10/how-to-build-sparkline-reports-in-sql-server-reporting-services.aspx
2009 by Jen Underwood. All rights reserved.

Analysis Services and OLE DB Provider


Analysis Services Data Provider

OLE Provider for Analysis Services

Supports query parameters


Includes Analysis Server aggregates and
extended properties
Limited to row set (flattened) result formats
with static columns and dimension
placement on rows*
Parent-child hierarchies merged into one
column requiring use of a SSRS Recursive
Parent Group property
Less coding to build reports

Does not support query parameters,


requires expression queries
Cell set result format allows dynamic
columns and dimensions on rows
Keeps parent-child hierarchy formats but is
inflexible with grouping layout
Requires extra coding to build reports

* Third-party Intelligencia Query can mitigate some provider issues

SOURCE: Applied Microsoft SQL Server Reporting Services2008 by Teo Lachev and MSDN

2009 by Jen Underwood. All rights reserved.

Analysis Services and OLE DB Provider

Row set format


flattened

SOURCE: MSDN

2009 by Jen Underwood. All rights reserved.

MDX Query Designer


Filters and Parameters

Measures, KPIs, Dimensions


and Named Sets

Calculated Members

2009 by Jen Underwood. All rights reserved.

MDX Query Designer


MDX editor

Warning!
Toggling between MDX query design
views might clear custom MDX. Save
custom MDX outside of the designer.

2009 by Jen Underwood. All rights reserved.

Develop and Debug with MDX Studio

Developed by Mosha Pasumansky


MDX query testing
MDX query performance statistics
Analyze and debugging
MDX formatting
Clear cache
Nice visuals for seeing
what is really happening

2009 by Jen Underwood. All rights reserved.

Filters, Parameters, Grouping and Sorting

Query filters and dataset filters

Parameters

OLAP sources require cube UniqueMember name parameter values


i.e. [Date].[Date].[Date].&[20090106]
Date picker requires parameters as Date data type
Multiple data sets can be used from different data sources
Prune data sets that will be used as parameters
Show hidden data sets wizards create
Nice cascading parameters features

Groups

Query filters preferred; MDX Query Designer has a filter feature


Keep in mind dataset filters are applied after the data is retrieved from data source

Query filter

Multiple level row and column groups


Advanced recursive parent option for
displaying parent child hierarchies

Sorting

Basic sort at the group level


Interactive sort at the cell level

2009 by Jen Underwood. All rights reserved.

Data set filter

Parameter

Charts

New gauges, funnels and other analytic charts for improved data visualization
Scale breaks improve visual display of wide value ranges
Trendline charts can be created using calculated series formulas
Multiple axes and chart areas
Drill actions can be used for interactive navigation
Report sections using bookmarks
Another report
URL

Miscellaneous new features


Missing values indicators
Custom colors

2009 by Jen Underwood. All rights reserved.

Subreports, Linked Reports and Document Maps

Subreports
Master report passes subreport
parameter via the subreport properties
Parameter names on master and
subreport should match

Linked Reports
Another report
URL
Bookmark

Document maps provide quick


navigation to a specific report
section
Configured as an
Advanced Group
property

2009 by Jen Underwood. All rights reserved.

Aggregates and KPIs

Server Aggregates

Server based aggregates are defined by the data provider Aggregate


Do not confuse with Reporting Services aggregate scope based functions like Sum
Server aggregates can only be used in simple group expressions
To display server aggregates with detail rows, change dataset Subtotal options

KPIs
Displayed in MDX Query Designer below Measures
Three types of values: KPI Value, Goal and Status

2009 by Jen Underwood. All rights reserved.

Demo: Using BIDS Reporting Services Projects

2009 by Jen Underwood. All rights reserved.

Tips

Date Range Parameters with Calendar Control

Parameter expression in
UniqueName format

2009 by Jen Underwood. All rights reserved.

Tips
Default Values also need to be formatted in the unique member format
Expression formula ="[Date].[Calendar Date].[Year].&["+CSTR(Year(Today))+"]
Reference other data set queries using HEAD and TAIL in MDX
<<TAIL|HEAD>> (FILTER([Date].[Date].[Date].members,
Not IsEmpty ([Measures].[STP Volume])), 1)

Map Default

Expression
Formulas

HEAD and TAIL


in Queries

2009 by Jen Underwood. All rights reserved.

Tips

Recursive parent group property for displaying Parent-Child hierarchies with the
Analysis Services provider

Row Group
Properties

2009 by Jen Underwood. All rights reserved.

Tips

Use OLE DB provider when you need Measures on Rows or use Teos trick to
bypass SSRS validation and edit MDX query in the report definition xml
Single Sign On Security when Analysis Services hosted on a different server
Kerberos used to delegate user identity from Reporting Services to Analysis Services
Trusted Account approach with EffectiveUsername connection string setting
Custom security application development

For reports with custom, parameterized MDX, first hard code parameter values,
then lay out the report and finally go back to create real parameters in MDX
Consider a hybrid approach of mixing OLTP data sets and OLAP data sets to work
around issues that may be impossible with an OLAP only approach
Use MDX query filters for returning a subset of data for report parameters
Evaluate third-party MDX design tools if you will be building a lot of OLAP reports

SOURCE: Applied Microsoft SQL Server 2008 Reporting Services, Teo Lachev
2009 by Jen Underwood. All rights reserved.

Resources

Resources

http://sqlserver2008jumpstart.microsofttraining.com
http://www.ssas2008-info.com
Applied Microsoft SQL Server Reporting Services2008 by Teo Lachev
http://www.prologika.com and Teos blogs
Excel 2007 Advanced Report Development by Timothy Zapawa
Excel 2007 PivotTables and PivotCharts by Paul McFedries
Professional Microsoft SQL Server 2008 Reporting by Turley, Silva, Smith, Withee
Allan Folting, Microsoft Excel team program manager, blogs
http://davefackler.blogspot.com and Daves webcast videos
http://cwebbbi.spaces.live.com and Chris Webbs blogs
http://www.sqljunkies.com/WebLog/mosha/archive/2006/11/05/non_empty_behavior.aspx
http://www.codeplex.com/bidshelper/Release/ProjectReleases.aspx?ReleaseId=16707
http:// www.jumpstarttv.com
http://msdn.microsoft.com/
http://www.databasejournal.com articles by William Pearson
http://technet.microsoft.com/en-us/library/dd433177.aspx
http://blogs.msdn.com/sqlrsteamblog
2009 by Jen Underwood. All rights reserved.

SharePoint Feature Matrix

2009 by Jen Underwood. All rights reserved.

SharePoint Feature Matrix

2009 by Jen Underwood. All rights reserved.

2009 by Jen Underwood. All rights reserved.

Das könnte Ihnen auch gefallen