Skip to main content

PivotGridControl.SetOlapConnectionStringAsync(String) Method

Sets a connection string to a cube in an MS Analysis Services database, and loads data from the cube asynchronously.

Namespace: DevExpress.Xpf.PivotGrid

Assembly: DevExpress.Xpf.PivotGrid.v14.2.dll

#Declaration

public void SetOlapConnectionStringAsync(
    string olapConnectionString
)

#Parameters

Name Type Description
olapConnectionString String

A String that specifies the connection string to an OLAP cube.

#Remarks

The SetOlapConnectionStringAsync method is asynchronous. It starts executing the related operation in a background thread, and immediately returns control. The primary UI thread is not blocked, allowing the application to continue responding to end-user actions. For more information about the asynchronous mode, see Asynchronous Mode.

If you need to perform specific actions after data is loaded or just need a notification when this happens, use another overload of the SetOlapConnectionStringAsync method that takes the asyncCompleted parameter, and pass a delegate that performs the required actions as this parameter.

To specify a connection string in XAML, use the PivotGridControl.OlapConnectionString property.

A sample connection string is shown below:

Data Source=http://demos.devexpress.com/Services/OLAP/msmdpump.dll;Initial Catalog=Adventure Works DW Standard Edition;Cube Name=Adventure Works;Query Timeout=100;

The connection string has the following parameters:

  • Data Source - the path to the data pump.
  • Initial Catalog - a data catalog that contains cubes.
  • Cube Name - the name of a cube that provides OLAP data.
  • Query Timeout (optional) - the number of seconds to wait until the query to SSAS is completed. If this parameter is set to 0, each query can last for an indefinite time.
See Also