[Expand]General Information
[Expand]WinForms Controls
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Collapse]WPF Controls
  Prerequisites
 [Expand]What's Installed
 [Expand]Common Concepts
 [Expand]MVVM Framework
 [Collapse]Controls and Libraries
   Reporting
  [Expand]Data Grid
  [Expand]Ribbon, Bars and Menu
  [Expand]Charts Suite
  [Collapse]Pivot Grid
   [Expand]Getting Started
   [Expand]Fundamentals
   [Expand]Binding to Data
   [Expand]Data Shaping
   [Expand]Data Analysis
   [Expand]Layout
   [Expand]Printing and Exporting
   [Expand]End-User Interaction
   [Expand]Appearance
   [Expand]MVVM Enhancements
   [Expand]UI Elements
   [Expand]End-User Capabilities
   [Collapse]Examples
    [Collapse]Binding to Data
      How to: Bind a PivotGrid to an MS Access Database
      How to: Bind a PivotGrid to an MS Access Database Programmatically
      How to: Bind a Pivot Grid to an OLAP datasource
      How to: Bind a PivotGrid to an OLAP Cube Using the OLE DB Data Provider
      How to: Bind a PivotGrid to an OLAP Cube Using the ADOMD.NET Data Provider
      How to: Bind a PivotGrid to an OLAP Cube via XMLA
      How to: Display Unbound Data in a PivotGrid Control
      How to: Work with a PivotGrid Control Offline
      How to: Format Cell Values
      How to: Obtain Underlying Data (Drill-Down)
      How to: Bind the Pivot Grid to Fields and Groups specified in ViewModel
    [Expand]Grouping, Filtering and Summarizing
    [Expand]Appearance
    [Expand]Menu
    [Expand]Miscellaneous
  [Expand]Scheduler
  [Expand]Spreadsheet
  [Expand]Rich Text Editor
  [Expand]Tree List
  [Expand]Gauge Controls
  [Expand]Map Control
  [Expand]Layout Management
  [Expand]Windows Modern UI
  [Expand]Printing-Exporting
  [Expand]Data Editors
  [Expand]Navigation Controls
  [Expand]Spell Checker
  [Expand]Property Grid
  [Expand]PDF Viewer
  [Expand]TreeMap Control
  [Expand]Gantt Control
  [Expand]Diagram Control
  [Expand]Windows and Utility Controls
   Dialogs, Notifications and Panels
  [Expand]Scheduler (legacy)
 [Expand]Scaffolding Wizard
 [Expand]Localization
  Redistribution and Deployment
  Get More Help
 [Expand]API Reference
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Office File API
[Expand]Reporting
[Expand]Report and Dashboard Server
[Expand]Dashboard
[Expand]eXpressApp Framework
[Expand]eXpress Persistent Objects
[Expand]CodeRush
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation
View this topic on docs.devexpress.com (Learn more)

How to: Bind a Pivot Grid to an OLAP datasource

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 represent 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 move these fields to the specified area, hiding them. To do this, 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 PivotGridField.Visible property.

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

To learn more about OLAP Datasources, see OLAP Datasources.

Is this topic helpful?​​​​​​​