Back to Devexpress

Connecting to OLAP Cubes

dashboard-113908-winforms-dashboard-winforms-designer-create-dashboards-in-the-winforms-designer-providing-data-olap-data-source-connecting-to-olap-cubes.md

latest4.1 KB
Original Source

Connecting to OLAP Cubes

  • Sep 24, 2025
  • 3 minutes to read

The Dashboard Designer has the capability to connect to an OLAP cube in the Microsoft Analysis Services database using the Data Source wizard or in code. You can either allow end users to manually specify connection parameters or supply a set of predefined OLAP data connections.

To connect to an OLAP cube in the Dashboard Designer, follow the steps below.

  1. Click the New Data Source button in the Data Source ribbon tab.

  2. On the first page of the invoked Data Source Wizard dialog, specify whether you want to use an existing data connection or create a new data connection.

  3. On the next page, select Olap and click Next.

  4. On the next page, choose the required Connection type. The following types are available:

Server

If you select Server , the following options are available:

  • Server name

  • UserId

  • Password

  • Catalog

  • Cube Name

Click Finish to create a data source.

Local Cube File

If you select Local cube file , specify the path to the required OLAP cube. To locate the cube, click the ellipsis button next to the Database field.

Click Finish to create a data source.

Custom Connection String

If you select Custom connection string , specify a connection string in the Custom connection string editor.

Click Finish to create a data source.

Creating a Data Source in Code

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

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

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

The following code snippet shows how to supply the dashboard with data from the Adventure Works cube deployed on the OLAP server.

csharp
using DevExpress.DashboardCommon;
using DevExpress.DataAccess.ConnectionParameters;
// ...
            OlapConnectionParameters olapParams = new OlapConnectionParameters();
            olapParams.ConnectionString = "Provider=MSOLAP;Data Source=localhost;Initial catalog=Adventure Works DW Standard Edition;Cube name=Adventure Works;Query Timeout=100";

            DashboardOlapDataSource olapDataSource = new DashboardOlapDataSource(olapParams);
            dashboard.DataSources.Add(olapDataSource);
vb
Imports DevExpress.DashboardCommon
Imports DevExpress.DataAccess.ConnectionParameters
' ...
            Dim olapParams As New OlapConnectionParameters()
            olapParams.ConnectionString = "Provider=MSOLAP;Data Source=localhost;Initial catalog=Adventure Works DW Standard Edition;Cube name=Adventure Works;Query Timeout=100"

            Dim olapDataSource As New DashboardOlapDataSource(olapParams)
            dashboard.DataSources.Add(olapDataSource)

See Also

Bind Dashboard Items to Data in OLAP Mode

How to use the user credentials (Name, Password) specified in the connection string when they are ignored