ITabObjects.Add

Syntax

Add(ClassId: String; Placement: IGxRectF): ITabObject;

Parameters

ClassId. Class ID of the object to be added. One of the following values is to be specified as class ID:

Placement. Position of the added object.

Description

The Add method adds a new object to the table sheet; the class identifier and placement of this object are passed as the ClassId and Placement input parameters correspondingly.

After executing, the method returns parameters of the created object.

Example

Sub OnAfterExecuteReport(Report : IPrxReport);

Var

ClassId: String;

Placement: IGxRectF;

Tab: ITabObject;

Begin

ClassId:="PrxPicture";

Placement:=New GxRectF.Create(10,10,100,100);

Tab:=report.ActiveSheet.Table.Objects.Add(ClassId,Placement);

(Tab As IPrxPicture).Image:= New GxImage.CreateFromFile("c:\Image.jpg");

End Sub OnAfterExecuteReport;

After the report is calculated an image from the "c:\Image.jpg" file is added onto the current sheet.

See also:

ITabObjects