PivotGridControl.OLAPConnectionString Property

Specifies a connection string to a cube in an MS Analysis Services database.

Namespace: DevExpress.XtraPivotGrid

Assembly: DevExpress.XtraPivotGrid.v20.1.dll

Declaration

[DefaultValue(null)]
[PivotAPIMemberCategory(APICategory.OLAPSource)]
public string OLAPConnectionString { get; set; }
<PivotAPIMemberCategory(APICategory.OLAPSource)>
<DefaultValue(Nothing)>
Public Property OLAPConnectionString As String

Property Value

Type Default Description
String

null

A String that specifies a connection string to a cube in an MS Analysis Services database.

Remarks

To retrieve data from an OLAP cube asynchronously, use the PivotGridControl.SetOLAPConnectionStringAsync method 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 the OLE DB provider.

    IMPORTANT

    Note that the Provider parameter is in effect only for the OLE DB provider for Analysis Services specified using the PivotGridControl.OLAPDataProvider property.

  • Data Source - Specifies the name of a server that runs an instance of Microsoft SQL Server Analysis Services (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 indefinitely.

At design time, a connection string can be built via the Connection String Editor. To open it, select the Pivot Grid Control in the Properties window, focus the cell corresponding to the OLAPConnectionString property, and click the ellipsis button.

To represent information from the bound cube, create specific Pivot Grid Control fields, and bind them to the required fields in the data source. You can use the designer's Fields Page to do this.

If the OLAPConnectionString property is set to a valid string, the value of the PivotGridControl.DataSource property is cleared. Setting the PivotGridControl.DataSource property to a valid object clears the OLAPConnectionString.

See the Binding to OLAP Data Sources topic, for more details.

See Also