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.v20.1.dll
NuGet Package: DevExpress.Win.PivotGrid
Declaration
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 this operation is completed, 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 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.