Visible: Boolean;
The Visible property determines whether calculated column or row is displayed.
Available values:
True. The calculated column or row is displayed.
False. The calculated column or row is hidden.
Executing the example requires that the repository contains an express report with the EXPRESS_SLOTS identifier. This report must include a data table and calculated columns.
Add links to the Express, Metabase and Pivot system assemblies.
Sub UserProc;
Var
mb: IMetabase;
Report: IEaxAnalyzer;
Pivot: IPivot;
pHeader: IPivotHeader;
HeaderSlots: IPivotHeaderEvaluatedSlots;
i: Integer;
Slot: IPivotHeaderEvaluatedSlot;
Begin
// Get current repository
mb := MetabaseClass.Active;
// Receive express report
Report := mb.ItemById("EXPRESS_SLOTS").Edit As IEaxAnalyzer;
// Get object, based on which data table is created
Pivot := Report.Pivot;
// Get parameters of dimensions located in sidehead
pHeader := Pivot.LeftHeader;
// Get collection of calculated columns located in sidehead
HeaderSlots := pHeader.EvaluatedSlots;
// Hide all visible calculated columns
For i := 0 To HeaderSlots.Count - 1 Do
Slot := HeaderSlots.Item(i);
If Slot.Visible Then
Slot.Visible := False;
End If;
End For;
// Save changes in report
(Report As IMetabaseObject).Save;
End Sub UserProc;
After executing the example all calculated columns are hidden in the table.
See also: