DataSourceKey: Integer;
DataSourceKey: Integer;
The DataSourceKey property determines the DS_KEY parameter value in binding string.
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.
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.
The requirements and result of the Fore.NET example execution match with those in the Fore example.
Imports Prognoz.Platform.Interop.ForeSystem;
Function CreateDimComboBidningForDataSource(DataSource: IPrxDataSource; DimensionId: String): String;
Var
BM: BindingManager = New BindingManagerClass();
Point: IPrxCalculatedPoint;
DimComboBinding: IBindingDimCombo;
Begin
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.semodSingleSelect;
Return DimComboBinding.AsString;
Else
Return "";
End If;
End Function;
See also: