Log In
Home
Support
Demos
Documentation
Blogs
Training
Webinars
[Expand]General Information
[Collapse]WinForms Controls
  Prerequisites
 [Expand]What's Installed
 [Expand]Build an Application
 [Collapse]Controls and Libraries
  [Expand]Forms and User Controls
  [Expand]Messages, Notifications and Dialogs
  [Expand]Editors and Simple Controls
  [Expand]Ribbon, Bars and Menu
  [Expand]Application UI Manager
  [Expand]Docking Library
  [Expand]Data Grid
  [Expand]Vertical Grid
  [Collapse]Pivot Grid
   [Expand]Getting Started
   [Expand]Fundamentals
   [Expand]Binding to Data
   [Expand]Data Shaping
   [Expand]Data Analysis
   [Expand]Layout
   [Expand]Focus and Navigation
   [Expand]Printing and Exporting
   [Expand]Appearance
   [Expand]Design-time Features
   [Expand]Miscellaneous
   [Expand]UI Elements
   [Expand]End-User Capabilities
   [Collapse]Examples
    [Collapse]Providing Data
      How to: Bind a PivotGridControl to a Database
      How to: Bind a Pivot Grid to an OLAP Datasource
      How to: Bind a PivotGridControl to an OLAP Cube Using the OLE DB Data Provider
      How to: Bind a PivotGridControl to an OLAP Cube Using the ADOMD.NET Data Provider
      How to: Bind a PivotGridControl to an OLAP Cube via XMLA
      How to: Add an Unbound Field to Supply Additional Data
      How to: Add an Unbound Field to Change Axis Detailing
      How to: Provide Data for an Unbound Field Using Expressions
      How to: Save PivotGridControl Data to a File and Work with It Later
      How to: Bind a PivotGridControl to a Database at Design Time Using Server Mode
    [Expand]Data-Related Features
    [Expand]Data Editing
    [Expand]Layout Features
    [Expand]Data Formatting
    [Expand]Data Output
    [Expand]Appearance
    [Expand]Miscellaneous
   [Expand]Member Tables
  [Expand]Tree List
  [Expand]Chart Control
  [Expand]Diagrams
  [Expand]Gauges
  [Expand]Map Control
  [Expand]Scheduler
  [Expand]Spreadsheet
  [Expand]Rich Text Editor
  [Expand]Spell Checker
  [Expand]Form Layout Managers
  [Expand]Navigation Controls
  [Expand]Printing-Exporting
  [Expand]PDF Viewer
   Reporting
  [Expand]Snap
  [Expand]TreeMap Control
 [Expand]Common Features
  Get More Help
 [Expand]API Reference
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]WPF Controls
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Document Server
[Expand]Reporting
[Expand]Report Server
[Expand]Dashboard
[Expand]eXpressApp Framework
[Expand]CodeRush
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation

How to: Bind a Pivot Grid to an OLAP Datasource

Show Me

A complete sample project is available in the DevExpress Code Examples database at http://www.devexpress.com/example=T344546.

If you have a cube on the OLAP server (Microsoft Analysis Services), you can view its data using the Pivot Grid. In this example, you will see how to specify connection settings to the server and create fields that represents specific measures and dimensions of the cube.

To bind the Pivot Grid control to an OLAP cube, follow the steps below.

  • Set ADOMD as a data provider using the PivotGridControl.OLAPDataProvider property.

  • Specify connection settings to the server using the PivotGridControl.OLAPConnectionString property. The connection string used in the example is shown below.

    Provider=MSOLAP;Data Source=http://demos.devexpress.com/Services/OLAP/msmdpump.dll;Initial catalog=Adventure Works DW Standard Edition;Cube name=Adventure Works;Query Timeout=100;
  • Create fields for all the measures and dimension in the bound OLAP cube, and moves these fields to the specified area, making them hidden. To do it, use the PivotGridControl.RetrieveFields method overload and set the field's visibility to false.

  • Place some of the created fields within corresponding Pivot Grid Control areas and set the visibility of the fields to true using the PivotGridFieldBase.Visible property.

Use the invoked Customization Form to specify the Pivot Grid control's layout.

To learn more about OLAP Datasources, see OLAP Datasources.

How would you rate this topic?​​​​​​​