ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Standard functions / Print functions
  • Internal Report control: report based on a query with parameters
  • Executing a query and a report based on this query
  • Freeing the query
  • 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 (for a query with parameters). This function can be called:
  • in the "Initialization" event of the report,
  • before iPrintReport.
Remarks:
  • If the report is linked to a query with no parameter, use iPrintReport.
  • If the report is linked to a query (with or without parameters) that uses a specific connection (connection to a database via an OLE DB provider for example), use iInitReportQueryConnection.
  • If the report is included in a composite report, iInitReportQuery must be called in the "Initialization" event of the report.
Linux Caution: A specific configuration is required to use this function in Linux. For more details, see Print in Linux.
If the query is created with Reports & Queries, it is not necessary to use iInitReportQuery to specify the query parameters. When a report based on a query with parameters is executed from Reports & Queries, a window allows you to enter the query parameters.
iInitReportQuery(RPT_SchoolReport, "Doe", "2020")
iPrintReport(RPT_SchoolReport)
Syntax
iInitReportQuery(<Report used> [, <Parameter 1 of the query> [... [, <Parameter N of the query>]]])
<Report used>: Name of a report
Logical name of the report to be printed.
<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 Report control: report based on a query with parameters

If the report associated with an "Internal Report" control is based on a query with parameters, use iInitReportQuery to pass the parameters to the query. 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.

Executing a query and a report based on this query

When printing a report based on a query, if the query has already been executed, it is not executed again. To force the re-execution of the query (add records, for example), simply use HExecuteQuery or iInitReportQuery.

Freeing the query

When printing a report based on a query initialized by iInitReportQuery, the query is freed at the end of the report print (behavior identical to the call to HCancelDeclaration).

Miscellaneous

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

Last update: 12/13/2023

Send a report | Local help