ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / Editors / Report editor / Programming a report
  • Sequence of events
  • Special cases
  • "Page break after block" option
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
Sequence of events
Several operations are performed when printing a report. These operations are performed in the following order:
1.Running the "Opening" event of the report.
2.
WINDEVReports and Queries Running the Before re-printing event of the report (case of direct printing or export from the report viewer).
3.Running the "Initializing" events of blocks and the "Initializing" events of controls.
4.Initializing the data source.
5.For the reports based on a data file, an HFSQL view or a memory area:
6.Initializing the margins and defining the Portrait/Landscape mode.
7.Resizing the report (if necessary) according to the specified format.
8.Printing the Start of document block and running its events (*).
9.Printing the Page header block and running its events for each report page (*).
10.Print loop:
  • Reading the record
  • Running the "Filter" event of the report (for reports based on a query or table). If the record does not match the filter, goes to the next record.
  • Performing calculations on the values of items.
  • Running the "Read" event of the report.
  • Test of the break:
    • on the break item for automatic breaks.
    • on the value returned by the "Break" event for the programmed breaks.
    If the break value has been modified, goes to the next break and creates one or more Break header and Break footer blocks.
  • Printing the Body block.
Remark: When printing a Break header, Break footer or Body block, the following operations are performed:
  • Running the event "Before printing" of the block and "Before printing" of block controls.
  • Performing calculations on the controls of the block.
  • Enlarging controls and auto-resizing blocks.
  • Printing and running the "After printing" event of the block.
11.Printing the End of document block and running its events (*).
12.Printing the Page footer block and running its events for each report page (*).
13.Running the "Closing" event of the report.

(*) The order in which the Start of document, Page header, Page footer and End of document blocks are printed can be modified in the "Options" tab of the report description ("Report description" in the context menu of the report).
Reminder : If the destination of the printout is an HTML or XML file, the Page Header and Page Footer blocks are generated once only.
Special cases

"Page break after block" option

If "Page break after the block" is checked in the block description, the sequence of events is as follows:
  • Running the event "Before printing" of the block.
  • Running the events of the "Page header" block for the next page.
  • Running the event "After printing" of the block.
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 05/26/2022

Send a report | Local help