IBindingDimCombo.DataSourceKeyDefined

DataSourceKeyDefined: Boolean;

Description

The DataSourceKeyDefined property determines whether there is the DS_KEY parameter.

Comments

If the DataSourceKeyDefined property is set to True, the binding string describing the value editor contains the DS_KEY parameter. The value of this parameter is determined by the IBindingDimCombo.DataSourceKey property.

Example

Executing the example requires that the repository contains a regular report with REPORT identifier. The first report cell should display a dictionary drop-down list.

Add links to the Metabase, Report and Tab system assemblies.

Sub UserProc;
Var
    MB: IMetabase;
    Report: IPrxReport;
    Tab: ITabSheet;
    Style: ITabCellStyle;
    BM: IBindingManager;
    Binding: IBindingValue;
    DimComboBinding: IBindingDimCombo;
    SourceBinding: String;
Begin
    // Get the current repository
    MB := MetabaseClass.Active;
    // Get regular report
    Report := MB.ItemById("REPORT").Edit As IPrxReport;
    // Get first cell style in the upper left report corner
    Tab := (Report.ActiveSheet As IPrxTable).TabSheet;
    //Style := Tab.Cell(0, 0).Style;
    Style := Tab.Cell(100).Style;
    SourceBinding := Style.Binding;
    // Display in the console values of connection string parameters
    BM := New BindingManager.Create;
    Binding := BM.CreateByValue(SourceBinding);
    If Binding.UI = "DimCombo" Then
        DimComboBinding := Binding As IBindingDimCombo;
        //Check if the GROUP parameter is present
        If DimComboBinding.GroupDefined Then
            Debug.WriteLine("GROUP: " + DimComboBinding.Group);
        End If;
        //Check if the SCHEMA parameter is present
        If DimComboBinding.SchemaDefined Then
            Debug.WriteLine("SCHEMA: " + DimComboBinding.Schema);
        End If;
        //Check if the CUSTOMMULTISELECTTEXT parameter is present
        If DimComboBinding.CustomMultiselectTextDefined Then
            Debug.WriteLine("CUSTOMMULTISELECTTEXT: " + DimComboBinding.CustomMultiselectText);
        End If;
        //Check if the LEVELATTR parameter is present
        If DimComboBinding.LevelAttributeDefined Then
            Debug.WriteLine("LEVELATTR: " + DimComboBinding.LevelAttribute);
        End If;
        //Check if the ID parameter is present
        If DimComboBinding.ObjectDefined Then
            Debug.WriteLine("ID: " + DimComboBinding.Object);
        End If;
        //Check if the SELECTIONMODE parameter is present
        If DimComboBinding.SelectionModeDefined Then
            Debug.WriteLine("SELECTIONMODE: " + DimComboBinding.SelectionMode.ToString);
        End If;
        //Check if there is the VALUE parameter
        If DimComboBinding.ValueDefined Then
            Debug.WriteLine("VALUE: " + DimComboBinding.Value);
        End If;
        //Check if the ATTRIBUTEVALUE parameter is present
        If DimComboBinding.ValueAttributeDefined Then
            Debug.WriteLine("ATTRIBUTEVALUE: " + DimComboBinding.ValueAttribute);
        End If;
        //Check if the DS_KEY parameter is present
        If DimComboBinding.DataSourceKeyDefined Then
            Debug.WriteLine("DS_KEY: " + DimComboBinding.DataSourceKey.ToString);
        End If;
        //Check if the PT_KEY parameter is present
        If DimComboBinding.PointKeyDefined Then
            Debug.WriteLine("PT_KEY: " + DimComboBinding.PointKey.ToString);
        End If;
        //Check if the DIM_KEY parameter is present
        If DimComboBinding.DimensionKeyDefined Then
            Debug.WriteLine("DIM_KEY: " + DimComboBinding.DimensionKey.ToString);
        End If;
        //Check if there is the SORTDIRECTION parameter
        If DimComboBinding.SortDirectionDefined Then
            Debug.WriteLine("SORTDIRECTION: " + DimComboBinding.SortDirection.ToString);
        End If;
        //Check if there is the DISPLAYUSERLISTATTR parameter
        If DimComboBinding.DisplayUserListAttrDefined Then
            Debug.WriteLine("DISPLAYUSERLISTATTR: " + DimComboBinding.SortDirection.ToString);
        End If;
        //Check if there is the DISPLAYUSERTEXTATTR parameter
        If DimComboBinding.DisplayUserTextAttrDefined Then
            Debug.WriteLine("DISPLAYUSERTEXTATTR: " + DimComboBinding.SortDirection.ToString);
        End If;
        //Check if there is  the STOREASSTRING parameter
        If DimComboBinding.StoreAsStringDefined Then
            Debug.WriteLine("STOREASSTRING: " + DimComboBinding.SortDirection.ToString);
        End If;
        //Check if there is the NAMESPACE parameter
        If DimComboBinding.NamespaceDefined Then
            Debug.WriteLine("NAMESPACE: " + DimComboBinding.SortDirection.ToString);
        End If;
    End If;
End Sub UserProc;

After executing the operation the console displays parameter values of binding string specified for format of the regular report first cell as a dictionary drop-down list.

See also:

IBindingDimCombo