How To…Display Report Open/Save dialogs

Question

“How do I displaying report Open/Save dialogs?”

Solution

The Report.Template object has several events that can be used for customizing what happens when a report is loaded or saved:

  • OnLoadStart
  • OnLoadEnd
  • OnNew
  • OnSaveStart
  • OnSaveEnd

The OnLoadEnd and OnNew events are often used to perform actions related to report and data initialization.

The OnSaveEnd event is often used to save additional descriptive (“meta”) data to the database each time the report is saved.

Example:

The Report.Template events are public and therefore must be assigned at run-time.

  1. In the private section of your form declaration you can declare an event-handler method:
  2. In the Form.OnCreate event, you can assign the event-handler to the event:
  3. Implement the event-handler method: