Previous Topic: Selecting a Report DesignNext Topic: Retrieving a Report Design from DDS Source


Generating DDS for a Report Design

The utility Create Report Design DDS (YCRTRPTDDS), creates the Database Description Specifications (DDS) for a print file directly from a Toolkit report design. The generate function is interactive, and allows you both to specify how a report design is to be broken up into formats, and to give names to the fields on each format. The source generated is standardized, and includes features such as a banner, and a reference to a field reference file.

The Create Report Design DDS utility is very similar to the equivalent Toolkit Create Panel Design DDS utility (YCRTPNLDDS).

  1. You enter the YCRTRPTDDS program, specifying the name of the report design that is to be processed, and the name of the source file that is to receive the generated source:

YCRTRPTDDS REPORT(ALSTSTKVAL) SRCFILE(QDDSSRC)

The YCRTRPTDDS program displays the design image that has previously been entered using the Work with Report Design (YWRKRPT) command.

When the format area has been marked out, press F09 to add field details for the format.

For each format, press F09 to show a second display which allows you to specify the name of the format and the name of the fields on the format:

When you press Enter, you will be prompted to confirm that the details are correct. When you confirm the prompt, the source for the format will be generated.

Repeat the process for each format on the report design.

When the format area has been marked out, press F09 to add field details for the format:

  1. The following listing shows sample DDS source as would be generated by the YCRTRPTDDS utility. In addition to generating code for the format and field details in the report design, the YCRTRPTDDS program also generates all the appropriate supporting code and comments. The default values set up with the YEDTDSNDFT command are used to obtain such attributes of the code as can be standardized, such as the name of the field reference file.

The following diagram shows the main interconnections between the displays of the Toolkit Create Report Design DDS program.