PC SOFT

ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Home | Sign in | English EN

  • Internal Report control: report based on a query that handles a specific connection
  • Miscellaneous
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
Initializes the query linked to the report. This function must be used if the query uses files accessed by a specific connection (connection via an OLE DB provider for example). If the query does not use a specific connection, use iInitReportQuery.
This function can be called:
  • in the "Initializing" event of the report. If the query expects parameters, you have the ability to specify the expected parameters.
  • before iPrintReport.
Linux Caution: A specific configuration is required to use this function in Linux. For more details, see Printing in Linux.

Important

If the query is created with the user version of the report editor, there is no need to use iInitReportQueryConnection to specify the parameters of the query. Indeed, when a report based on a query with parameters is run from the user version of the report editor, a window allows you to enter the parameters of the query.
Example
// Initialize the query
iInitReportQueryConnection(RPT_SchoolReport, hQueryWithoutCorrection, ...
"MyConnection_Oracle", "Doe", "2020")
// Print the report
iPrintReport(RPT_SchoolReport)
WINDEVWEBDEV - Server codeReports and QueriesUser code (UMC)AjaxNative Connectors (Native Accesses)
// Initialize the query (Oracle connection)
iInitReportQueryConnection(RPT_SchoolReport, "MyConnection_Oracle", "Doe", "2020")
// Print the report
iPrintReport(RPT_SchoolReport)
Syntax
iInitReportQueryConnection(<Report used> [, <Initialization mode>] , <Connection name> [, <Parameter 1 of query> [... [, <Parameter N of query>]]])
<Report used>: Report name
Logical name of report to print.
<Initialization mode>: Optional Integer constant
Option for initializing the query:
hModifyFile
(option that can be combined with the other constants)
On HFSQL data files: When the result of the query is modified (HAdd, HWrite, HModify, HCross, HDelete), these changes are propagated to the files used in the query.
If this option is not specified, only the query result is modified.
For more details on modifying the result of a query, see Modifying the query content.

On data files in a format other than HFSQL, the hModifyFile constant is useless: the files involved in the query are automatically modified when the result of the query is modified.
hQueryBreakableThe query initialization can be interrupted by the ESC key
hQueryDefault
(default value)
The query is initialized without interruption.
hQueryWithoutCorrection
OLE DBNative Connectors (Native Accesses) No check is performed by the HFSQL engine. This option must be used if the query contains commands specific to a connection type (Oracle, SQL Server, etc.).
Caution: if this constant is used:
hQueryWithoutHFCorrectionHFSQL only: The file format (filled with space characters or not) is not checked by the HFSQL engine. To be used if the query handles both HFSQL files in a format that fills items with space characters and HFSQL files in a format that does not fill items with space characters.
hWithFilter
(option that can be combined with the other constants)
If this constant is specified:
  • the query result corresponds to a selection of filter records if the HFSQL engine allows it. Otherwise, the query result corresponds to an HFSQL view.
  • the following operations are not allowed: search on the query result, query on query, view on query, query on view.
  • the browse items specified when looping through the result are ignored.
  • the magnifier is not available for the tables linked to a query.
  • HNbRec cannot be used on the queries.
Caution: if this option is specified, the hModifyFile constant is automatically used.
If this constant is not specified (by default):
  • the query result corresponds to an HFSQL view
  • the following operations can be performed on the queries: search on the query result, query on query, view on query, query on view.
  • the browse items specified when looping through the result are taken into account.
  • the magnifier is available on tables linked to a query.
  • hNbRec can be used on the queries.
<Connection name>: Character string
Name of connection to a database. This connection has been defined in the data model editor, or dynamically with HDescribeConnection. The connection description must be known when running the function.
<Parameter 1 of query>: Type of query parameter (optional)
First parameter of query defined as report source (if the query expects a parameter).
<Parameter N of query>: Type of query parameter (optional)
Last parameter of query defined as report source (if the query expects a parameter).
Remarks

Internal Report control: report based on a query that handles a specific connection

If the report associated with an "Internal report" control is based on a query that uses a specific connection, use iInitReportQueryConnection to execute this query and pass parameters, if necessary. This function must be used in the "Before printing" event of the block containing the "Internal report" control.
For more details, see Internal Report control.

Miscellaneous

  • If some of the parameters expected by the query are not specified (value corresponding to an empty string for example), the selection conditions corresponding to these parameters will be ignored.
  • If the number of parameters specified in iInitReportQueryConnection is greater than the number of parameters expected by the query, the additional parameters are ignored.
Business / UI classification: Neutral code
Component: wd280etat.dll
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment