[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
 [Expand]What's Installed
 [Expand].NET Core 3 Support
 [Expand]Common Concepts
 [Expand]MVVM Framework
 [Collapse]Controls and Libraries
  [Expand]Data Grid
  [Expand]Ribbon, Bars and Menu
  [Expand]Charts Suite
  [Collapse]Pivot Grid
   [Expand]Getting Started
   [Expand]Binding to Data
   [Expand]Data Shaping
   [Expand]Data Analysis
   [Expand]Printing and Exporting
   [Expand]End-User Interaction
   [Expand]MVVM Enhancements
   [Expand]UI Elements
   [Expand]End-User Capabilities
    [Collapse]Providing Data
      How to: Bind a PivotGrid to a Database
      How to: Bind a PivotGrid to a Database in Code
      How to: Bind a Pivot Grid to an OLAP Datasource
      How to: Bind a PivotGrid to an OLAP Cube with the OLE DB Data Provider
      How to: Bind a PivotGrid to an OLAP Cube with the ADOMD.NET Data Provider
      How to: Bind a PivotGrid to an OLAP Cube with XMLA
      How to: Display Unbound Data in a PivotGrid Control
      How to: Save the PivotGridControl Data to a File for Later Use
      How to: Bind the Pivot Grid to Fields and Groups specified in ViewModel
    [Expand]Drill-Down (Underlying Data)
    [Expand]Context Menu
    [Expand]Layout Features
  [Expand]Rich Text Editor
  [Expand]Tree List
  [Expand]Gauge Controls
  [Expand]Map Control
  [Expand]Layout Management
  [Expand]Windows Modern UI
  [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
  Redistribution and Deployment
  Get More Help
 [Expand]API Reference
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Office File API
[Expand]Report and Dashboard Server
[Expand]eXpressApp Framework
[Expand]eXpress Persistent Objects
[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?​​​​​​​