PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • Internal Report control: report based on a query with parameters
  • Running a query and report based on this query
  • Freeing the query
  • 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 (for a query with parameters). This function can be called:
Notes:
  • 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 is using a specific connection (connection to a database via an OLE DB provider for example), use iInitReportQueryConnection.
  • Versions 16 and later
    If the report is included in a composite report, iInitReportQuery must necessarily be called in the initialization code of report.
    New in version 16
    If the report is included in a composite report, iInitReportQuery must necessarily be called in the initialization code of report.
    If the report is included in a composite report, iInitReportQuery must necessarily be called in the initialization code of report.
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 Print 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 Print 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 Print 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 Reports & Queries, there is no need to use iInitReportQuery to specify the query parameters. Indeed, when a report based on a query with parameters is run from Reports & Queries, a window allows you to enter the query parameters.
iInitReportQuery(RPT_SchoolReport, "Doe", "1994")
iPrintReport(RPT_SchoolReport)
Syntax
iInitReportQuery(<Report Name> [, <Parameter 1 of Query>, ...  [ , <Parameter N of Query>]])
<Report Name>: Character string (with or without quotes)
Logical name of report to print.
<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 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" process of the block containing the "Internal report" control.
See Internal Report control for more details.

Running a query and report based on this query

When printing a report based on a query, the query is not re-run if it was already run. To force the query to be re-run (addition of records for example), all you have to do is call 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).

Various

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