Ad Hoc Reporting

The Ad Hoc Report Writer lets you run report programs interpretively (that is, you do not have to compile the program) using data from the local database (the server) or from the database on another server. You can display or print the report output, or write it to a file. You can also write the output in a comma-separated value (CSV) format that you can import to a spreadsheet program.

You can save parameters that you use to run a report with the Ad Hoc Report Writer under a request name, making it possible to retrieve them later. If you save the report parameters under a request name, you can also run a report interpretively at the command line using the execrpt command.

Interpreting (prototyping) a report lets you view report presentation and test report functionality before you generate and compile the source code. You run the report using the report definition. Any functions performed by interpreting a report update the database.

To run a report

  1. On the Program Definition form, select the program you want to interpret.

    - or -

    On the Database Structure-Program Structure form, select the report you want to interpret.

  2. Press Action (F4) (on the Program Definition form) or Action (F8) (on the Database Structure-Program Structure form) and choose Run.
  3. If the product line has more than one server (Local and Midrange) defined for it, the Select Server window appears. Choose a server.
  4. On the Report Parameter Entry form, type the required parameters.
  5. If desired, you can set record and time limits for this report run. Press Define (F6) and choose Limits.

    In the Limits window, type the desired limits and press OK.

  6. Press OK to display the report output.

    - or -

    Press Send (F8) and choose one of the following output options.

    Choose To
    Form Display the report output using the lashow utility. (This option is the same as pressing OK.)
    File Write the report output to a file. In the File Name window, type the file name to which you want the output sent, then press OK.
    Printer Write the report output to a printer.
    Spreadsheet Write the report output in a comma-separated value (CSV) format for importing to a spreadsheet program. In the File Name window, type the file name you want the output sent to, and press OK.
  7. Press Exit to return to the Report Parameter Entry form.
  8. Press Exit again to return to the form from which you ran the report.