Do Section Event

The Do Section event is the most commonly used event. It is used most often in columnar and group sections because the Do Section event occurs before any objects are processed.

The Do Section event is invoked after the system has assigned new values to objects in the report and immediately before the system processes objects within a section.

When the system processes the Do Section event in columnar sections, it processes the column headings first and then fetches the first record. For each object or column in the record, it processes the Init Object, Do Object, and End Object events. After processing the last object, the system calls the After Last Object Printed event and then fetches the next record and repeats the process. When all lines have been fetched from the database, the system processes the End Section event. This basic process is the same for group sections.

If an affected object is a child section, such as in a subsection join, the system invokes the Initialize Section event the first time that the child section is processed. For any subsequent times that the child section is processed, the engine invokes the Refresh Section event.

If an object does not fit on a page, the system invokes the Suspend Object event, which moves the object to the next page.