Trigger LANSA Client queries from a report
|Abstract:||Triggering queries from a report|
|Submitted By:||Marjanna Frank|
To "refresh" the data in a report with data that is already retrieved with LANSA Client from the AS/400 or NT server, simply press the lightning bolt button in a report.
However, to trigger a query from a report which should run to retrieve data from the AS/400 or NT server, the following techniques may prove handy:
One or more queries can be triggered from a report, by embedding links to the required queries in the report header and clicking on these links. Typically the user would choose to have the links displayed as an icon. This technique of embedding links to other objects is called Object Linking and Embedding (OLE).
When the link is clicked, the indicated LANSA Client query will execute in run-time mode. If the query was designed to prompt for selection criteria, a prompt will apear asking the user to enter these. If the query was designed to save the results to a file, then the report can be executed as soon as the query is finished. If the query was designed to display the query results in a Window, then save these results to a file before executing the report.
It is best to place query links in a report header, because other report sections are repeated multiple times in a report.
To avoid displaying the links in the report results, then suppress their display by selecting the "Suppress" option in the Format Object dialog box. It will still be possible to click on the link in the Design View of the report.