IsAutoIndent: Boolean;
IsAutoIndent: boolean;
The IsAutoIndent property determines whether automatic indents for elements are used.
Available values:
True. Automatic indents for elements are used.
False. Automatic indents for elements are not used.
Executing the example requires a form that contains the Button component with the Button1 identifier and the UiReport component with the UiReport1 identifier. A regular report with a configured hierarchy is used as a data source. Example is an handler of the OnClick event for the Button1 component.
Add a link to the Dimensions system assembly.
Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
Rep: IPrxReport;
DIs: IPrxDataIslands;
DI: IPrxDataIsland;
DimModel: IDimensionModel;
DIProp: IPrxDataIslandProperties;
Top: IPrxDataIslandDimension;
Level: IPrxDataIslandLevel;
Begin
Rep := UiReport1.Report.Edit;
DIs := Rep.DataIslands;
DI := DIs.Item(0).Edit;
DimModel := DI.Slice.TopHeader.Item(0).Dimension.Dimension;
DIProp := DI.Properties;
Top := DIProp.Dimension(DimModel);
Level := Top.Level(DimModel.Levels.Item(0));
If Not Level.IsAutoIndent Then
Level.AutoIndent := TriState.OnOption;
DIProp.HierarchyIndent := 4;
End If;
Debug.Write("Automatic indents for elements: ");
Select Case Level.AutoIndent
Case TriState.OnOption:
Debug.WriteLine("are used");
Case TriState.OffOption:
Debug.WriteLine("are not used");
End Select;
If Not Level.IsAutoIndent Then
Level.AutoIndent := TriState.OnOption;
End If;
DI.Save;
Rep.Save;
End Sub Button1OnClick;
After executing the example the console window displays result of the checking if automatic indents are used.
If indents are not used in the pop-up hierarchy, this option will be enabled. If automatic indents are not used, the settings defined for sheet cells are used.
The requirements and result of Fore.NET Example execution match with those in the Fore Example. Use Fore.NET analogs instead of Fore components.
Add links to the Dimensions, ForeSystem and Report system assemblies.
Imports Prognoz.Platform.Interop.Report;
Imports Prognoz.Platform.Interop.Dimensions;
Imports Prognoz.Platform.Interop.ForeSystem;
…
Private Sub button1_Click(sender: System.Object; e: System.EventArgs);
Var
Rep: IPrxReport;
DIs: IPrxDataIslands;
DI: IPrxDataIsland;
DimModel: IDimensionModel;
DIProp: IPrxDataIslandProperties;
Top: IPrxDataIslandDimension;
Level: IPrxDataIslandLevel;
Begin
Rep := uiReportNet1.ReportUi.Report.Edit();
DIs := Rep.DataIslands;
DI := DIs.Item[0].Edit();
DimModel := DI.Slice.TopHeader.Item[0].Dimension.Dimension;
DIProp := DI.Properties;
Top := DIProp.Dimension[DimModel];
Level := Top.Level[DimModel.Levels.Item[0]];
If Not Level.IsAutoIndent Then
Level.AutoIndent := TriState.tsOnOption;
DIProp.HierarchyIndent := 4;
End If;
System.Diagnostics.Debug.Write("Automatic indents for elements: ");
Select Case Level.AutoIndent
Case TriState.tsOnOption:
System.Diagnostics.Debug.WriteLine("are used");
Case TriState.tsOffOption:
System.Diagnostics.Debug.WriteLine("are not used");
End Select;
If Not Level.IsAutoIndent Then
Level.AutoIndent := TriState.tsOnOption;
End If;
DI.Save();
Rep.Save();
End Sub;
See also: