Report Execution

ActiveReports report execution begins by raising the ReportStart event. At this point, accessing data source properties might cause Datalnitialize to fire. The report validates any changes made to the report structure in ReportStart.

Printer settings are applied next.

If Datalnitialize is not fired during the ReportStart event, it will be fired. The data source will be opened. If there are any parameters in the data source with unset values and "ShowParameterUI" is set to True, ActiveReports displays a parameters dialog and fires "ParameterUIClosed" when the dialog is closed. If the report is a subreport and requires parameters, ActiveReports binds the subreport parameters to any fields in the parent report.

Next, the FetchData event fires. If there is no data, the NoData event is raised. Group sections are bound and sections begin rendering on pages.

Events are then fired for processing the report header, followed by page header, groups, detail and page footer for each page in the report. The cancel flag is checked after each event.

The speed in processing and output generation of ActiveReports is attributed to its intelligent, multi-threaded, single-pass processing. ActiveReports will process and render each page as soon as the page is ready. If ActiveReports is not able to fully render a page because of unknown data elements or because the layout is not final, it places the page in cache until the data is available.

Summary fields and KeepTogether constraints are two reasons that a page might not be rendered completely. 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 will be delayed until all of the data is read.

The KeepTogether property determines whether a section should print in its entirety on the same page. When this property is set to True, the section will print on the same page without any page breaks. A False setting allows the section to be split across two or more pages. If the KeepTogether property is set to True, but the section is too large for the current page, or to fit fully on the next page, the KeepTogether property will be ignored.

The GroupKeepTogether property determines whether group header and footer sections will print as a single block on the same page. The property defaults to None which allows the group block to be split across pages. When you set this property to All, ActiveReports attempts to print the complete block on the same page without any page breaks. When a complete block does not fit on a single page, it will be split across two or more pages. The third option, FirstDetail, prevents any widowed group header sections. The group header will always print with at least one Detail section.

0 0

Post a comment