PC SOFT

WINDEV的在线文档

  • Overview of the "Internal report" control
  • Report control
  • Benefits of internal reports compared to the nested reports
  • How to proceed?
  • Creating a main report made of several secondary reports
  • Main report not blank
  • Secondary report
  • Secondary report based on a query with parameters
  • Secondary report based on a query that is using a specific connection
  • Secondary report based on a HFSQL view
  • Passing parameters to an internal report
  • Notes
  • Dimension of secondary reports
  • Reducing the width of a secondary report
  • Page break in the secondary report
  • Opening the internal report
文档页面当前正在翻译。对于此延迟我们深表歉意。
您可以自愿地帮助我们翻译您想要的文档段落,然后只需通过以下地址与我们联系: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 of the "Internal report" control

Report control

The "Internal report" controls are used to print several reports (secondary reports) in a single report (main report) without programming.

For example, the following main report is made of two secondary reports printed side-by-side:

  • a report displaying the data in a table.
  • a report displaying the data in a chart.

Benefits of internal reports compared to the nested reports
The nested reports can also be used to print several secondary reports in a main report. The secondary reports are printed one below another.
To print these secondary reports, use 打印报表 in the code of the block where the secondary reports must be printed.

The internal reports are used to print several reports without programming:

  • one below another.
  • side by side.

How to proceed?

Creating a main report made of several secondary reports

To create a main report made of several secondary reports:
  1. Create and save all the secondary reports.
  2. Create the main report ("File .. New .. Report .. Blank report").Create the main report:
    • Clickamong the quick access buttons.
    • Click "Report" in the wheel that is displayed. The wizard for report creation starts.The window for creating a new element is displayed: click "Report" then "Report". The wizard for report creation starts.
    • In the wizard, select "Blank report" and validate.
  3. In the main report, create as many Internal Report controls as secondary reports to print ("Insert .. New internal report" or).In the main report, create as many Internal Report controls as secondary reports to print.
    To create an internal report, on the "创建" pane, in the "结构" group, click "内部报表".
    Note: The main report can contain all the other types of controls.
  4. Associate each "Internal report" control with a secondary report ("Printed report" in the "General" tab of the control description). The secondary report will be entirely printed in the "Internal report" control.
  5. Position the "Internal Report" controls in the main report.
  6. Run the test of the main report ("Code .. Run the report test") to check the printout of your report.Test the main reportamong the quick access buttons) to check the printing of your report.

Main report not blank

If the main report and the secondary reports have the same data source, we recommend that you use an independent HFSQL context:
  • for the main report.
  • for the secondary reports.
Note: To define an independent HFSQL context:
  1. Display the description of the report ("Report description" from the popup menu of the report).
  2. In the "Data" tab, check (or not) "The execution of the report does not affect the browse operations (independent HyperFileSQL context)".In the "Data" tab, check "The execution of the report does not affect the browse operations (independent HFSQL context)".
Note: From version 19, HFSQL is the new name of HyperFileSQL.

Secondary report

A secondary report can contain all types of controls except for the "Internal report" controls.

Secondary report based on a query with parameters

If the secondary report is based on a query with parameters, 打印初始化报表查询 must be used to pass the parameters to the query. This function must be used in the "Pre-print" process of the block containing the "Internal report" control.

Secondary report based on a query that is using a specific connection

If the secondary report is based on a query that handles a specific connection, use 打印初始化报表查询的连接 to run this query (and to pass parameters if necessary). This function must be used in the "Pre-print" process of the block containing the "Internal report" control.

Secondary report based on a HFSQL view

If the secondary query is based on a HFSQL view:
  1. Declare a global variable (character string) in the project and assign the name of the HFSQL view to this variable before running the main report.
  2. Associate the view with the secondary report (with ..视图名称) in the opening code of the secondary report:
    <NameSecondaryReport>..视图名称 = <NameGlobalVariable>
Note: From version 19, HFSQL is the new name of HyperFileSQL.

Passing parameters to an internal report

The parameters given to the report (during the call to 打印报表) are automatically transmitted to the internal report. Caution: in this case, passing parameters by address is not guaranteed.

To pass parameters to an internal report, we recommend that you use global variables. For example, a global variable can be declared in the calling report. This variable can then be handled in the internal report via the following syntax:

<NameCallingReport>.<Variable Name>

Notes

Dimension of secondary reports

When printing the main report, the width of secondary reports is adjusted in relation to the width of the "Internal report" control.

All the blocks found in the secondary reports will be printed. The main report will automatically adapt to the height of the secondary reports by:

  • increasing (if necessary) the height of the "Internal report" control.
  • increasing (if necessary) the height of the block containing the "Internal report" control.
  • moving to the bottom the controls located below the "Internal report" control.

Reducing the width of a secondary report

To reduce the width of a secondary report:
  1. Display the "Format" tab in the description of the secondary report ("Report description" from the popup menu of the report).
  2. Modify the width of the page where the secondary report will be printed.
  3. Validate.

Page break in the secondary report

The page breaks defined in a secondary report will be ignored when printing the main report.

16版本和更高版本

Opening the internal report

The popup menu of the "Internal Report" control in the editor is used to directly open the internal report via "Open the internal report".
16新版本

Opening the internal report

The popup menu of the "Internal Report" control in the editor is used to directly open the internal report via "Open the internal report".

Opening the internal report

The popup menu of the "Internal Report" control in the editor is used to directly open the internal report via "Open the internal report".