Defining a Detail file

Each form or report can also have detail files. A detail file is a file with a one-to-many relation from the primary file. Defining a detail file for a program lets you access data from a one-to-many related file.

For example, the file Dependents has a one-to-many relation from the file Employee. Therefore, you can define a program in which Employee is the primary file and Dependents is the detail file. This program can access and update information from both the Employee and Dependents files, and all files with a one-to-one relation from these two files.

Note: For online and inquiry programs, select the detail relation before painting the form. If you select a detail relation after you start painting the form, the system erases the form.

To define a detail file

  1. On the Database Structure-Program Structure form, press Define (F6) and choose Detail.

    The system highlights the one-to-many relations of the primary file.

  2. Choose the detail file.

    (Use the right and left arrow keys to highlight the box with the desired detail relation, then press Mark or OK.)

    The detail file appears beneath the primary file in the Program Structure area of the form.

  3. Paint the detail file.

    To paint a detail form, see Painting a Detail Form. To paint a detail report, see Painting a Report.