+ All Categories
Home > Documents > Build a Browser-based OLAP Reporting Solution Using SQL Server 2000 Analysis Services, Microsoft...

Build a Browser-based OLAP Reporting Solution Using SQL Server 2000 Analysis Services, Microsoft...

Date post: 04-Jan-2016
Category:
Upload: tyrone-cunningham
View: 214 times
Download: 0 times
Share this document with a friend
28
Build a Browser- Build a Browser- based OLAP Reporting based OLAP Reporting Solution Solution Using SQL Server 2000 Analysis Services, Microsoft Using SQL Server 2000 Analysis Services, Microsoft Office XP Web Components, and ASP.NET Office XP Web Components, and ASP.NET Sadra Abedinzadeh Sadra Abedinzadeh Farzad Peyravi Farzad Peyravi Ashkan Zarnani Ashkan Zarnani
Transcript
Page 1: Build a Browser-based OLAP Reporting Solution Using SQL Server 2000 Analysis Services, Microsoft Office XP Web Components, and ASP.NET Sadra Abedinzadeh.

Build a Browser-based Build a Browser-based OLAP Reporting SolutionOLAP Reporting SolutionUsing SQL Server 2000 Analysis Services, Microsoft Using SQL Server 2000 Analysis Services, Microsoft Office XP Web Components, and ASP.NETOffice XP Web Components, and ASP.NET

Sadra AbedinzadehSadra AbedinzadehFarzad PeyraviFarzad PeyraviAshkan ZarnaniAshkan Zarnani

Page 2: Build a Browser-based OLAP Reporting Solution Using SQL Server 2000 Analysis Services, Microsoft Office XP Web Components, and ASP.NET Sadra Abedinzadeh.

Talk AgendaTalk Agenda OverviewOverview Introducing OLAPIntroducing OLAP

ConceptsConcepts Analysis Services ManagerAnalysis Services Manager

Office XP Web ComponentsOffice XP Web Components Focus on the PivotTable componentFocus on the PivotTable component Review features, user interface & APIReview features, user interface & API

Web-Based OLAP Report ArchitectureWeb-Based OLAP Report Architecture Configure OLAP data source for HTTPConfigure OLAP data source for HTTP XML Web Services deliver XML data XML Web Services deliver XML data

directly to the clientdirectly to the client

Page 3: Build a Browser-based OLAP Reporting Solution Using SQL Server 2000 Analysis Services, Microsoft Office XP Web Components, and ASP.NET Sadra Abedinzadeh.

Features of a (Browser-based) Features of a (Browser-based) OLAP Reporting SolutionOLAP Reporting Solution

Must connect with an OLAP data sourceMust connect with an OLAP data source Must allow the user to drill down into the data Must allow the user to drill down into the data

with flexibility and easewith flexibility and ease Must provide a user-friendly visual interface Must provide a user-friendly visual interface

that includes charts, because reporting is most that includes charts, because reporting is most effective when it is visual.effective when it is visual.

Must allow the user to save and retrieve Must allow the user to save and retrieve custom reports.custom reports.

Should be browser-based:Should be browser-based: Implemented as a server-based Web applicationImplemented as a server-based Web application Accessible from a Web browser over the Internet or Accessible from a Web browser over the Internet or

a public intraneta public intranet

Page 4: Build a Browser-based OLAP Reporting Solution Using SQL Server 2000 Analysis Services, Microsoft Office XP Web Components, and ASP.NET Sadra Abedinzadeh.

OLAP GlossaryOLAP Glossary Online Analytical Processing (OLAP)Online Analytical Processing (OLAP)

Transforms relational data into multi-dimensional Transforms relational data into multi-dimensional data structures, a.k.a., data structures, a.k.a., cubescubes, or, , or, hypercubeshypercubes

An OLAP An OLAP repositoryrepository may contain one or more may contain one or more cubescubes

Multi-Dimensional Data Expressions (MDX)Multi-Dimensional Data Expressions (MDX) Specialized query language for multi-dimensional Specialized query language for multi-dimensional

data structuresdata structures

Data miningData mining The process of drilling down into the underlying The process of drilling down into the underlying

details of a cube using MDX queriesdetails of a cube using MDX queries

Page 5: Build a Browser-based OLAP Reporting Solution Using SQL Server 2000 Analysis Services, Microsoft Office XP Web Components, and ASP.NET Sadra Abedinzadeh.

Cube AggregationCube Aggregation Cubes contain group-bys of all combinations of the Cubes contain group-bys of all combinations of the

included attributes.included attributes.

Page 6: Build a Browser-based OLAP Reporting Solution Using SQL Server 2000 Analysis Services, Microsoft Office XP Web Components, and ASP.NET Sadra Abedinzadeh.

Cube GlossaryCube Glossary DimensionsDimensions

A set of attributes that roughly correspond to A set of attributes that roughly correspond to RDBMS fields. A dimension is subdivided into RDBMS fields. A dimension is subdivided into levels.levels.

LevelsLevels A subdivision of a dimension.A subdivision of a dimension.

MeasuresMeasures The actual data value, typically numeric.The actual data value, typically numeric.

Page 7: Build a Browser-based OLAP Reporting Solution Using SQL Server 2000 Analysis Services, Microsoft Office XP Web Components, and ASP.NET Sadra Abedinzadeh.

Demo:Demo:Connect to an OLAP Data Connect to an OLAP Data Source from MS Office XPSource from MS Office XP

Page 8: Build a Browser-based OLAP Reporting Solution Using SQL Server 2000 Analysis Services, Microsoft Office XP Web Components, and ASP.NET Sadra Abedinzadeh.

OWC10 PivotTableOWC10 PivotTable

Page 9: Build a Browser-based OLAP Reporting Solution Using SQL Server 2000 Analysis Services, Microsoft Office XP Web Components, and ASP.NET Sadra Abedinzadeh.

Demo:Demo:Web-Based OLAP ReportWeb-Based OLAP Report

Connect to an OLAP data sourceConnect to an OLAP data source Create a new report using drag-dropCreate a new report using drag-drop Load an existing report from XMLLoad an existing report from XML Save a report to XMLSave a report to XML

Page 10: Build a Browser-based OLAP Reporting Solution Using SQL Server 2000 Analysis Services, Microsoft Office XP Web Components, and ASP.NET Sadra Abedinzadeh.

OLAP Report ArchitectureOLAP Report Architecture

Page 11: Build a Browser-based OLAP Reporting Solution Using SQL Server 2000 Analysis Services, Microsoft Office XP Web Components, and ASP.NET Sadra Abedinzadeh.

PivotTable Interaction with an PivotTable Interaction with an OLAP Data SourceOLAP Data Source

Page 12: Build a Browser-based OLAP Reporting Solution Using SQL Server 2000 Analysis Services, Microsoft Office XP Web Components, and ASP.NET Sadra Abedinzadeh.

Configure the OLAP Data Configure the OLAP Data Source for HTTP AccessSource for HTTP Access

Step 1: Install IIS on the database server where Step 1: Install IIS on the database server where Analysis Services resides.Analysis Services resides.

Step 2: Create a new Web site on the database Step 2: Create a new Web site on the database server. Copy msolap.asp into this directory.server. Copy msolap.asp into this directory. Location of msolapLocation of msolap

Step 3: Assign an external domain name to the Step 3: Assign an external domain name to the new Web site.new Web site.

Step 4: Install an SSL certificate on the server, Step 4: Install an SSL certificate on the server, linked to the new Web site.linked to the new Web site.

Step 5: Configure security credentialsStep 5: Configure security credentials Provider=MSOLAP.2;Data Provider=MSOLAP.2;Data

Source=http://localhost/msolap;Initial Source=http://localhost/msolap;Initial Catalog=Foodmart 2000;User ID=OLAPID;Password=test;Catalog=Foodmart 2000;User ID=OLAPID;Password=test;

Page 13: Build a Browser-based OLAP Reporting Solution Using SQL Server 2000 Analysis Services, Microsoft Office XP Web Components, and ASP.NET Sadra Abedinzadeh.

Security ConsiderationsSecurity Considerations You must enforce security credentials for an OLAP You must enforce security credentials for an OLAP

data source that is available over HTTP.data source that is available over HTTP. Analysis Services will assign a Cube role to a specific Analysis Services will assign a Cube role to a specific

cube. This role restricts overall access to the cube cube. This role restricts overall access to the cube and/or access to specific dimensions in the cube.and/or access to specific dimensions in the cube.

Create a security role as follows:Create a security role as follows: Create an NT User roleCreate an NT User role In SQL Server, create a Database role that maps to the NT In SQL Server, create a Database role that maps to the NT

User roleUser role In Analysis Services, create a Cube role that maps to the In Analysis Services, create a Cube role that maps to the

Database roleDatabase role For more information, consult “Creating Security Roles” in For more information, consult “Creating Security Roles” in

the Analysis Services help file at: the Analysis Services help file at: http://msdn.microsoft.com/library/en-us/olapdmad/agsecurityrhttp://msdn.microsoft.com/library/en-us/olapdmad/agsecurityroles_0t2r.asp?frame=trueoles_0t2r.asp?frame=true

Once the role has been created, add the NT User role Once the role has been created, add the NT User role credentials to the OLE DB connection string for the credentials to the OLE DB connection string for the OLAP data source. HTTP requests to the OLAP data OLAP data source. HTTP requests to the OLAP data source will be authenticated using these credentials.source will be authenticated using these credentials.

Page 14: Build a Browser-based OLAP Reporting Solution Using SQL Server 2000 Analysis Services, Microsoft Office XP Web Components, and ASP.NET Sadra Abedinzadeh.

Office XP Web ComponentsOffice XP Web Components PivotTable ComponentPivotTable Component

Connects to any OLAP data source that supports the Microsoft Connects to any OLAP data source that supports the Microsoft OLE DB Provider for OLAP Services 8.0 and higher.OLE DB Provider for OLAP Services 8.0 and higher.

Connects to any data source with an OLE DB provider, including Connects to any data source with an OLE DB provider, including MS SQL Server, MS Analysis Services, MS Access, and MS Excel.MS SQL Server, MS Analysis Services, MS Access, and MS Excel.

Allows users to analyze data by pivoting, grouping, filtering, and Allows users to analyze data by pivoting, grouping, filtering, and sorting.sorting.

Spreadsheet ComponentSpreadsheet Component Provides an Excel-like spreadsheet user interface, including a Provides an Excel-like spreadsheet user interface, including a

recalculation engine and an extensive function library. recalculation engine and an extensive function library.

Chart ComponentChart Component Graphically displays data from a bound Data Source, PivotTable or Graphically displays data from a bound Data Source, PivotTable or

Spreadsheet control. Refreshes automatically when data re-pivots.Spreadsheet control. Refreshes automatically when data re-pivots.

Data Source ComponentData Source Component Manages interactive communication with the data source.Manages interactive communication with the data source.

Page 15: Build a Browser-based OLAP Reporting Solution Using SQL Server 2000 Analysis Services, Microsoft Office XP Web Components, and ASP.NET Sadra Abedinzadeh.

Benefits of OWCBenefits of OWC Provides users with interactive access Provides users with interactive access

to data, from a variety of OLE DB-to data, from a variety of OLE DB-accessible data sources.accessible data sources.

OWC provides a familiar Microsoft OWC provides a familiar Microsoft Office user interface, and a rich subset Office user interface, and a rich subset of Office functionality.of Office functionality.

OWC is flexible:OWC is flexible: The components may be used The components may be used

interactively, with their visible interfaces.interactively, with their visible interfaces. The components may be used The components may be used

programmatically, with their APIs.programmatically, with their APIs.

Page 16: Build a Browser-based OLAP Reporting Solution Using SQL Server 2000 Analysis Services, Microsoft Office XP Web Components, and ASP.NET Sadra Abedinzadeh.

Using OWCUsing OWC They are COM components that provide both They are COM components that provide both

a visible interface and an API.a visible interface and an API. They are designed for use as both client-side They are designed for use as both client-side

and server-side components.and server-side components. OWC can be hosted as ActiveX controls OWC can be hosted as ActiveX controls

inside a Web browser:inside a Web browser: They provide a visible interface.They provide a visible interface. They provide a scripting interface for any They provide a scripting interface for any

Windows scripting language, incl. JavaScript and Windows scripting language, incl. JavaScript and VBScript.VBScript.

OWC can be hosted on a standard Windows OWC can be hosted on a standard Windows form, providing a visible interface.form, providing a visible interface.

OWC can be instanced in server-side code OWC can be instanced in server-side code for access to the base services, without for access to the base services, without having to use the visible interface.having to use the visible interface.

Page 17: Build a Browser-based OLAP Reporting Solution Using SQL Server 2000 Analysis Services, Microsoft Office XP Web Components, and ASP.NET Sadra Abedinzadeh.

OWC 9 vs. OWC 10OWC 9 vs. OWC 10 The OWC components were dramatically improved The OWC components were dramatically improved

between versions 9 and 10.between versions 9 and 10. PivotTable: more filtering and grouping options, plus PivotTable: more filtering and grouping options, plus

calculated fields and support for custom MDX queries.calculated fields and support for custom MDX queries. Spreadsheet: Improved calculation engine and tighter Spreadsheet: Improved calculation engine and tighter

integration with MS Excel 2002, incl. Support of a common integration with MS Excel 2002, incl. Support of a common XML spreadsheet format.XML spreadsheet format.

Chart: Expanded charting options and improved integration Chart: Expanded charting options and improved integration with the PivotTable component.with the PivotTable component.

OWC 9 (msowc.dll) and OWC 10 (owc10.dll) support OWC 9 (msowc.dll) and OWC 10 (owc10.dll) support side-by-side usageside-by-side usage

Clients must have a valid Office XP license for Clients must have a valid Office XP license for interactive access to OWC 10interactive access to OWC 10

Clients without a license have restricted access to Clients without a license have restricted access to ‘View Only’ mode‘View Only’ mode

Page 18: Build a Browser-based OLAP Reporting Solution Using SQL Server 2000 Analysis Services, Microsoft Office XP Web Components, and ASP.NET Sadra Abedinzadeh.

PivotTable FeaturesPivotTable Features Used for data reporting and data analysis Used for data reporting and data analysis

solutions incl. summary and cross-tabulation solutions incl. summary and cross-tabulation of raw, multi-dimensional data sets.of raw, multi-dimensional data sets.

FilteringFiltering Grouping (Ad-hoc and Interval)Grouping (Ad-hoc and Interval) Calculated TotalsCalculated Totals Custom MDXCustom MDX Custom SortingCustom Sorting Drillthrough of hierarchical dataDrillthrough of hierarchical data Export to ExcelExport to Excel Member PropertiesMember Properties

Page 19: Build a Browser-based OLAP Reporting Solution Using SQL Server 2000 Analysis Services, Microsoft Office XP Web Components, and ASP.NET Sadra Abedinzadeh.

PivotTable List Object ModelPivotTable List Object Model

View the OWC API View the OWC API documentation at: documentation at: C:\Program Files\ComC:\Program Files\Common Files\Microsoft Smon Files\Microsoft Shared\Web Componenthared\Web Components\10\1033\OWCVBA10.s\10\1033\OWCVBA10.CHMCHM

Page 20: Build a Browser-based OLAP Reporting Solution Using SQL Server 2000 Analysis Services, Microsoft Office XP Web Components, and ASP.NET Sadra Abedinzadeh.

PivotTable List API OverviewPivotTable List API Overview

PivotTablePivotTable Represents the container for the Represents the container for the PivotTable list. PivotTable list.

PivotDataPivotData Represents the data in a Represents the data in a PivotTable list. PivotTable list.

PivotResult*AxisPivotResult*Axis Represents the data in Column, Represents the data in Column, Row, Data, Filter and Group Row, Data, Filter and Group axes. axes.

PivotTotalPivotTotal Represents a total in a Represents a total in a PivotTable list. A total is the PivotTable list. A total is the aggregate value that is aggregate value that is displayed for the contents of a displayed for the contents of a given cell. given cell.

PivotFieldSetPivotFieldSet Represents a set of fields that Represents a set of fields that together form a hierarchy. together form a hierarchy.

PivotViewPivotView Represents a specific view of a Represents a specific view of a PivotTable list. PivotTable list.

Page 21: Build a Browser-based OLAP Reporting Solution Using SQL Server 2000 Analysis Services, Microsoft Office XP Web Components, and ASP.NET Sadra Abedinzadeh.

PivotTable APIPivotTable API

ConnectionStringConnectionString The OLE DB connection string.The OLE DB connection string.

DataMemberDataMember The DataMember name, The DataMember name, equivalent to the OLAP cube equivalent to the OLAP cube name.name.

ActiveViewActiveView Returns the PivotView object Returns the PivotView object that represents the current view that represents the current view of the PivotTable.of the PivotTable.

XMLDataXMLData XML data for the current XML data for the current PivotTable report, including PivotTable report, including connection information, data connection information, data and formatting.and formatting.

Page 22: Build a Browser-based OLAP Reporting Solution Using SQL Server 2000 Analysis Services, Microsoft Office XP Web Components, and ASP.NET Sadra Abedinzadeh.

PivotView APIPivotView API

ColumnAxisColumnAxis Represents a column in the Represents a column in the PivotTable. PivotTable.

RowAxisRowAxis Represents a row in the Represents a row in the PivotTable. PivotTable.

DataAxisDataAxis Represents a data field in the Represents a data field in the PivotTable.PivotTable.

FilterAxisFilterAxis Represents a filter field in the Represents a filter field in the PivotTable. PivotTable.

FieldSetsFieldSets A collection of PivotFieldSet A collection of PivotFieldSet objects. Fieldsets are added objects. Fieldsets are added using the PivotAxis using the PivotAxis

InsertFieldSet method.InsertFieldSet method. AddFieldSetAddFieldSet Adds a custom fieldset to the Adds a custom fieldset to the

PivotView.PivotView.

TotalsTotals A collection of PivotTotal A collection of PivotTotal objects.objects.

Page 23: Build a Browser-based OLAP Reporting Solution Using SQL Server 2000 Analysis Services, Microsoft Office XP Web Components, and ASP.NET Sadra Abedinzadeh.

PivotFieldSet APIPivotFieldSet API

FieldsFields A collection of PivotField A collection of PivotField objects objects

AllIncludeExcludeAllIncludeExclude Enumeration for the inclusion Enumeration for the inclusion state of all members not listed in state of all members not listed in a specific field’s a specific field’s IncludedMembers or IncludedMembers or ExcludedMembers list. ExcludedMembers list.

AddCalculatedFieldAddCalculatedField Adds a calculated field to the Adds a calculated field to the PivotFieldSet. Must first create PivotFieldSet. Must first create the custom field using the custom field using PivotView.AddFieldSet. Then PivotView.AddFieldSet. Then add the calculated field and add the calculated field and update the fieldset in the update the fieldset in the PivotTable using PivotTable using DataAxis.InsertFieldSet.DataAxis.InsertFieldSet.

AddCustomGroupAddCustomGroup Adds a custom group field to the Adds a custom group field to the PivotFieldSet. PivotFieldSet.

Page 24: Build a Browser-based OLAP Reporting Solution Using SQL Server 2000 Analysis Services, Microsoft Office XP Web Components, and ASP.NET Sadra Abedinzadeh.

PivotField APIPivotField API

FilterFunctionFilterFunction Enumeration for filter type.Enumeration for filter type.

FilterFunctionValueFilterFunctionValue The value to filter by.The value to filter by.

FilterOnFilterOn The PivotTotal to filter on.The PivotTotal to filter on.

SortOnSortOn The PivotTotal to sort on.The PivotTotal to sort on.

SortDirectionSortDirection The sort direction.The sort direction.

IncludedMembersIncludedMembers An array of field members to An array of field members to include in the view.include in the view.

ExcludedMembersExcludedMembers An array of field members to An array of field members to exclude from the view.exclude from the view.

Page 25: Build a Browser-based OLAP Reporting Solution Using SQL Server 2000 Analysis Services, Microsoft Office XP Web Components, and ASP.NET Sadra Abedinzadeh.

PivotTable EventsPivotTable Events

OnConnectOnConnect Occurs whenever the PivotTable Occurs whenever the PivotTable list connects to a data source.list connects to a data source.

PivotTableChangePivotTableChange Occurs whenever a PivotTable Occurs whenever a PivotTable list field, field set, or total is list field, field set, or total is added or deleted. added or deleted.

QueryQuery Occurs whenever a PivotTable Occurs whenever a PivotTable

list query becomes necessary.list query becomes necessary. SelectionChangeSelectionChange Occurs whenever the user Occurs whenever the user

makes a new selection. makes a new selection.

ViewChangeViewChange Occurs whenever the PivotTable Occurs whenever the PivotTable is redrawn. Provides a is redrawn. Provides a PivotViewReasonEnum to PivotViewReasonEnum to explain why the redraw explain why the redraw occurred.occurred.

ClickClick Occurs whenever the user clicks Occurs whenever the user clicks the PivotTable control.the PivotTable control.

Page 26: Build a Browser-based OLAP Reporting Solution Using SQL Server 2000 Analysis Services, Microsoft Office XP Web Components, and ASP.NET Sadra Abedinzadeh.

Demo:Demo:Web-Based OLAP ReportWeb-Based OLAP ReportStep Through CodeStep Through Code

Connect to an OLAP data sourceConnect to an OLAP data source Create a new report using drag-dropCreate a new report using drag-drop Load an existing report from XMLLoad an existing report from XML Save a report to XMLSave a report to XML

Page 27: Build a Browser-based OLAP Reporting Solution Using SQL Server 2000 Analysis Services, Microsoft Office XP Web Components, and ASP.NET Sadra Abedinzadeh.

Client RequirementsClient Requirements Clients must meet the following requirements Clients must meet the following requirements

to use the OWC PivotTable interactively in their to use the OWC PivotTable interactively in their browser: browser: Install Pivot Table Services (PTS)Install Pivot Table Services (PTS)

OLE DB Provider 8.0OLE DB Provider 8.0 MDACMDAC Note: Analysis Services SP3 contains the latest Note: Analysis Services SP3 contains the latest

version of PTS. Do not use an earlier version.version of PTS. Do not use an earlier version. Have a licensed copy of Office XP, or, an enterprise Have a licensed copy of Office XP, or, an enterprise

license agreement filelicense agreement file Be running IE 5.0 or greaterBe running IE 5.0 or greater

Note, technically you only need IE 4.01, but the Note, technically you only need IE 4.01, but the Trusted Sites dialog is not available until IE 5.0Trusted Sites dialog is not available until IE 5.0

Set up Trusted Sites to include the domain for the Set up Trusted Sites to include the domain for the OLAP data source (to enable cross-domain access)OLAP data source (to enable cross-domain access)

Page 28: Build a Browser-based OLAP Reporting Solution Using SQL Server 2000 Analysis Services, Microsoft Office XP Web Components, and ASP.NET Sadra Abedinzadeh.

ReferencesReferences Analysis Services Overview:Analysis Services Overview:

MSDN Library > SQL Server 2000 > SDK Documentation > MSDN Library > SQL Server 2000 > SDK Documentation > Analysis ServicesAnalysis Services

Microsoft MMC/Analysis service HelpMicrosoft MMC/Analysis service Help

KB Article 279489: How to Connect to Analysis Server KB Article 279489: How to Connect to Analysis Server 2000 by Using HTTP Connection2000 by Using HTTP Connection

Microsoft Office Solutions Articles: Pivoting Tables, Microsoft Office Solutions Articles: Pivoting Tables, Parts I and II by David StearnsParts I and II by David Stearns Office Solutions Development > Microsoft Office > Microsoft Office Solutions Development > Microsoft Office > Microsoft

Office (General) > Periodicals > Microsoft Office Solutions 2002Office (General) > Periodicals > Microsoft Office Solutions 2002

Introduction to Multidimensional Expressions (MDX)Introduction to Multidimensional Expressions (MDX) MSDN Library > Data Access > OLAP ServicesMSDN Library > Data Access > OLAP Services

Newsgroup:Newsgroup: microsoft.public.office.developer.web.componentsmicrosoft.public.office.developer.web.components


Recommended