Back to Devexpress

DashboardOlapDataSource Class

dashboard-devexpress-dot-dashboardcommon-a45a5956.md

latest4.5 KB
Original Source

DashboardOlapDataSource Class

An OLAP data source that provides data for the dashboard.

Namespace : DevExpress.DashboardCommon

Assembly : DevExpress.Dashboard.v25.2.Core.dll

NuGet Package : DevExpress.Dashboard.Core

Declaration

csharp
public class DashboardOlapDataSource :
    IDisposable,
    IDashboardDataSource,
    IDashboardComponent,
    IComponent,
    ISupportInitialize,
    ISupportPrefix,
    IDashboardDataSourceInternal,
    IDataComponent,
    IDataConnectionParametersService,
    ISensitiveInfoContainer
vb
Public Class DashboardOlapDataSource
    Implements IDisposable,
               IDashboardDataSource,
               IDashboardComponent,
               IComponent,
               ISupportInitialize,
               ISupportPrefix,
               IDashboardDataSourceInternal,
               IDataComponent,
               IDataConnectionParametersService,
               ISensitiveInfoContainer

Remarks

To create a data source that uses a connection to an OLAP cube, create the instance of the DashboardOlapDataSource class and perform the following steps.

  1. Create the OlapConnectionParameters class object and specify the DashboardOlapDataSource.ConnectionString property.

  2. Add the created DashboardOlapDataSource object to the Dashboard.DataSources collection.

For .NET Dashboard, OLAP mode supports the following data providers:

Use the DashboardOlapDataSource.OlapDataProvider static property to specify the data provider.

Example

The following code snippets show how to bind a dashboard to an OLAP cube using DashboardOlapDataSource.

The `DashboardOlapDataSource`` allows you to establish a connection to the OLAP cube by specifying a connection string.

vb
Dim olapParams As New OlapConnectionParameters()
olapParams.ConnectionString = "provider=MSOLAP;" _
                    & ControlChars.CrLf & _
                    "data source=http://demos.devexpress.com/Services/OLAP/msmdpump.dll;" _
                    & ControlChars.CrLf & _
                    "initial catalog=Adventure Works DW Standard Edition;" _
                    & ControlChars.CrLf & _
                    "cube name=Adventure Works;"

Dim olapDataSource As New DashboardOlapDataSource(olapParams)
olapDataSource.Fill()

dashboardDesigner1.Dashboard.DataSources.Add(olapDataSource)
csharp
OlapConnectionParameters olapParams = new OlapConnectionParameters();
olapParams.ConnectionString = @"provider=MSOLAP;
                      data source=http://demos.devexpress.com/Services/OLAP/msmdpump.dll;
                      initial catalog=Adventure Works DW Standard Edition;
                      cube name=Adventure Works;";

DashboardOlapDataSource olapDataSource = new DashboardOlapDataSource(olapParams);
olapDataSource.Fill();

dashboardDesigner1.Dashboard.DataSources.Add(olapDataSource);

Implements

IDashboardDataSource

IDataComponent

Inheritance

Object DashboardOlapDataSource

See Also

DashboardOlapDataSource Members

OLAP Mode Limitations

DevExpress.DashboardCommon Namespace