JavaScript Editor js editor     Web development 



Main Page

Occurs just before the Report Engine begins processing a report form.

PROCEDURE Object.BeforeReport

Parameters

None.

Remarks

Applies To: ReportListener Object.

When Visual FoxPro triggers the BeforeReport event for a report run, it has done all necessary internal setup work for rendering the report. It has read the contents of the report definition file (frx) and has opened a read-only copy of this file in a private datasession for use by your derived class. For more information, see FRXDataSession Property.

Before triggering the BeforeReport event, the Report Engine has also created a private data session for the report's data, if the report specifies one. It has opened the tables and performed other initialization tasks as specified by the report's DataEnvironment. For more information, see CurrentDataSession Property. You can investigate the report's layout definition and the report's data, as needed, by switching between these two data sessions.

At this point, the Engine has also checked the report scope, providing you with the number of records to be processed in this report run. This information is available to your code in the CommandClauses.RecordTotal member. In BeforeReport, all other CommandClauses' member values are fully available as well. For more information, see CommandClauses Property.

After the BeforeReport() event returns, the Report Engine can begin the report run. It begins by evaluating the expressions in the report, to assess whether this report requires a preprocessing or calculation pass. It assigns additional properties of the Listener at this time, indicating the result of this assessment. For more information, see TwoPassProcess Property and CurrentPass Property. The next event triggered is the first BeforeBand event for the report.

Note:
For more information about the order of events in a report run, refer to Understanding Visual FoxPro Object-Assisted Reporting.

See Also



JavaScript Editor js editor     Web development