Release 10.1A: OpenEdge Reporting:
Report Builder Deployment

> ## Generating a list of reports

> You can generate a list of reports in a report library using the `aderb/_getname.p` procedure. This procedure also calculates the number of reports in the library.

> To generate a list of reports in a report library, use the following command in the Progress 4GL application:

>     RUN aderb/_getname.p (library-pathname, OUTPUT report-list,
>          OUTPUT report-count)

> The following list describes the arguments for the `_getname.p` procedure:

> ``library-pathname``

> The full path of the report library you want to read.

> ``report-list``

> The character variable that will display the report names as a comma separated list.

> ``report-count``

> The integer variable that will receive the number of reports in the library.

> For example, to list all the reports in the `acctslib` library and receive the number of reports in this library, run the `reptlist.p` procedure:

> reptlist.p
>     /* 1 */
>       DEF VAR report-list AS CHARACTER.
>       DEF VAR report-count AS INTEGER.
>       DEF VAR report AS CHAR VIEW-AS SELECTION-LIST INNER-LINES 10
>         INNER-CHARS 32.

>     /* 2 */
>       FORM "There were" report-count "Reports; please select one: "  SKIP
>         report
>         WITH FRAME x NO-LABELS.

>     /* 3 */
>       RUN aderb/_getname.p ("c:\acctslib.prl", OUTPUT report-list,
>         OUTPUT report-count).

>         report = ?.
>         report:list-items = report-list.
>         DISPLAY report-count WITH FRAME x.
>         UPDATE report WITH FRAME x.

> The commented numbers correspond to the following step-by-step descriptions:

> 1. Define the variables that will display the report names and the number of reports.

> 2. Format a selection list to display the list of report names.

> 3. Call the `_getname.p` procedure and specify first the report library, second, the variable in which to return the report names, and lastly, the variable in which to return the number of reports in the library.

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