Back to Devexpress

OlapDataConnection Class

dashboard-devexpress-dot-dashboardcommon-bf65917f.md

latest3.3 KB
Original Source

OlapDataConnection Class

Represents a connection to a cube in an MS Analysis Services database.

Namespace : DevExpress.DashboardCommon

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

NuGet Package : DevExpress.Dashboard.Core

Declaration

csharp
public class OlapDataConnection :
    DataConnectionBase,
    IDataConnection
vb
Public Class OlapDataConnection
    Inherits DataConnectionBase
    Implements IDataConnection

The following members return OlapDataConnection objects:

Remarks

The following code snippet shows how to create a data source that allows you to supply a dashboard with data from the OLAP cube.

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

IDataConnection

Inheritance

Object DataConnectionBase OlapDataConnection

See Also

OlapDataConnection Members

DevExpress.DashboardCommon Namespace