Add(ClassId: String; Placement: IGxRectF): ITabObject;
ClassId. Class ID of the object to be added. One of the following values is to be specified as class ID:
PrxPicture: an image.
PrxFlash: a Flash object.
PrxChart: a chart.
PrxScene3D: a 3D scene.
PrxSpeedometer: a Speedometer.
PrxMap: a map.
PrxMapTerritoryInfo: a map territories detailing.
PrxMapLegend: a map legend.
PrxShape - autoshape.
PrxFlowDocument - formatted text.
PrxVisualizer - visualizer legend.
Placement. Position of the added object.
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.
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: