PC SOFT

ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Home | Sign in | English EN
New WINDEV, WEBDEV and WINDEV Mobile 26 feature!
This content has been translated automatically. Click here to view the French version.
  • 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 <Report>.InitRequest.
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 <Report>.Print.

Important

If the query is created with the user version of the report editor, there is no need to use <Report>.InitRequestConnection 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
STAT_SchoolNewsletter.InitQueryConnection( hQueryNoCorrections, ...
"MyConnection_Oracle", "Doe", "1994")
// Print the report
STATE_SchoolNewsletter.Print()
Reports and QueriesUser code (UMC)AjaxNative Connectors (Native Accesses)
// Initialize the query (Oracle connection)
ETAT_BulletinScolaire.InitQueryConnection("MaConnexion_Oracle", "Dupond", "1994")
// Print the report
STATE_SchoolNewsletter.Print()
Syntax
<Report used>.InitQueryConnection([<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:
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 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 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 browsing the result are taken into account.
  • the magnifier is available on tables linked to a query.
  • hNbEnr 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 (<Source>.Add, <Source>.Write, <Source>.Modify, <Source>.Cross, <Source>.Delete), 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 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.
<Connection name>: Character string (with quotes)
Name of connection to a database. This Connection has been defined in the analysis editor or dynamically by the function 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 to a field of type "Internal Report" is based on a request handling a specific connection, use the <Report>.InitRequestConnection function to execute this request (and pass parameters to it if necessary). This function must be used in the event "Before printing" 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 <Report>.InitRequestConnection is greater than the number of parameters expected by the query, the additional parameters will be ignored.
Business / UI classification: Neutral code
Component: wd260etat.dll
Minimum version required
  • Version 26
This page is also available for…
Comments
Click [Add] to post a comment