Release 10.1A: OpenEdge Reporting:
Query/Results Administration and Development

> ## Results main application procedure

> Most of the discussion in this chapter focuses on calling other Progress 4GL procedures from Results. However, you can also integrate Results into an existing OpenEdge application. The main procedure for the Results application is `results.p`, located in the product directory (`DLC`). To run Results from another Progress 4GL procedure, use the following statement:

>     RUN results.p.

> If you run Results from a OpenEdge application that has its own application window, use the technique outlined in Example 3–6 to manage user focus and multiple windows:

> Example 3–6: Technique to manage user focus and multiple windows
>     /* Template Calling RESULTS from a OpenEdge application */
>     /* 1 */
>        DEFINE VARIABLE parentWin AS WIDGET-HANDLE NO-UNDO.
>     /* 2 */
>        ASSIGN
>         parentWin = CURRENT-WINDOW
>         parentWin:WINDOW-STATE = WINDOW-MINIMIZED
>         parentWin:SENSITIVE = FALSE.
>     /* 3 */
>        RUN results.p.
>        ASSIGN
>     /* 4 */
>        CURRENT-WINDOW = parentWin
>     /* 5 */
>         parentWin:WINDOW-STATE = WINDOW-NORMAL
>         parentWin:SENSITIVE = TRUE.

> The commented numbers refer to these notes:

> 1. Create a variable to hold the widget handle of the parent application window.

> 2. Place the widget handle of the parent application window into the new variable. The `CURRENT–WINDOW` session handle returns the widget handle of the parent application window.

> 3. Minimize the parent application window and disable it for user input while the procedure displays the Results application window.

> 4. Restore the `CURRENT–WINDOW` handle to the original window handle.

> 5. Restore the parent application window and enable it for user input after the user closes the Results application window.

> For more information about general programming concepts and techniques, see the OpenEdge Development: Progress 4GL Handbook . See the OpenEdge Development: Progress 4GL Reference for information about language elements in the Progress 4GL.

Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095