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.2.dll
Declaration
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 |
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.