IBindingDimCombo.DataSourceKeyDefined

DataSourceKeyDefined: Boolean;

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.

Fore 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, Tab, ForeSystem (for the Fore.NET example) 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 style of the first cell in upper left corner of report
    Tab := (Report.ActiveSheet As IPrxTable).TabSheet;
    
//Style := Tab.Cell(0, 0).Style;
    Style := Tab.Cell(100).Style;
    SourceBinding := Style.Binding;
    
// Display values of connection string parameters in the console
    BM := New BindingManager.Create;
    Binding := BM.CreateByValue(SourceBinding);
    
If Binding.UI = "DimCombo" Then
        DimComboBinding := Binding 
As IBindingDimCombo;
        
//Check if there is the GROUP parameter
        If DimComboBinding.GroupDefined Then
            Debug.WriteLine(
"GROUP: " + DimComboBinding.Group);
        
End If;
        
//Check if there is the SCHEMA parameter
        If DimComboBinding.SchemaDefined Then
            Debug.WriteLine(
"SCHEMA: " + DimComboBinding.Schema);
        
End If;
        
//Check if there is the CUSTOMMULTISELECTTEXT parameter
        If DimComboBinding.CustomMultiselectTextDefined Then
            Debug.WriteLine(
"CUSTOMMULTISELECTTEXT: " + DimComboBinding.CustomMultiselectText);
        
End If;
        
//Check if there is the LEVELATTR parameter
        If DimComboBinding.LevelAttributeDefined Then
            Debug.WriteLine(
"LEVELATTR: " + DimComboBinding.LevelAttribute);
        
End If;
        
//Check if there is the ID parameter
        If DimComboBinding.ObjectDefined Then
            Debug.WriteLine(
"ID: " + DimComboBinding.Object);
        
End If;
        
//Check if there is the RDS parameter
        If DimComboBinding.RdsDefined Then
            Debug.WriteLine(
"RDS: " + DimComboBinding.Rds);
        
End If;
        
//Check if there is the SELECTIONMODE parameter
        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 there is the ATTRIBUTEVALUE parameter
        If DimComboBinding.ValueAttributeDefined Then
            Debug.WriteLine(
"ATTRIBUTEVALUE: " + DimComboBinding.ValueAttribute);
        
End If;
        
//Check if there is the DS_KEY parameter
        If DimComboBinding.DataSourceKeyDefined Then
            Debug.WriteLine(
"DS_KEY: " + DimComboBinding.DataSourceKey.ToString);
        
End If;
        
//Check if there is the PT_KEY parameter
        If DimComboBinding.PointKeyDefined Then
            Debug.WriteLine(
"PT_KEY: " + DimComboBinding.PointKey.ToString);
        
End If;
        
//Check if there is the DIM_KEY parameter
        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;
    
End If;
End Sub UserProc;

Imports Prognoz.Platform.Interop.Metabase;
Imports Prognoz.Platform.Interop.Report;
Imports Prognoz.Platform.Interop.Tab;
Imports Prognoz.Platform.Interop.ForeSystem;

Public Shared Sub Main(Params: StartParams);
Var
    MB: IMetabase;
    Report: IPrxReport;
    Tab: ITabSheet;
    Style: ITabCellStyle;
    BM: BindingManager = 
New BindingManagerClass();
    Binding: IBindingValue;
    DimComboBinding: IBindingDimCombo;
    SourceBinding: String;
Begin
    
// Get the current repository
    MB := Params.Metabase;
    
// Get regular report
    Report := MB.ItemById["REPORT"].Edit() As IPrxReport;
    
// Get style of the first cell in upper left corner of report
    Tab := (Report.ActiveSheet As IPrxTable).TabSheet;
    Style := Tab.Cell[
00].Style;
    SourceBinding := Style.Binding;
    
// Display values of connection string parameters in the console
    Binding := BM.CreateByValue(SourceBinding);
    
If Binding.UI = "DimCombo" Then
        DimComboBinding := Binding 
As IBindingDimCombo;
        
//Check if there is the GROUP parameter
        If DimComboBinding.GroupDefined Then
            System.Diagnostics.Debug.WriteLine(
"GROUP: " + DimComboBinding.Group);
        
End If;
        
//Check if there is the SCHEMA parameter
        If DimComboBinding.SchemaDefined Then
            System.Diagnostics.Debug.WriteLine(
"SCHEMA: " + DimComboBinding.Schema);
        
End If;
        
//Check if there is the CUSTOMMULTISELECTTEXT parameter
        If DimComboBinding.CustomMultiselectTextDefined Then
            System.Diagnostics.Debug.WriteLine(
"CUSTOMMULTISELECTTEXT: " + DimComboBinding.CustomMultiselectText);
        
End If;
        
//Check if there is the LEVELATTR parameter
        If DimComboBinding.LevelAttributeDefined Then
            System.Diagnostics.Debug.WriteLine(
"LEVELATTR: " + DimComboBinding.LevelAttribute);
        
End If;
        
//Check if there is the ID parameter
        If DimComboBinding.ObjectDefined Then
            System.Diagnostics.Debug.WriteLine(
"ID: " + DimComboBinding.Object);
        
End If;
        
//Check if there is the RDS parameter
        If DimComboBinding.RdsDefined Then
            System.Diagnostics.Debug.WriteLine(
"RDS: " + DimComboBinding.Rds);
        
End If;
        
//Check if there is the SELECTIONMODE parameter
        If DimComboBinding.SelectionModeDefined Then
            System.Diagnostics.Debug.WriteLine(
"SELECTIONMODE: " + DimComboBinding.SelectionMode.ToString());
        
End If;
        
//Check if there is the VALUE parameter
        If DimComboBinding.ValueDefined Then
            System.Diagnostics.Debug.WriteLine(
"VALUE: " + DimComboBinding.Value);
        
End If;
        
//Check if there is the ATTRIBUTEVALUE parameter
        If DimComboBinding.ValueAttributeDefined Then
            System.Diagnostics.Debug.WriteLine(
"ATTRIBUTEVALUE: " + DimComboBinding.ValueAttribute);
        
End If;
        
//Check if there is the DS_KEY parameter
        If DimComboBinding.DataSourceKeyDefined Then
           System.Diagnostics.Debug.WriteLine(
"DS_KEY: " + DimComboBinding.DataSourceKey.ToString());
        
End If;
        
//Check if there is the PT_KEY parameter
        If DimComboBinding.PointKeyDefined Then
            System.Diagnostics.Debug.WriteLine(
"PT_KEY: " + DimComboBinding.PointKey.ToString());
        
End If;
        
//Check if there is the DIM_KEY parameter
        If DimComboBinding.DimensionKeyDefined Then
            System.Diagnostics.Debug.WriteLine(
"DIM_KEY: " + DimComboBinding.DimensionKey.ToString());
        
End If;
        
//Check if there is the SORTDIRECTION parameter
        If DimComboBinding.SortDirectionDefined Then
            System.Diagnostics.Debug.WriteLine(
"SORTDIRECTION: " + DimComboBinding.SortDirection.ToString());
        
End If;
    
End If;
End Sub;

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

See also:

IBindingDimCombo