Intelligent, multi-threaded, single-pass processing enables ActiveReports to surpass other reports in processing and output generation speed. ActiveReports processes and renders each page as soon as the page is ready. If a page has unknown data elements or its layout is not final, it places the page in cache until the data is available.
Summary fields and KeepTogether constraints are two reasons why a page might not render immediately. The summary field is not complete until all the data needed for calculation is read from the data source. When a summary field such as a grand total is placed ahead of its completion level, such as in the report header, the report header and all following sections are delayed until all of the data is read.
There are eleven report events in the code behind an ActiveReport, or seven in an ActiveReport script.
Because there are so many ways in which you can customize your reports, not all reports execute in the same way. However, when you run a report, this is generally what happens:
- ActiveReports raises the ReportStart event. The report validates any changes made to the report structure in ReportStart. In some cases, data source properties raise the DataInitialize event.
- Printer settings are applied. If none are specified, the local machine's default printer settings are used.
- If the DataInitialize event was not already raised, ActiveReports raises it and opens the data source.
- If the data source contains parameters with unset values and the ShowParameterUI property is set to True, ActiveReports displays a parameters dialog to request values from the user.
- Closing the dialog raises the ParameterUIClosed event. If the report is a subreport that requires parameters, ActiveReports binds the subreport parameters to any fields in the parent report.
- ActiveReports raises the FetchData event.
- If there is no data, the NoData event is raised.
- The PageStart event raises, and then raises again after each PageEnd event until the final page.
- Group sections are bound and sections begin rendering on pages.
- ActiveReports raises Section Events to process sections in (roughly) the following order:
- Report header
- Page header
- Group header
- Detail
- Group footer
- Page footer
- Report footer
- After each event, ActiveReports checks the Cancel flag to ensure that it should continue.
- Other events may raise, depending on the report logic.
- The PageEnd event raises after each page becomes full, and the PageStart raises if the report has not finished.
- Finally, ActiveReports raises the ReportEnd event.
See Also