##### Inserting and deleting an object

To insert or delete an object into a report, you can use the methods and parameters below:

- insert(String parent, int type, String name)
  Inserts an object into the parent node.
- insert(String parent, int type, String name, String mapping)
  Inserts a DBField, parameter, formula or summary into the parent node.
- insert(String parent, String name, CTRowColFieldInfo colInfo[], CTRowColFieldInfo rowInfo[], CTAggFieldInfo aggInfo[])
  Insert a crosstab object and its children into the parent node.
- insert(String parent, CTRowColFieldInfo colInfo, CTRowColFieldInfo rowInfo, CTAggFieldInfo aggInfo)
  Inserts crosstab children into the crosstab.
- insert(String parent, String name, String paperName, int charttype, String gName1, String gName2, String value, ChartLegendInfo chartLegendInfo, ChartLabelInfo chartLabelInfo)
  Inserts a chart object and its children into the parent node.
- insert (String parent, int type, String name, String topSection , String bottomSection)
  Inserts a shape object into the report and returns the handle of the new shape.
- insert(String parent, String name, GroupInfo groupInfo)
  Inserts a group/sort into the parent node.
- delete(String handle)
  Deletes an object from its parent node.

Parameters

- parent - Parent handle node.
- type - Class type that you want to insert.
- name - Instance name of the new object.
- mapping - Mapping name of the database field, parameter, formula or summary.
- colInfo - Field information array of the Column.
- rowInfo - Field information array of the Row.
- aggInfo - Field information array of the Aggregate.
- paperName - Instance name of ChartCoordinatepaper object.
- charttype - Type of Chart.
- group1 - Mapping name of the first group.
- group2- Mapping name of the second group. It can be null.
- value - Mapping name of a summary.
- chartLegendInfo - Field information array of the chart legend.
- chartLabelInfo - Field information array of the chart title and notes.
- handle - Handle of the object that is to be deleted.
- topSection - Handle of the top section attached by the shape.
- bottomSection - Handle of the bottom section attached by the shape.
- groupInfo - The group information.