TcxCustomPivotGridOLAPProvider.ConnectionString Property
Specifies the connection string to access OLAP cube data.
Declaration
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.