|
|
|
|
|
- Overview
- How to?
- Control in a window or page: switching from embedded mode to independent mode
- Report based on an embedded query: Switching from the embedded mode to the independent mode
- Handling an item of the embedded query through programming
- How to use the independent or embedded queries?
- In the page editor or the window editor: Summary table
- In the report editor: Summary table
Query creation mode: independent or embedded query
Not available with this kind of connection
The query editor proposes two methods for creating a query: - creating the query in the query editor:
- Click in the quick access buttons.
- The creation window appears: click "Queries" and select the type of query to create.
This query corresponds to a project element (".WDR" file) and it can be used as data source for a report, a window control or a page control (List Box, Combo Box or Table control), through programming, in another query, ... The query is independent.
- creating the query when creating the ListView, Table or report based on this query ("A query that I want to define now" in the control or report creation wizard). No specific file is created. The query is embedded.
An embedded query cannot be used as data source for an element (report, ...) other than the one where this query was created. Control in a window or page: switching from embedded mode to independent mode To extract a query from a window control or from a page control: - Display the window or the page in the editor.
- Select the control based on an embedded query.
- Select "Embedded query .. Open the associated query" in the context menu of the control.
Caution: the window or the page must have been saved at least once. - The query editor is opened and the query graph is displayed. On the "Home" tab, in the "General" group, expand "Save" and select "Export .. To an independent query".
- Save the new query. The query now is an independent query. It can be used in all the windows, pages and reports of your project.
Report based on an embedded query: Switching from the embedded mode to the independent mode To extract a query from a report: - Display the report on embedded query (in the report editor).
- Select "Edit the query" in the context menu of report. The query is displayed in the query editor. Caution: the report must be saved at least once.
- On the "Home" tab, in the "General" group, expand "Save" and select "Export .. To an independent query".
- Save the new query. The query now is an independent query.
Handling an item of the embedded query through programming To access an item from the embedded query from the code of the control or the report, use the following syntax: The MySource keyword is mainly used to handle the parameters of an embedded query (in reports, Combo Box, List Box and browsing Table controls). Remark: MySource must not be used in the control initialization code or in the report opening code. How to use the independent or embedded queries? In the report editor: Summary table | | | Query type | Embedded query | Independent query |
---|
Initialization function | Query without parameter: iInitReportQuery
Query with parameters: The parameters must be specified: | HExecuteQuery, iInitReportQuery | Function used to pass the hQueryWithoutCorrection constant | Transform the embedded query into an independent query | HExecuteQuery |
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|