PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • Internal Report control: report based on a query that handles a specific connection
  • Various
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
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 is using no specific connection, call iInitReportQuery.
This function can be called:
  • in the initialization code of the report. If the query expects parameters, you have the ability to specify the expected parameters.
  • before iPrintReport.
Versions 15 and later
WINDEVLinux This function is now available for the WINDEV applications in Linux.
WEBDEV - Server codeLinux This function is now available for the WEBDEV sites in Linux.
Linux Caution: A specific configuration is required to use this function in Linux. See Printing in Linux for more details.
New in version 15
WINDEVLinux This function is now available for the WINDEV applications in Linux.
WEBDEV - Server codeLinux This function is now available for the WEBDEV sites in Linux.
Linux Caution: A specific configuration is required to use this function in Linux. See Printing in Linux for more details.
WINDEVLinux This function is now available for the WINDEV applications in Linux.
WEBDEV - Server codeLinux This function is now available for the WEBDEV sites in Linux.
Linux Caution: A specific configuration is required to use this function in Linux. See Printing in Linux for more details.
Versions 18 and later
iPhone/iPad This function is now available for the iPhone/iPad applications.
New in version 18
iPhone/iPad This function is now available for the iPhone/iPad applications.
iPhone/iPad This function is now available for the iPhone/iPad applications.
Versions 21 and later
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
New in version 21
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.

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.
Note: From version 19, HFSQL is the new name of HyperFileSQL.
Example
// Initialize the query
iInitReportQueryConnection(RPT_SchoolReport, hQueryWithoutCorrection, ...
"MyConnection_Oracle", "Doe", "1994")
// Print the report
iPrintReport(RPT_SchoolReport)
WINDEVWEBDEV - Server codeReports and QueriesWindows MobileAjaxUser code (UMC)Native Accesses
// Initialize the query (Oracle connection)
iInitReportQueryConnection(RPT_SchoolReport, "MyConnection_Oracle", "Doe", "1994")
// Print the report
iPrintReport(RPT_SchoolReport)
Syntax
iInitReportQueryConnection(<Report Name>, [<Initialization Mode>,] <Connection Name> [, <Parameter 1 of Query> ... [, <Parameter N of Query>]])
<Report Name>: Character string (with or without quotes)
Logical name of report to print.
<Initialization Mode>: Optional Integer constant
Option for initializing the query:
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 a HFSQL view.
  • the following operations are not allowed: search on the query result, query on query, view on query, query on view.
  • the search items specified when browsing 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 a 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 search items specified when browsing the result are taken into account.
  • the magnifier is available for the tables linked to a query.
  • hNbRec can be used on the queries.
hModifyFile
(option that can be combined with the other constants)
On HFSQL data files: When modifying the query result (HAdd, HWrite, HModify, HCross, HDelete), these modifications will be applied to the files taking part in the query.
If this option is not specified, only the query result is modified.
See Modifying the query content for more details.

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.
hQueryDefault
(default value)
The query is initialized without interruption.
hQueryBreakableThe query initialization can be interrupted by the ESC key
hQueryWithoutCorrection
OLE DBNative Accesses No check is performed by the HFSQL engine. This option must be used if the query contains commands specific to a type of connection (Oracle, SQL Server, ...).
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 completes items with space characters and HFSQL files in a format that does not complete items with space characters.
<Connection Name>: Character string (with quotes)
Name of connection to a database. This connection was defined in the data model editor or dynamically by HDescribeConnection. The description of the connection 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 handles a specific connection, use iInitReportQueryConnection to run this query (and to pass parameters if necessary). This function must be used in the "Before printing" process of the block containing the "Internal report" control.
See Internal Report control for more details.

Various

  • 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 will be ignored.
Components
WINDEVWEBDEV - Server codeReports and Queries wd230etat.dll
Windows Mobile wp230etat.dll
Linux wd230etat.so
Minimum required version
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment