IBindingDimCombo.DataSourceKey

Syntax

DataSourceKey: Integer;

Description

The DataSourceKey property determines the DS_KEY parameter value in binding string.

Comments

The DS_KEY parameter determines the key of regular report data source, for which calculated points are created.

The DataSourceKey property is specified in combination with DimensionKey and PointKey properties.

The DataSourceKey property is available if the DataSourceKeyDefined property is set to True. If the DataSourceKey property is changed, the DataSourceKeyDefined property is automatically set to True.

Example

Function CreateDimComboBidningForDataSource(DataSource: IPrxDataSource; DimensionId: String): String;
Var
    BM: IBindingManager;
    Point: IPrxCalculatedPoint;
    DimComboBinding: IBindingDimCombo;
Begin
    BM := New BindingManager.Create;
    If DataSource.Points.Count <> 0 Then
        Point := DataSource.Points.Item(0);
        //Set up parameters
        DimComboBinding := BM.CreateByUi("DimCombo"As IBindingDimCombo;
        DimComboBinding.DataSourceKey := DataSource.Key;
        DimComboBinding.PointKey := Point.Key;
        DimComboBinding.DimensionKey := Point.SelectionSet.FindById(DimensionId).Dimension.Key;
        DimComboBinding.SelectionMode := SelectionModeEnum.SingleSelect;
        Return DimComboBinding.AsString;
    Else
        Return "";
    End If;
End Function CreateDimComboBidningForDataSource;

This function generates a binding string to use the value editor as a drop-down list of the dictionary. The editor is set up to the specified dimension of the first calculated point of the data source. Data source and dimension identifier are passed as input parameters.

See also:

IBindingDimCombo