maandag 4 april 2011

Common Report Methods

Source: http://www.lulu.com/items/volume_49/340000/340213/3/print/340213.pdf (page 222)

Report Runbase Framework active

When making modifications to a report, you are either overriding existing methods,
or adding new methods which are called from the overridden methods.
The following methods are executed in listed order when a report is loaded as shown here:

init() ► dialog() ► run() ► fetch() ► send() ► print()

1. Init() and dialog() are triggered when the report is loaded.
2. Run() is triggered when the OK button is pressed in the dialog.
3. Fetch() is looping through the query and for each record found send() is triggered.
4. Finally, print() is triggered.

These methods are the most important within a report, and are the ones you will override most often.
Typical customizations include adding controls to a dialog, manipulating the output from the query before it is printed,
or adjusting the output by executing a programmable section which must be printed within the report body section.
The above listed execution order is used when the report runbase framework is in effect.

Report Runbase Framework not active

If you call your report directly from the AOT without using a menu item,
the execution order of the methods is slightly different as shown here:

init() ► run() ► prompt() ► fetch() ► send() ► print()

Notice that dialog() will not be triggered.
RunBaseReportStd controls the dialogs of the report and when the “runbase framework is not active” prompt() is used.