Skip to main content

How to: Bind a PivotGrid to an OLAP Cube with XMLA

The following example demonstrates how to bind a PivotGridControl to an OLAP cube via the XMLA data access standard.

In this example, the PivotGridControl.OlapDataProvider property is used to specify that PivotGridControl should use the XMLA data access standard 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 data pump.
  • Initial Catalog - a data catalog that contains cubes.
  • Cube Name - the name of the cube that provides OLAP data.

View Example

<Window xmlns:dxpg="" 
        Title="MainWindow" Height="300" Width="640">
        <dxpg:PivotGridControl x:Name="pivotGridControl1" OlapDataProvider="Xmla">
                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" />