Remove(Index: Integer): Boolean;
Index. Series index.
The Remove method removes a series by the specified index. The method returns True if a series has been removed successfully, otherwise it returns False.
Executing the example requires a form with a button named Button1 on the form, the IntegerEdit component named IntegerEdit1. There should be a regular report with the REGULAR_REPORT identifier, which sheet houses a 3D scene with several data series. Add links to the Metabase, Report, Tab, Ui, Forms system assemblies.
Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
Report: IPrxReport;
S: IPrxScene3D;
Series: IPrxScene3DSeries;
MB: IMetabase;
Tab: ITabSheet;
Begin
MB := MetabaseClass.Active;
Report := MB.ItemById("REGULAR_REPORT").Edit As IPrxReport;
Tab := (Report.Sheets.Item(0) As IPRxTable).TabSheet;
S := Tab.Objects.Item(0).Extension As IPrxScene3D;
Series := S.Series;
If Series.Remove(IntegerEdit1.Value) Then
WinApplication.InformationBox("Object is removed");
Else
WinApplication.InformationBox("No object to remove");
End If;
(Report As IMetabaseObject).Save;
End Sub Button1OnClick;
Enter series index into the string and click the button. After executing the example the appropriate message is displayed.
See also: