Remove(Index: Integer): Boolean;
Index - sheet index.
The Remove method removes a sheet, which index is passed by the Index parameter.
Sub Main;
Var
MB: IMetabase;
MObj: IMetabaseObject;
Report: IPrxReport;
Sheets: IPrxSheets;
s: String;
Begin
MB := MetabaseClass.Active;
MObj := MB.ItemById("Report").Edit;
Report := MObj As IPrxReport;
Sheets := Report.Sheets;
If Sheets.Remove(Report.ActiveSheet.Index) Then
s:="Remove";
Else
s:="Don't remove";
End If;
MObj.Save;
End Sub Main;
After executing the example the "s" variable contains "Remove" if the active sheet has been successfully removed. The identifier of the regular report - Report.
See also: