IsGeneral: Boolean;
The IsGeneral property determines whether a synchronized dimension is a main one.
Available values:
True. A dimension is the main one. Synchronization index can contain only one main dimension.
False. A dimension is not the main one.
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.
See also: