Skip to main content

How to: Bind a PivotGrid to an OLAP Cube with the ADOMD.NET Data Provider

The following example demonstrates how to bind PivotGridControl to an OLAP cube via the ADOMD.NET data provider.

In this example, the PivotGridControl.OlapDataProvider property is used to specify that PivotGridControl should use the ADOMD.NET data provider to access an OLAP cube. OLAP connection parameters are specified in a connection string passed to the PivotGridControl.OlapConnectionString property. The following parameters are provided:

  • Data Source - a path to a local cube file that will serve as a datasource.
  • Initial Catalog - a data catalog that contains cubes.
  • Cube Name - the name of the cube that provides OLAP data.

View Example

<Window xmlns:dxpg=""
        Height="400" Width="400"
        Title="Main Window">
        <dxpg:PivotGridControl Name="pivotGridControl1" OlapDataProvider="Adomd">
                Data Source=;
                Initial Catalog=Adventure Works DW Standard Edition;
                Cube Name=Adventure Works;
                <dxpg:PivotGridField FieldName="[Measures].[Internet Sales Amount]" 
                                     Caption="Sales Amount" Area="DataArea"/>
                <dxpg:PivotGridField FieldName="[Customer].[Country].[Country]"
                                     Caption="Country" Area="RowArea"/>
                <dxpg:PivotGridField FieldName="[Date].[Fiscal].[Fiscal Year]"
                                     Caption="Fiscal Year" Area="ColumnArea"/>