Programming using the BIRT Reporting APIs : Programming the structure of a report design : Using a report item in a report design : Accessing a report item by iterating through a slot
 
Accessing a report item by iterating through a slot
To access a report item through the report design’s structure, first get the slot handle of the report body by calling the ReportDesignHandle.getBody( ) method. This slot handle holds the top-level report items in the report design. For example, consider a simple report structure that has three top-level items: a grid of header information, a table containing grouped data, and a label that displays a report footer. Figure 12‑2 shows its outline view in BIRT Report Designer.
Figure 12‑2 Slots in a report design
To access the top-level items in this report design, iterate over the contents of the body slot handle. To access the iterator for a slot handle, call SlotHandle.iterator( ). Each call to Iterator.getNext( ) returns ReportDesignHandle object, which is a handle to a report item or another slot. Alternatively, to access a report item at a known slot index, call SlotHandle.get( ). The slot index number is zero-based.