ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / Editors / Report editor / Report blocks
  • Overview
  • Events of report blocks
  • Handling a block in a WLanguage event or process
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
Overview
Each report block is associated with different events. These events are used to improve the operating mode of the report via WLanguage programming functions
Furthermore, each block can be handled in WLanguage: to do so, use the name of the block in the WLanguage code.
Events of report blocks
The following events are associated with report blocks:
EventsRuntime condition
InitializingRun when initializing the block. When starting a report (including during a test), the events are run in the following order:
  • "Opening" event of the report.
  • "Initializing" event of report blocks.
  • "Initializing" event of controls.
This event is used to:
  • initialize the "Calculated" controls.
  • initialize the global variables declared in the "Opening" event of the report.
  • perform block substitutions.
Before printingBefore printing a block, the following operations are performed:
  • reading the current record.
  • assigning the values read in the controls of the block.
  • performing calculations on the values of items.
  • running the event "Before printing" of the block.
  • performing calculations on the controls of the block.
When this event is called, the report editor checks whether there is enough space left on the current page to print the current block (case of non-breakable block). If there is not enough space to print the current non-breakable block, it will be printed on the next page (as well as the Page Footer, Page Header and Body Complement blocks if necessary).
If the block is auto-resizing, the event "Before printing" is run before knowing whether the block can be printed on the page.
This event is used to:
  • see and modify the controls of the relevant block.
  • assign images.
  • run iPageEnd in the Break Header block.
Caution: This event cannot perform any substitution of the current block. However, it can ask for the substitution of another block.
After printingRun once the block is printed.
This event is used to:
  • see and modify the controls of the relevant block.
  • assign images.
  • reset to zero the controls that have just been printed.
  • substitute the blocks (taken into account for the next blocks).
  • print an Iteration block (iPrintBlock).
Value of break
(Break header block only)
Run before the event "Before printing" of the End of break block.
For more details, see Break in a report.

Reminder: If the destination of the print is an HTML file, the Page Header and Page Footer blocks will be edited once only.
To view the events specific to a block, use:
  • "Block code" from the popup menu of the block (right mouse click on the header of the block).
  • the "Code" icon of the block description.
Some functions and properties are specifically intended for handling the blocks.
Remark: The events associated with a report block are run when this block is printed. You can use WLanguage code in these events. For more details on the sequence of these events, see Sequence of events associated with a report.
Handling a block in a WLanguage event or process
To handle a report block in a WLanguage event or process, you can use one of the following methods:
  • use the name of this block directly. This syntax is valid only if the block is handled from the report to which it belongs.
  • use the following notation: "<ReportName>.<BlockName>".
A block can be handled:
  • in a WLanguage function.
  • with a WLanguage property.
  • in direct assignment.
For example:
// Print an iteration block
iPrintBlock("ITERATION1")
// Make the "Body" block invisible
Body.Visible = False
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