Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

TcxCustomPivotGridOLAPProvider.ConnectionString Property

Specifies the connection string to access OLAP cube data.

#Declaration

Delphi
property ConnectionString: string read; write;

#Property Value

Type
string

#Remarks

At design time, you can click the ellipsis button next to the property name in the Object Inspector, to invoke a standard Connection String dialog box.

The following code demonstrates how to connect to the Northwind offline cube file (the Northwind.cub file) shipped with the ExpressPivotGrid Suite. This code assumes that Developer Express VCL products are installed to the default folder (‘C:\Program Files (x86)\DevExpress VCL’).

ConnectionString := 'Provider=MSOLAP;Integrated Security=SSPI;Persist Security Info=False;Data Source= C:\Program Files (x86)\DevExpress VCL\ExpressPivotGrid\Demos\Data\Northwind.cub';

At runtime, you can call the cxPivotGridOLAPCreateConnectionString function to invoke a specially designed dialog to prompt end-users for connection settings (server name, database name, offline cube file name, etc.) The function returns a fully qualified connection string based on the specified settings, which you can assign to the ConnectionString property.

Note

Assigning the ConnectionString property automatically closes the currently active connection to an OLAP cube. In order to connect to the OLAP cube using the assigned connection string, make the connection active again.

See Also