Version

Using XMLA

Topic Overview

Purpose

This topic explains and demonstrates the WinPivotGrid™ data binding to XMLA data Source/Provider.

Application Requirements

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 .

In this topic

This topic contains the following sections:

Using XMLA

Preview

The following screenshot is the preview of the result from XMLA data binding example in this topic:

Using XMLA 1.png

Requirements

To complete the procedure you need the following:

Requirement category Requirement listing

Assemblies

Infragistics.Olap.Core.v23.2

Infragistics.Olap.DataSource.v23.2

Infragistics.Olap.DataSource.Xmla.v23.2

Infragistics.Olap.DataSource.Mdx.v23.2

Infragistics.Shared.v23.2

Infragistics.Win.UltraWinPivotGrid.v23.2

Infragistics.Win.v23.2

Using/Imports

Add the following Using/Imports statement in your application form:

Infragistics.Olap.Xmla

XMLA settings

XMLA settings require the following configuration including the dimensions (rows, columns and measures) of the cube. The binding code example below contains these settings.

Parameter Description

ServerUrl

Specifies the server instance ( Required ).

ServerUrl = "http://sampledata.infragistics.com/olap`/msmdpump.dll"`

catalog

Specifies the name of the Analysis Services database ( Required ).

Catalog = "Adventure Works DW Standard Edition"

cube

Cube name ( Required ).

Cube = "Adventure Works"

Rows

Rows dimensions.

Rows = "[Date].[Calendar]"

Columns

Column dimensions.

Columns = "[Product].[Category] "

Measures

Measures dimensions.

Measures = "[Measures].[Reseller Sales Amount]"

Code

Used to access any standard multidimensional data source residing on the web; XMLA is the native protocol for Microsoft SQL Server Analysis Services.

Note
Note:

This topic uses Infragistics sample data for demonstration purposes.

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

Adding MdxDataSelector

Overview

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.

Note
Note:

If the data selector is not present at runtime, you will not be able to add the dimensions. You can only remove them from 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.

Adding MdxDataSelector 1.png

Related Content

Topics

The following topics provide additional information related to this topic.

Topic Purpose

This section contains topics covering the WinPivotGrid™ control for Infragistics® Windows Forms®.

This topic explains and demonstrates the WinPivotGrid™ data binding to ADOMD data Source/Provider.

This topic explains how to use the FlatDataSource class for displaying IEnumerable data in the WinPivotGrid™.

This section lists common terms used in pivot grid topics.