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:

Create and save all the secondary reports.

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.

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.

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.

Position the "Internal Report" controls in the main report.

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:

Display the description of the report ("Report description" from the popup menu of the report).

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:

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.

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:

Display the "Format" tab in the description of the secondary report ("Report description" from the popup menu of the report).

Modify the width of the page where the secondary report will be printed.

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".