IsCombinedSlot(SlotNumber: Integer): Boolean;
IsCombinedSlot(SlotNumber: integer): boolean;
SlotNumber.Slot index in the table header.
The IsCombinedSlot property returns whether there are several dimensions placed in one row and column in the table header.
If table header contains several dimension names placed in one row and column when theAll Dimensions checkbox is selected, then the property returns True, otherwise - False.
Executing the example supposes that repository contains express report with data table with the EXPRESS_SLOTS identifier.
Add links to the Express, Metabase, Pivot system assemblies.
Sub UserProc;
Var
MB: IMetabase;
Report: IEaxAnalyzer;
Pivot: IPivot;
TableHeader: IPivotTableHeader;
Dims: String;
Begin
// Get the current repository
MB := MetabaseClass.Active;
// Get express report
Report := MB.ItemById("EXP_SLOTS").Bind As IEaxAnalyzer;
// Get object, based on which data table is built
Pivot := Report.Pivot;
// Get properties of table column headers
TableHeader := Pivot.ObtainTable.TopHeader;
// Get header of the first table column
Dims := TableHeader.GetSlotName(True, False, 0);
// Determine whether the header contains several dimensions in one row
If TableHeader.IsCombinedSlot(0) = True Then
Debug.WriteLine("In the first table column header the dimensions with the following names are merged - " + Dims);
Else Debug.WriteLine("Dimensions are not merged in the header");
End If;
End Sub UserProc;
After executing the example, the console window displays names of merged dimensions or the message that dimensions are not merged in the header:
In the first table column header, the dimensions with the following names are merged - Calendar; Data types
The requirements and result of the Fore.NET Example execution match with those in the Fore Example.
Imports Prognoz.Platform.Interop.Express;
Imports Prognoz.Platform.Interop.Metabase;
Imports Prognoz.Platform.Interop.Pivot;
…
Public Shared Sub Main(Params: StartParams);
Var
MB: IMetabase;
Report: IEaxAnalyzer;
Pivot: IPivot;
TableHeader: IPivotTableHeader;
DimKey, Element: Uinteger;
Dims: String;
DimInst: IDimInstance;
Begin
// Get the current repository
MB := Params.Metabase;
// Get express report
Report := MB.ItemById["EXP_SLOTS"].Bind() As IEaxAnalyzer;
// Get object, based on which data table is built
Pivot := Report.Pivot;
// Get properties of table column headers
TableHeader := Pivot.ObtainTable().TopHeader;
// Get header of the first table column
Dims := TableHeader.GetSlotName(True, False, 0);
// Determine whether the header contains several dimensions in one row
If TableHeader.IsCombinedSlot[0] = True Then
System.Diagnostics.Debug.WriteLine("In the first table column header the dimensions with the following names are merged - " + Dims);
Else System.Diagnostics.Debug.WriteLine("Dimensions are not merged in header");
End If;
End Sub;
See also: