Type: AdhocDimensionType;
Type: Prognoz.Platform.Interop.Adhoc.AdhocDimensionType;
The Type property returns the type of synchronized dimension.
The property is read-only.
Executing the example requires a dashboard with the DASHBOARD_SELECTIONMANAGER identifier and with changes synchronization settings in repository.
Add links to the Adhoc, Metabase system assemblies.
Sub UserProc;
Var
mb: IMetabase;
adhoc: IAdhocReport;
sync: IAdhocSynchronization;
dims: IAdhocDimsSynchronization;
dimindex: IAdhocDimSyncIndex;
syncdims: IAdhocSyncDimensions;
syncitem: IAdhocDimSyncItem;
dsodim: IAdhocDsoDimension;
dimtype: AdhocDimensionType;
Begin
mb := MetabaseClass.Active;
// Get dashboard
adhoc := mb.ItemById("DASHBOARD_SELECTIONMANAGER").Edit As IAdhocReport;
// Get data about dimensions synchronization
sync := adhoc.Synchronization;
// Get collection of synchronized dimensions
dims := sync.Dimensions;
// Get index of synchronized dimension
dimindex := dims.Item(1);
// Get collection of synchronized indexes
syncdims := dimindex.Dimensions;
// Get synchronized index
syncitem := syncdims.Item(0);
// Get synchronized dimension
dsodim := syncitem.Dimension;
// Get and display the dimension type to the console
dimtype := dsodim.Type;
Debug.WriteLine("Dimension type - " + dimtype.ToString);
End Sub UserProc;
After executing the example the console displays type of the dashboard synchronized dimension.
The requirements and result of the Fore.NET example match with those in the Fore example.
Imports Prognoz.Platform.Interop.AdHoc;
…
Public Shared Sub Main(Params: StartParams);
Var
mb: IMetabase;
adhoc: IAdhocReport;
sync: IAdhocSynchronization;
dims: IAdhocDimsSynchronization;
dimindex: IAdhocDimSyncIndex;
syncdims: IAdhocSyncDimensions;
syncitem: IAdhocDimSyncItem;
dsodim: IAdhocDsoDimension;
dimtype: AdhocDimensionType;
Begin
mb := Params.Metabase;
// Get dashboard
adhoc := mb.ItemById["DASHBOARD_SELECTIONMANAGER"].Edit() As IAdhocReport;
// Get data about dimensions synchronization
sync := adhoc.Synchronization;
// Get collection of synchronized dimensions
dims := sync.Dimensions;
// Get index of synchronized dimension
dimindex := dims.Item[1];
// Get collection of synchronized indexes
syncdims := dimindex.Dimensions;
// Get synchronized index
syncitem := syncdims.Item[0];
// Get synchronized dimension
dsodim := syncitem.Dimension;
// Get and display the dimension type to the console
dimtype := dsodim.Type;
System.Diagnostics.Debug.WriteLine("Dimension type - " + dimtype.ToString());
End Sub;
See also: