7.2 Maintaining Reportfiles

A text reportfile is created or maintained by a text editor. A text reportfile contains Report Writer code as detailed in Chapter 10, Report Writer Programming Reference. The user selects the text editor by setting the environment variable EDITOR to the command name of an appropriate text editor. With the EDITOR environment variable set, you can create or modify text reportfiles with the C/Base programs:

gifs/20000000.gif toolkit(C-1)

gifs/20000000.gif rptedit(C-1)

In addition, the text editor selected can be used directly on a reportfile that is maintained in text format.

A visual reportfile is created or maintained on the screen with a visual report editor. The visual report editor edits the layout of report as it would be shown when the report is run.

You can create or modify visual reportfiles with the following C/Base programs:

gifs/20000000.gif toolkit(C-1)

gifs/20000000.gif rptedit(C-1)

gifs/20000000.gif wtrdef(C-1)

When creating a reportfile with either rptedit or toolkit, you must choose whether the new report is to be a visual or text report.

Toolkit is a menu driven interactive environment for creating and modifying C/Base applications. Besides working with reports, toolkit also lets you create or modify RMSfiles, formfiles, and menus. Toolkit uses rptedit to create or modify visual and text reportfiles.

Rptedit creates or modifies reportfiles as well as add new logical reportfile entries to the reportfile catalog. Rptedit uses wtrdef to actually create or edit a visual reportfile. When creating or editing a text reportfile, rptedit uses a text editor specified by the environment variable EDITOR. When editing an existing reportfile, rptedit determines whether the report should be edited with wtrdef or the text editor.

Wtrdef is required when editing visual reportfiles. When creating a visual report, you can quickly and easily draw report layouts directly on the screen exactly as they are to look when the report is run. Normally, you will use toolkit or rptedit instead of using wtrdef directly.

This chapter explains how to create new visual reports with toolkit, rptedit, or wtrdef. As in the case of filedef(C-1) and formdef(C-1), you have already been introduced to the underlying workings of wtrdef via the C/Base Tutorial Manual. For a description of a text reportfile, see Chapter 10, Report Writer Programming Reference.