IAdhocDimSyncItem.IsGeneral

Fore Syntax

IsGeneral: Boolean;

Fore.NET Syntax

IsGeneral: boolean;

Description

The IsGeneral property determines whether a synchronized dimension is a main one.

Comments

Available values:

Fore Example

Executing the example requires that the repository contains a dashboard with the ADHOC_SYNCDEM identifier. This dashboard should contain several synchronized dimensions.

Add links to the Adhoc, Metabase system assemblies.

Sub UserProc;
Var
    mb: IMetabase;
    Adhoc: IAdhocReport;
    DimsSync: IAdhocDimsSynchronization;
    i, j: Integer;
    Index: IAdhocDimSyncIndex;
    Item: IAdhocDimSyncItem;
Begin
    // Get current repository
    mb := MetabaseClass.Active;
    // Get dashboard
    Adhoc := mb.ItemById("ADHOC_SYNCDEM").Edit As IAdhocReport;
    // Get synchronized dimensions
    DimsSync := Adhoc.Synchronization.Dimensions;
    // Execute iterations by all synchronization indexes
    // and specify that the last dimension in each index is main one
    For i := 0 To DimsSync.Count - 1 Do
        Index := DimsSync.Item(i);
        For j := 0 To Index.Dimensions.Count - 1 Do
            Item := Index.Dimensions.Item(j);
            Item.IsGeneral := False;
        End For;
        Index.GeneralDimSyncItem := Item;
    End For;
    // Save changes
    (Adhoc As IMetabaseObject).Save;
End Sub UserProc;

After executing the example main dimensions are set for each synchronization index in the dashboard.

Fore.NET Example

The requirements and result of the Fore.NET example execution match with those in the Fore example.

Imports Prognoz.Platform.Interop.Adhoc;

    Public Shared Sub Main(Params: StartParams);
    Var
    mb: IMetabase;
    Adhoc: IAdhocReport;
    DimsSync: IAdhocDimsSynchronization;
    i, j: Integer;
    Index: IAdhocDimSyncIndex;
    Item: IAdhocDimSyncItem;
Begin
    // Get current repository
    mb := Params.Metabase;
    // Get dashboard
    Adhoc := mb.ItemById["ADHOC_SYNCDEM"].Edit () As IAdhocReport;
    // Get synchronized dimensions
    DimsSync := Adhoc.Synchronization.Dimensions;
    // Execute iterations by all synchronization indexes
    // and specify that the last dimension in each index is the main one
    For i := 0 To DimsSync.Count - 1 Do
        Index := DimsSync.Item[i];
        For j := 0 To Index.Dimensions.Count - 1 Do
            Item := Index.Dimensions.Item[j];
            Item.IsGeneral := False;
        End For;
        Index.GeneralDimSyncItem := Item;
    End For;
    // Save changes
    (Adhoc As IMetabaseObject).Save();
End Sub;

See also:

IAdhocDimSyncItem