PC SOFT

WINDEV的在线文档

  • Overview
  • Processes of report blocks
  • Handling a block in a WLanguage process
文档页面当前正在翻译。对于此延迟我们深表歉意。
您可以自愿地帮助我们翻译您想要的文档段落,然后只需通过以下地址与我们联系:info@cn.windev.com
产品
WinDevWebDev-服务器代码WebDev-浏览器代码WinDev Mobile报表和查询
平台
WindowsLinuxWindows MobileWindows PhoneWindows Store appsAndroidAndroid Widget iPhone/iPad
语言
JavaPHPAjax用户代码(MCU)外部语言
数据库
HFSQLHFSQL Client/Server存储过程HF 5.5OLE DBODBC本地访问

Overview
Each report block is associated with different processes. These processes are used to improve the operating mode of the report via the programming functions of WLanguage.

Furthermore, each block can be handled in WLanguage: to do so, use the name of the block in the WLanguage code.

Processes of report blocks
The following processes are associated with the report blocks:
ProcessesRuntime condition
InitializationRun when initializing the block. The order in which the processes are run when printing a report (including when running a test) is as follows:
  • "Opening" process of the report.
  • "Initialization" process of report blocks.
  • "Initialization" process of controls.
This process is used to:
  • initialize the "Calculated" controls.
  • initialize the global variables declared in the "Opening" process of the report.
  • perform block substitutions.
Pre-printBefore printing a block, the following operations are performed:
  • reading the current record.
  • assigning the values read in the block controls.
  • performing calculations on the values of items.
  • running the "Pre-print" process of the block.
  • performing calculations on the block controls.
When this process 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).When this process 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-sizable, the "Pre-print" process is run before knowing whether the block can be printed on the page.

This process is used to:

  • see and modify the controls of the relevant block.
  • assign images.
  • run 打印换页 in the Break Header block.
Caution: This process cannot perform substitutions of the current block. However, it can request the substitution of another block.
End of printRun once the block is printed.

This process is used to:
  • see and modify the controls of the relevant block.
  • assign images.
  • reset the controls that have just been printed.
  • substitute the blocks (taken into account for the next blocks).
  • print an Iteration block (打印块).
Break?(Break Header block only)
Run before the "Pre-print" process of the Break header block.
See Break in a report for more details.

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 processes specific to a block, use:

  • "Code of the block" 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.

Note: The processes associated with a report block are run when this block is printed. A WLanguage code can be used in these processes. See Sequence of processes associated with a report for more details.

Handling a block in a WLanguage process
To handle a report block in a WLanguage process, you must:
  • 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.
  • by a WLanguage property.
  • by direct assignment.
For example:

// Print an iteration block
打印块"ITERATION1"
// Make the "Body" block invisible
Body..可见=