In reports, triggers are typically used to perform calculations and to control whether to output sections. Triggers allow you to control how data is selected and retrieved in a more complex and effective way than you can achieve by using properties.

Report Triggers

The following table lists triggers that apply to the report itself.

Trigger Executed

OnInitReport Trigger

When the report is loaded.

OnPreReport Trigger

Before the report is run, but after the RequestForm has been run.

OnPostReport Trigger

After the report has run, but not if the report was stopped manually or by the Break function.

OnCreateHyperlink Trigger

After the user creates a URL to a form or a report.

OnHyperlink Trigger

After the OnInitReport Trigger is executed for a report. The trigger executes a URL string.

Data Item Triggers

The following table lists triggers that apply to each data item on the report.

Trigger Executed

OnPreDataItem Trigger

Before the data item is processed, but after the associated variable has been initialized.

OnAfterGetRecord (Data Items) Trigger

When a record has been retrieved from the table.

OnPostDataItem Trigger

When the data item has been iterated for the last time.

Section Triggers

The following table lists triggers that apply to each of the sections of a data item.

Triggers Executed

OnPreSection Trigger

Before processing a section.

OnPostSection Trigger

After processing a section but before printing it.

See Also