ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

This content has been translated automatically.  Click here  to view the French version.
Help / WLanguage / WLanguage functions / Standard functions / Print functions
  • Internal status field: status based on a query handling a specific connection
  • Miscellaneous
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
Initializes the query linked to the report. This function must be used if the request uses data files accessed via a specific connection (e.g., a connection using an OLE DB provider). If the query does not use a specific connection, use iInitReportQuery.
This function can be called:
  • in the "Initialization" event of the report. If the query expects parameters, you have the ability to specify the expected parameters.
  • before iPrintReport.
Linux Caution: Using this function under Linux requires a specific configuration.. For more details, see Printing in Linux.
If the query is created with the user report editor, it is not necessary to use iInitReportQueryConnection to specify the query parameters. When a report based on a query with parameters is executed from the user report editor, a window allows you to enter the query parameters.
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 the query> [... [, <Parameter N of the query>]]])
<Report used>: Report name
Logical name of the report to be printed.
<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 modifying the query result (functions HAdd, HWrite, HModify, HCross, HDelete), these modifications will be transferred to the data files contributing to 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 non-HFSQL data filesfiles, the constant hModifiesFile is unnecessary: data files contributing to the query are automatically modified when the query result 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.).
Warning: if this constant is used:
hQueryWithoutHFCorrectionHFSQL only The HFSQL engine does not check the format of data files (with or without spaces). To be used if the query handles both HFSQL data files in a format that completes items with space characters and HFSQL data files in a format that does not complete 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 possible: search on the result of the query, 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.
Warning: if this option is specified, the constant hModifyFile constant is automatically used.
If this constant is not specified (default):
  • the query result corresponds to an HFSQL view.
  • the following operations can be performed on the queries: search on the result of the query, 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 the query>: Type of query parameter (optional)
First parameter of query defined as report source (if the query expects a parameter).
<Parameter N of the query>: Type of query parameter (optional)
Last parameter of query defined as report source (if the query expects a parameter).
Remarks

Internal status field: status based on a query handling 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: wd300etat.dll
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 12/08/2024

Send a report | Local help