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.XtraPivotGrid

Assembly: DevExpress.XtraPivotGrid.v24.1.dll

NuGet Package: DevExpress.Win.PivotGrid

Declaration

public Task<bool> SetOLAPConnectionStringAsync(
    string olapConnectionString
)

Parameters

Name Type Description
olapConnectionString String

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

Returns

Type Description
Task<Boolean>

An asynchronous operation that returns true in case of success.

Remarks

The SetOLAPConnectionStringAsync method is asynchronous. SetOLAPConnectionStringAsync starts to execute the related operation in a background thread, and returns the Pivot Grid control. The main UI thread remains unblocked to allow the application to continue responding to user actions. Refer to the following topic for more information: Asynchronous Mode.

To load data from an OLAP cube synchronously, use the PivotGridControl.OLAPConnectionString property to specify a connection string.

A sample connection string is shown below:

OLAPConnectionString="Provider=msolap;Data Source=localhost;Initial Catalog=Adventure Works DW;Cube Name=Adventure Works;Query Timeout=100;"

The connection string has the following parameters:

  • Provider - Identifies a data provider to be used. The “msolap” string identifies the latest version of Microsoft SQL Server Analysis Services (SSAS);
  • Data Source - Specifies the name of a server that runs an instance of SSAS;
  • Initial Catalog - Specifies a data catalog that contains cubes;
  • Cube Name - Specifies the name of a cube that provides OLAP data;
  • Query Timeout (optional) - The maximum amount of time, in seconds, allowed for a query to SSAS to complete. If the parameter is set to 0, each query can last for an indefinite time.
See Also