A cube is a multidimensional structure defined by its measures and dimensions. You can think of a measure as a data field in PivotGridControl, while a dimension can be represented by a column field or a row field. This tutorial will help you learn how to bind a pivot grid to an existing OLAP (OnLine Analytical Processing) cube. In this example, we will use the Adventure Works cube.
Specifies either the name of a server that runs an instance of Microsoft SQL Server Analysis Services (SSAS), the path to a cube file or the path to a data pump.
Adventure Works DW Standard Edition
Specifies a data catalog that contains cubes.
Specifies the name of a cube that provides OLAP data.
The image below demonstrates configured settings of the OLAP connection. Click Finish to close the wizard.
Click the pivot grid's smart tag and use the Add Data Area Field menu item to add a new field to the Data Header Area. In a similar manner, add two fields both to the Column Header and Row Header areas.
To associate created fields with OLAP measures/dimensions, click the field's smart tag icon. In the invoked menu, click the FieldName property ellipsis button to see existing data source fields.
Select the following measures and dimensions for created fields.
For the data field, select the [Measures].[Internet Sales Amount] measure.
For the column fields, select the [Date].[Fiscal].[Fiscal Year] and [Date].[Fiscal].[Fiscal Quarter] dimensions.
For the row fields, select the [Customer].[Country].[Country] and [Customer].[City].[City] dimensions.
After this, your XAML should look like the following. If it does not, you can overwrite your code with: