Quantcast
Channel: DevExpress Support Center (Examples)
Viewing all articles
Browse latest Browse all 7205

How to connect ASPxPivotGrid to an OLAP datasource

$
0
0
If you have a cube on the OLAP server (Microsoft Analysis Services 2000, 2005, 2008, 2008 R2, 2012 and 2014), you can view its data using the ASPxPivotGrid control. In this example, you will see how to specify connection settings to the server and create fields that represents specific measures and dimensions of the cube.

To bind the Pivot Grid control to an OLAP cube, follow the steps below.

1. Set ADOMD as a data provider using the ASPxPivotGrid.OLAPDataProvider property.
2. Specify connection settings to the server using the ASPxPivotGrid.OLAPConnectionString property. The connection string used in the example is shown below.
OlapConnectionString="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;"
3. Create fields for all the measures and dimension in the bound OLAP cube, and moves these fields to the specified area, making them hidden. To do it, use the ASPxPivotGrid.RetrieveFields method overload and set the field's visibility to false.
4. Place some of the created fields within corresponding Pivot Grid Control areas and set the visibility of the fields to true using the PivotGridFieldBase.Visible property.

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

To learn more about OLAP Datasources, see OLAP Datasources.

Viewing all articles
Browse latest Browse all 7205

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>