add

report_element TPTReport.add([string parentID], report_element|string nodeOrParagraph)

Add a report_element into the report template top-level structure. Without a parentID the object is inserted at the current position. With a parentID the object is inserted to the parent object.

If only a string is specified, this text is printed directly into the report.

The last two functions are used to directly add a paragraph into the report and are shorthand for TPTReport.add(TPTReport.Paragraph(text)).

Parameters:

[parentID] (optional) ID of the parent node this new node shall be added below. This parameter is optional. If omitted, the node will be appended at the end of the document or a the end of the currently selected section.

nodeOrParagraph Either a report node or a new paragraph that shall be added to report template top-level structure.

Returns:

the node that has been added (if a report node has been provided as a parameter it will be this node)

Examples:

   report_element TPTReport.add(mySignalGraphic)
   report_element TPTReport.add("mySection", mySignalGraphic)
   report_element TPTReport.add("Hello World!")
   TPTReport.add("mySection", "Hello World!")