Build a Browser-based OLAP Reporting Solution Using SQL Server 2000 Analysis Services, Microsoft Office XP Web Components,...
About Me <ul><li>Jeffrey Hasan </li></ul><ul><ul><li>[email_address] , or,  [email_address] </li></ul></ul><ul><li>Manager...
Just Released <ul><li>Performance Tuning and Optimizing ASP.NET Applications </li></ul><ul><li>Apress, March 2003 (ISBN: 1...
Talk Agenda <ul><li>Overview </li></ul><ul><li>Introducing OLAP </li></ul><ul><ul><li>Concepts </li></ul></ul><ul><ul><li>...
Features of a (Browser-based) OLAP Reporting Solution <ul><li>Must connect with an OLAP data source </li></ul><ul><li>Must...
OLAP Glossary <ul><li>Online Analytical Processing (OLAP) </li></ul><ul><ul><li>Transforms relational data into multi-dime...
Cube Aggregation <ul><li>Cubes contain group-bys of all combinations of the included attributes. </li></ul>
Cube Glossary <ul><li>Dimensions </li></ul><ul><ul><li>A set of attributes that roughly correspond to RDBMS fields. A dime...
Demo: Connect to an OLAP Data Source from MS Excel XP
OWC10 PivotTable
Demo: Web-Based OLAP Report <ul><li>Connect to an OLAP data source </li></ul><ul><li>Create a new report using drag-drop <...
OLAP Report Architecture
PivotTable Interaction with an OLAP Data Source
Configure the OLAP Data Source for HTTP Access <ul><li>Step 1: Install IIS on the database server where Analysis Services ...
Security Considerations <ul><li>You must enforce security credentials for an OLAP data source that is available over HTTP....
Office XP Web Components <ul><li>PivotTable Component </li></ul><ul><ul><li>Connects to any OLAP data source that supports...
Benefits of OWC <ul><li>Provides users with interactive access to data, from a variety of OLE DB-accessible data sources. ...
Using OWC <ul><li>They are COM components that provide both a visible interface and an API. </li></ul><ul><li>They are des...
OWC 9 vs. OWC 10 <ul><li>The OWC components were dramatically improved between versions 9 and 10. </li></ul><ul><ul><li>Pi...
PivotTable Features <ul><li>Used for data reporting and data analysis solutions incl. summary and cross-tabulation of raw,...
PivotTable List Object Model <ul><li>View the OWC API documentation at:  C:Program FilesCommon FilesMicrosoft SharedWeb Co...
PivotTable List API Overview Represents a specific view of a PivotTable list.  PivotView Represents a total in a PivotTabl...
PivotTable API XML data for the current PivotTable report, including connection information, data and formatting. XMLData ...
PivotView API Adds a custom fieldset to the PivotView. AddFieldSet Represents a filter field in the PivotTable.  FilterAxi...
PivotFieldSet API Adds a custom group field to the PivotFieldSet.  AddCustomGroup Adds a calculated field to the PivotFiel...
PivotField API The PivotTotal to sort on. SortOn An array of field members to exclude from the view. ExcludedMembers An ar...
PivotTable Events Occurs whenever the user makes a new selection.  SelectionChange Occurs whenever the user clicks the Piv...
Demo: Web-Based OLAP Report Step Through Code <ul><li>Connect to an OLAP data source </li></ul><ul><li>Create a new report...
Client Requirements <ul><li>Clients must meet the following requirements to use the OWC PivotTable interactively in their ...
Further Information <ul><li>Analysis Services Overview: </li></ul><ul><ul><li>MSDN Library > SQL Server 2000 > SDK Documen...
Read My New Book! <ul><li>Performance Tuning and Optimizing ASP.NET Applications </li></ul><ul><li>Apress, March 2003 (ISB...
Upcoming SlideShare
Loading in...5
×

Olap

1,454

Published on

ppt

Published in: Education, Technology
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
1,454
On Slideshare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
0
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

Olap

  1. 1. Build a Browser-based OLAP Reporting Solution Using SQL Server 2000 Analysis Services, Microsoft Office XP Web Components, and ASP.NET Jeffrey Hasan, MCSD Manager, Web Development InfoQuest Systems, Inc.
  2. 2. About Me <ul><li>Jeffrey Hasan </li></ul><ul><ul><li>[email_address] , or, [email_address] </li></ul></ul><ul><li>Manager, Web Development at InfoQuest Systems, Inc. </li></ul><ul><ul><li>A leading provider of business intelligence services and applications for the telecommunications and broadband industries, at http://www.infoquest.tv . </li></ul></ul><ul><li>Microsoft Certified Solution Developer (MCSD) </li></ul><ul><li>(Co-) Author of: </li></ul><ul><ul><li>Performance Tuning and Optimizing ASP.NET Applications, APress, 2003. ISBN: 1590590724. </li></ul></ul><ul><ul><li>ADO.NET Programmer’s Reference, Wrox Press, 2001. </li></ul></ul><ul><ul><li>Professional .NET Framework, Wrox Press, 2001. </li></ul></ul><ul><ul><li>Professional VB6 Web Programming, Wrox Press, 1999. </li></ul></ul><ul><ul><li>Articles for MSDN Magazine and Advisor Media publications. </li></ul></ul>
  3. 3. Just Released <ul><li>Performance Tuning and Optimizing ASP.NET Applications </li></ul><ul><li>Apress, March 2003 (ISBN: 1590590724) </li></ul><ul><li>http://www.asptechnology.net </li></ul>
  4. 4. Talk Agenda <ul><li>Overview </li></ul><ul><li>Introducing OLAP </li></ul><ul><ul><li>Concepts </li></ul></ul><ul><ul><li>Analysis Services Manager </li></ul></ul><ul><li>Office XP Web Components </li></ul><ul><ul><li>Focus on the PivotTable component </li></ul></ul><ul><ul><li>Review features, user interface & API </li></ul></ul><ul><li>Web-Based OLAP Report Architecture </li></ul><ul><ul><li>Configure OLAP data source for HTTP </li></ul></ul><ul><ul><li>XML Web Services deliver XML data directly to the client </li></ul></ul>
  5. 5. Features of a (Browser-based) OLAP Reporting Solution <ul><li>Must connect with an OLAP data source </li></ul><ul><li>Must allow the user to drill down into the data with flexibility and ease </li></ul><ul><li>Must provide a user-friendly visual interface that includes charts, because reporting is most effective when it is visual. </li></ul><ul><li>Must allow the user to save and retrieve custom reports. </li></ul><ul><li>Should be browser-based: </li></ul><ul><ul><li>Implemented as a server-based Web application </li></ul></ul><ul><ul><li>Accessible from a Web browser over the Internet or a public intranet </li></ul></ul>
  6. 6. OLAP Glossary <ul><li>Online Analytical Processing (OLAP) </li></ul><ul><ul><li>Transforms relational data into multi-dimensional data structures, a.k.a., cubes , or, hypercubes </li></ul></ul><ul><ul><li>An OLAP repository may contain one or more cubes </li></ul></ul><ul><li>Multi-Dimensional Data Expressions (MDX) </li></ul><ul><ul><li>Specialized query language for multi-dimensional data structures </li></ul></ul><ul><li>Data mining </li></ul><ul><ul><li>The process of drilling down into the underlying details of a cube using MDX queries </li></ul></ul>
  7. 7. Cube Aggregation <ul><li>Cubes contain group-bys of all combinations of the included attributes. </li></ul>
  8. 8. Cube Glossary <ul><li>Dimensions </li></ul><ul><ul><li>A set of attributes that roughly correspond to RDBMS fields. A dimension is subdivided into levels. </li></ul></ul><ul><li>Levels </li></ul><ul><ul><li>A subdivision of a dimension. </li></ul></ul><ul><li>Measures </li></ul><ul><ul><li>The actual data value, typically numeric. </li></ul></ul>
  9. 9. Demo: Connect to an OLAP Data Source from MS Excel XP
  10. 10. OWC10 PivotTable
  11. 11. Demo: Web-Based OLAP Report <ul><li>Connect to an OLAP data source </li></ul><ul><li>Create a new report using drag-drop </li></ul><ul><li>Load an existing report from XML </li></ul><ul><li>Save a report to XML </li></ul>
  12. 12. OLAP Report Architecture
  13. 13. PivotTable Interaction with an OLAP Data Source
  14. 14. Configure the OLAP Data Source for HTTP Access <ul><li>Step 1: Install IIS on the database server where Analysis Services resides. </li></ul><ul><li>Step 2: Create a new Web site on the database server. Copy msolap.asp into this directory. </li></ul><ul><ul><li>Location of msolap </li></ul></ul><ul><li>Step 3: Assign an external domain name to the new Web site. </li></ul><ul><li>Step 4: Install an SSL certificate on the server, linked to the new Web site. </li></ul><ul><li>Step 5: Configure security credentials </li></ul><ul><li>Provider=MSOLAP.2;Data Source=http://localhost/msolap;Initial Catalog=Foodmart 2000;User ID=OLAPID;Password=test; </li></ul>
  15. 15. Security Considerations <ul><li>You must enforce security credentials for an OLAP data source that is available over HTTP. </li></ul><ul><li>Analysis Services will assign a Cube role to a specific cube. This role restricts overall access to the cube and/or access to specific dimensions in the cube. </li></ul><ul><li>Create a security role as follows: </li></ul><ul><ul><li>Create an NT User role </li></ul></ul><ul><ul><li>In SQL Server, create a Database role that maps to the NT User role </li></ul></ul><ul><ul><li>In Analysis Services, create a Cube role that maps to the Database role </li></ul></ul><ul><ul><li>For more information, consult “Creating Security Roles” in the Analysis Services help file at: http://msdn.microsoft.com/library/en-us/olapdmad/agsecurityroles_0t2r.asp?frame=true </li></ul></ul><ul><li>Once the role has been created, add the NT User role credentials to the OLE DB connection string for the OLAP data source. HTTP requests to the OLAP data source will be authenticated using these credentials. </li></ul>
  16. 16. Office XP Web Components <ul><li>PivotTable Component </li></ul><ul><ul><li>Connects to any OLAP data source that supports the Microsoft OLE DB Provider for OLAP Services 8.0 and higher. </li></ul></ul><ul><ul><li>Connects to any data source with an OLE DB provider, including MS SQL Server, MS Analysis Services, MS Access, and MS Excel. </li></ul></ul><ul><ul><li>Allows users to analyze data by pivoting, grouping, filtering, and sorting. </li></ul></ul><ul><li>Spreadsheet Component </li></ul><ul><ul><li>Provides an Excel-like spreadsheet user interface, including a recalculation engine and an extensive function library. </li></ul></ul><ul><li>Chart Component </li></ul><ul><ul><li>Graphically displays data from a bound Data Source, PivotTable or Spreadsheet control. Refreshes automatically when data re-pivots. </li></ul></ul><ul><li>Data Source Component </li></ul><ul><ul><li>Manages interactive communication with the data source. </li></ul></ul>
  17. 17. Benefits of OWC <ul><li>Provides users with interactive access to data, from a variety of OLE DB-accessible data sources. </li></ul><ul><li>OWC provides a familiar Microsoft Office user interface, and a rich subset of Office functionality. </li></ul><ul><li>OWC is flexible: </li></ul><ul><ul><li>The components may be used interactively, with their visible interfaces. </li></ul></ul><ul><ul><li>The components may be used programmatically, with their APIs. </li></ul></ul>
  18. 18. Using OWC <ul><li>They are COM components that provide both a visible interface and an API. </li></ul><ul><li>They are designed for use as both client-side and server-side components. </li></ul><ul><li>OWC can be hosted as ActiveX controls inside a Web browser: </li></ul><ul><ul><li>They provide a visible interface. </li></ul></ul><ul><ul><li>They provide a scripting interface for any Windows scripting language, incl. JavaScript and VBScript. </li></ul></ul><ul><li>OWC can be hosted on a standard Windows form, providing a visible interface. </li></ul><ul><li>OWC can be instanced in server-side code for access to the base services, without having to use the visible interface. </li></ul>
  19. 19. OWC 9 vs. OWC 10 <ul><li>The OWC components were dramatically improved between versions 9 and 10. </li></ul><ul><ul><li>PivotTable: more filtering and grouping options, plus calculated fields and support for custom MDX queries. </li></ul></ul><ul><ul><li>Spreadsheet: Improved calculation engine and tighter integration with MS Excel 2002, incl. Support of a common XML spreadsheet format. </li></ul></ul><ul><ul><li>Chart: Expanded charting options and improved integration with the PivotTable component. </li></ul></ul><ul><li>OWC 9 (msowc.dll) and OWC 10 (owc10.dll) support side-by-side usage </li></ul><ul><li>Clients must have a valid Office XP license for interactive access to OWC 10 </li></ul><ul><li>Clients without a license have restricted access to ‘View Only’ mode </li></ul>
  20. 20. PivotTable Features <ul><li>Used for data reporting and data analysis solutions incl. summary and cross-tabulation of raw, multi-dimensional data sets. </li></ul><ul><li>Filtering </li></ul><ul><li>Grouping (Ad-hoc and Interval) </li></ul><ul><li>Calculated Totals </li></ul><ul><li>Custom MDX </li></ul><ul><li>Custom Sorting </li></ul><ul><li>Drillthrough of hierarchical data </li></ul><ul><li>Export to Excel </li></ul><ul><li>Member Properties </li></ul>
  21. 21. PivotTable List Object Model <ul><li>View the OWC API documentation at: C:Program FilesCommon FilesMicrosoft SharedWeb Components101033OWCVBA10.CHM </li></ul>
  22. 22. PivotTable List API Overview Represents a specific view of a PivotTable list. PivotView Represents a total in a PivotTable list. A total is the aggregate value that is displayed for the contents of a given cell. PivotTotal Represents a set of fields that together form a hierarchy. PivotFieldSet Represents the data in Column, Row, Data, Filter and Group axes. PivotResult*Axis Represents the data in a PivotTable list. PivotData Represents the container for the PivotTable list. PivotTable
  23. 23. PivotTable API XML data for the current PivotTable report, including connection information, data and formatting. XMLData Returns the PivotView object that represents the current view of the PivotTable. ActiveView The DataMember name, equivalent to the OLAP cube name. DataMember The OLE DB connection string. ConnectionString
  24. 24. PivotView API Adds a custom fieldset to the PivotView. AddFieldSet Represents a filter field in the PivotTable. FilterAxis A collection of PivotTotal objects. Totals A collection of PivotFieldSet objects. Fieldsets are added using the PivotAxis InsertFieldSet method. FieldSets Represents a data field in the PivotTable. DataAxis Represents a row in the PivotTable. RowAxis Represents a column in the PivotTable. ColumnAxis
  25. 25. PivotFieldSet API Adds a custom group field to the PivotFieldSet. AddCustomGroup Adds a calculated field to the PivotFieldSet. Must first create the custom field using PivotView.AddFieldSet. Then add the calculated field and update the fieldset in the PivotTable using DataAxis.InsertFieldSet. AddCalculatedField Enumeration for the inclusion state of all members not listed in a specific field’s IncludedMembers or ExcludedMembers list. AllIncludeExclude A collection of PivotField objects Fields
  26. 26. PivotField API The PivotTotal to sort on. SortOn An array of field members to exclude from the view. ExcludedMembers An array of field members to include in the view. IncludedMembers The sort direction. SortDirection The PivotTotal to filter on. FilterOn The value to filter by. FilterFunctionValue Enumeration for filter type. FilterFunction
  27. 27. PivotTable Events Occurs whenever the user makes a new selection. SelectionChange Occurs whenever the user clicks the PivotTable control. Click Occurs whenever the PivotTable is redrawn. Provides a PivotViewReasonEnum to explain why the redraw occurred. ViewChange Occurs whenever a PivotTable list query becomes necessary. Query Occurs whenever a PivotTable list field, field set, or total is added or deleted. PivotTableChange Occurs whenever the PivotTable list connects to a data source. OnConnect
  28. 28. Demo: Web-Based OLAP Report Step Through Code <ul><li>Connect to an OLAP data source </li></ul><ul><li>Create a new report using drag-drop </li></ul><ul><li>Load an existing report from XML </li></ul><ul><li>Save a report to XML </li></ul>
  29. 29. Client Requirements <ul><li>Clients must meet the following requirements to use the OWC PivotTable interactively in their browser: </li></ul><ul><ul><li>Install Pivot Table Services (PTS) </li></ul></ul><ul><ul><ul><li>OLE DB Provider 8.0 </li></ul></ul></ul><ul><ul><ul><li>MDAC </li></ul></ul></ul><ul><ul><ul><li>Note: Analysis Services SP3 contains the latest version of PTS. Do not use an earlier version. </li></ul></ul></ul><ul><ul><li>Have a licensed copy of Office XP, or, an enterprise license agreement file </li></ul></ul><ul><ul><li>Be running IE 5.0 or greater </li></ul></ul><ul><ul><ul><li>Note, technically you only need IE 4.01, but the Trusted Sites dialog is not available until IE 5.0 </li></ul></ul></ul><ul><ul><li>Set up Trusted Sites to include the domain for the OLAP data source (to enable cross-domain access) </li></ul></ul>
  30. 30. Further Information <ul><li>Analysis Services Overview: </li></ul><ul><ul><li>MSDN Library > SQL Server 2000 > SDK Documentation > Analysis Services </li></ul></ul><ul><li>KB Article 279489: How to Connect to Analysis Server 2000 by Using HTTP Connection </li></ul><ul><li>Microsoft Office Solutions Articles: Pivoting Tables, Parts I and II by David Stearns </li></ul><ul><ul><li>Office Solutions Development > Microsoft Office > Microsoft Office (General) > Periodicals > Microsoft Office Solutions 2002 </li></ul></ul><ul><li>Introduction to Multidimensional Expressions (MDX) </li></ul><ul><ul><li>MSDN Library > Data Access > OLAP Services </li></ul></ul><ul><li>Newsgroup: </li></ul><ul><ul><li>microsoft.public.office.developer.web.components </li></ul></ul>
  31. 31. Read My New Book! <ul><li>Performance Tuning and Optimizing ASP.NET Applications </li></ul><ul><li>Apress, March 2003 (ISBN: 1590590724) </li></ul><ul><li>http://www.asptechnology.net </li></ul>

×