This topic explains and demonstrates the WinPivotGrid™ data binding to XMLA data Source/Provider.
Start with a Windows Forms project.
Ensure that your application is created based on .Net Framework 4 , not .Net Framework 4 Client Profile that does not include System.Web.Extensions .
This topic contains the following sections:
The following screenshot is the preview of the result from XMLA data binding example in this topic:
To complete the procedure you need the following:
XMLA settings require the following configuration including the dimensions (rows, columns and measures) of the cube. The binding code example below contains these settings.
Used to access any standard multidimensional data source residing on the web; XMLA is the native protocol for Microsoft SQL Server Analysis Services.
This example uses the data from the Infragistics OLAP server.
In C#:
XmlaInitialSettings settings = new XmlaInitialSettings
{
ServerUrl = "http://sampledata.infragistics.com/olap/msmdpump.dll",
Catalog = "Adventure Works DW Standard Edition",
Cube = "Adventure Works",
Rows = "[Date].[Calendar]",
Columns = "[Product].[Category]",
Measures = "[Measures].[Reseller Sales Amount]"
};
XmlaDataSource xmlaDs = new XmlaDataSource(settings);
ultraPivotGrid1.DataSource = xmlaDs;
In Visual Basic:
Dim settings As New XmlaInitialSettings() With { _
.ServerUrl = "http://sampledata.infragistics.com/olap/msmdpump.dll", _
.Catalog = "Adventure Works DW Standard Edition", _
.Cube = "Adventure Works", _
.Rows = "[Date].[Calendar]", _
.Columns = "[Product].[Category]", _
.Measures = "[Measures].[Reseller Sales Amount]" _
}
Dim xmlaDs As New XmlaDataSource(settings)
ultraPivotGrid1.DataSource = xmlaDs
Although a separate control, the data selector ( MdxDataSelector) is an essential mechanism for the WinPivotGrid control; binding the data selector to the same data source as the pivot grid. The WinPivotGrid displays the list of dimensions and measures that the user can interact with at runtime by adding them to the pivot grid.
The following code example demonstrates binding data selector to the same data source as the pivot grid, using the data source object illustrated in the previous examples.
In C#:
mdxDataSelector1.DataSource = xmlaDs;
In Visual Basic:
mdxDataSelector1.DataSource = xmlaDs
The following screenshot illustrates the pivot grid with data selector both bound to XMLA data source. The same approach applied to ADOMD data source.
The following topics provide additional information related to this topic.