PC SOFT

WINDEV的在线文档

  • Overview
  • "Opening process of the report"
  • Running the process
  • Password of the data file used as source for the report
  • Initializing the variables
  • Use examples
  • "Reading data" process
  • Running the process
  • Reports based on a text file
  • Use examples
  • "Filter" process
  • Running the process
  • Using the Filter process
  • Use examples
  • "Closing process of the report"
  • Running the process
  • Use examples
文档页面当前正在翻译。对于此延迟我们深表歉意。
您可以自愿地帮助我们翻译您想要的文档段落,然后只需通过以下地址与我们联系: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
The following processes are associated with the reports (order of appearance in the code editor):Several processes are associated with the reports. These processes are run when printing the report.

To find out the order in which these processes are run, see Sequence of processes associated with the reports.

"Opening process of the report"

Running the process

The "Opening process of the report" is run when starting to print the report.

Reminder: The order in which the processes are run when printing a report (including when running a test) is as follows:

Password of the data file used as source for the report

If the data file used as source for the report is password protected, this password must be specified before opening the data file (by H密码 for example).

If the data file was not opened before printing the report, the password can be specified in the "Opening" process of the report.

WinDev

Initializing the variables

When printing a report from the print preview, the report is automatically re-run when:
  • the user changes printer.
  • the user uses one of the toolbar buttons (print in PDF mode, in HTML mode, in an email, ...).
In this case, the data printed in the report can differ from the data displayed in the preview.

The variables used by the report must be initialized in the "Report opening" process rather than in the code of the button that starts the print.

Use examples

This process is used to:
  • declare the global variables of the report.
  • modify the report bounds with ..最小界限 and ..最大界限.
  • initialize the passwords of the data files if necessary.
  • configure the destination of the print (打印预览).
  • pass parameters to the query linked to the report (打印初始化报表查询).
  • retrieve the parameters passed to the report.
  • change the data source of the report.
Note: 打印 must not be used in the opening process of the report.

"Reading data" process

Running the process

The "Read" process is run when browsing the records to print (in the print loop), once the record has been read.

Reports based on a text file

For the reports based on a text file (with programmed read operation), the "Read" process is used to read the records found in the text file in order to print them.

Use examples

This process is used to:
  • perform block substitutions (as the next record to print is known).
  • select records.
  • perform specific calculations.
Note: This code returns if there are still records to print and if there is no record to print.

To avoid printing a record, use the "Filter" process.

"Filter" process

Running the process

This process is run:
  • when the data source is initialized (for the reports based on a file, a view or a memory zone).
  • in the print loop, once the record is read (for the reports based on a query or on a table).
This process is used to filter the records that must be displayed in the report.

Using the Filter process

If this process contains some code lines, these code lines must return a value:
  • Cancel to stop reading the records (and to stop the print).
  • to specify that the record matches the filter and that it must be printed.
  • to specify that the record does not match the filter and that it must not be printed.

Use examples

This process is used to:
  • select records.
  • perform advanced calculations (sub-total, ...) for the reports based on files, views or memory zones.

"Closing process of the report"

Running the process

This process is run when the report print is ended, just before closing the report.

No print functions must be found in this process.

Use examples

This process is used to: