PivotGrid - OLAP and KPIs Support

All Fields
Filter Fields
Row Fields
CategoryValues
Column Fields
Aggregate Fields
Internet Sales AmountRevenue GoalRevenue StatusRevenue Trend
Drop Filter Fields Here
Internet Sales AmountRevenue GoalRevenue StatusRevenue TrendAggregate fieldsYear
Category 
Grand Total
No records to display.
1
Page size:
  • Refresh
  • Hide
  • Show Fields Window
  • Stacked
  • Side-By-Side
  • Two-By-Two
  • One-By-Four
  • Move Up
  • Move Down
  • Move to Beginning
  • Move to End
  • Move to Filter Fields
  • Move to Row Fields
  • Move to Column Fields
  • Move to Aggregate Fields
  • Hide Field

Demo Configurator

Use the radio buttons below to set the olap data provider for the RadPivotGrid control


Isolate this demo as a stand-alone application
  • About this demo
  • C#
  • VB
RadPivotGrid supports displaying data from OLAP data sources through the XMLA or the ADOMD.NET data provider.

In order to configure the grid for binding to an OLAP data source you need the following settings:

  • OlapSettings.ProviderType – tells the pivot grid control what type of provider should be used for binding to the OLAP data source. In this case, it should be set to Xmla.
  • OlapSettings.XmlaConnectionSettings - this property is of type XmlaConnectionSettings. It is used to define all needed connection settings through the XmlaConnectionSettings properties:
    • Cube - string property defining the exact name of the Cube.
    • Database - string property defining the exact name of the Database.
    • ServerAddress - string property defining the exact address(with protocol used) of the server.
    • Credentials - this property is of type XmlaNetworkCredential and it is used to define the authentication details for the server (if it has any kind of authentication).
By analogy, should the pivot grid be bound through the ADOMD.NET provider, the olap settings should be configured as follows:
  • OlapSettings.ProviderType = “Adomd”.
  • OlapSettings.AdomdConnectionSettings - this property is of type AdomdConnectionSettings and it exposes several properties that are mandatory when connecting to the OLAP Cube:
    • Cube - string property defining the exact name of the Cube.
    • Database - string property defining the exact name of the Database.
    • ConnectionString - string property used to open a database. It is in OLE DB connection string format.
    • Credentials - this property is of type XmlaNetworkCredential and it is used to define the authentication.

The PivotGrid Hierarchical Fields List (positioned on the left of the Telerik's PivotGrid control) which reorders, sorts, hides and shows fields could be enabled by setting the RadPivotGrid.EnableConfigurationPanel property to true.

  • DefaultVB.aspx
  • DefaultVB.aspx.vb
  • styles.css
<%@ Page Language="vb" AutoEventWireup="true" CodeFile="DefaultVB.aspx.vb" Inherits="Telerik.PivotGrid.Examples.Filtering.DefaultVB" Async="true" %>

<%@ Register TagPrefix="telerik" Namespace="Telerik.QuickStart" %>
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns='http://www.w3.org/1999/xhtml'>
<head runat="server">
    <title>Telerik ASP.NET Example</title>
    <link href="styles.css" rel="stylesheet" />
</head>
<body>
    <form id="form1" runat="server">
    <telerik:RadScriptManager runat="server" ID="RadScriptManager1" />
    <telerik:RadSkinManager ID="RadSkinManager1" runat="server" ShowChooser="true" />
    <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server">
    </telerik:RadAjaxLoadingPanel>
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" DefaultLoadingPanelID="RadAjaxLoadingPanel1">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="RadPivotGrid1">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadPivotGrid1"></telerik:AjaxUpdatedControl>
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="ConfiguratorPanel1">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadPivotGrid1"></telerik:AjaxUpdatedControl>
                    <telerik:AjaxUpdatedControl ControlID="ConfiguratorPanel1"></telerik:AjaxUpdatedControl>
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>
    <div class="PivotGridWrapper">
        <telerik:RadPivotGrid RenderMode="Lightweight" AllowFiltering="true" AllowSorting="true" ID="RadPivotGrid1"
            RowTableLayout="Tabular" FieldsPopupSettings-AggregateFieldsMinCount="2" AllowPaging="true"
            PageSize="20" runat="server" EnableConfigurationPanel="true" EnableZoneContextMenu="true"
            AggregatesPosition="Rows">
            <PagerStyle AlwaysVisible="true" />
            <OlapSettings ProviderType="Xmla">
                <AdomdConnectionSettings Cube="Adventure Works" DataBase="Adventure Works DW 2008R2"
                    ConnectionString="Data Source=http://demos.telerik.com/olap/msmdpump.dll;Catalog=Adventure Works DW 2008R2"></AdomdConnectionSettings>
                <XmlaConnectionSettings ServerAddress="http://demos.telerik.com/olap/msmdpump.dll"
                    Cube="Adventure Works" DataBase="Adventure Works DW 2008R2" />
            </OlapSettings>
            <RowHeaderCellStyle Width="100px" />
            <Fields>
                <telerik:PivotGridRowField DataField="[Product].[Category]" Caption="Category" UniqueName="Category">
                </telerik:PivotGridRowField>
                <telerik:PivotGridColumnField DataField="[Date].[Fiscal Year]" Caption="Year" UniqueName="FiscalYear">
                </telerik:PivotGridColumnField>
                <telerik:PivotGridAggregateField DataField="[Measures].[Internet Sales Amount]" Caption="Internet Sales Amount"
                    UniqueName="SalesAmount">
                </telerik:PivotGridAggregateField>
                <telerik:PivotGridAggregateField DataField="[Measures].[Internet Revenue Goal]" Caption="Revenue Goal"
                    UniqueName="RevenueGoal">
                </telerik:PivotGridAggregateField>
                <telerik:PivotGridAggregateField DataField="[Measures].[Internet Revenue Status]"
                    Caption="Revenue Status" UniqueName="SalesStatus">
                </telerik:PivotGridAggregateField>
                <telerik:PivotGridAggregateField DataField="[Measures].[Internet Revenue Trend]"
                    Caption="Revenue Trend" UniqueName="SalesTrend">
                </telerik:PivotGridAggregateField>
            </Fields>
            <ConfigurationPanelSettings Position="Left" LayoutType="OneByFour" DefaultDeferedLayoutUpdate="true" />
            <ClientSettings>
                <Scrolling AllowVerticalScroll="false" ScrollHeight="600px" />
            </ClientSettings>
        </telerik:RadPivotGrid>
    </div>
    <telerik:ConfiguratorPanel runat="server" ID="ConfiguratorPanel1">
        <Views>
            <qsf:View>
                <qsf:RadioButtonList ID="rdlProviderType" runat="server" AutoPostBack="true" Label="Use the radio buttons below to set the olap data provider for the RadPivotGrid control"
                    OnSelectedIndexChanged="rdlProviderType_SelectedIndexChanged">
                    <asp:ListItem Text="Xmla" Value="Xmla" Selected="True">
                    </asp:ListItem>
                    <asp:ListItem Text="Adomd" Value="Adomd"></asp:ListItem>
                </qsf:RadioButtonList>
            </qsf:View>
        </Views>
    </telerik:ConfiguratorPanel>
    </form>
</body>
</html>

Find Assistance

Help Us Improve

Was this example helpful?