Creating the ORD_HEADER Procedure

1. Specify a new data-entry program called MYPROG7

2. Add an interactive data entry procedure called ORD_HEADER to your program

3. For Main Table Processing, specify:

·   ORDER_HEADER as the table to process

·   the default Normal as the access mode

·   the default Always offer scan as the search method

·   the default Main Index as the search index

4. Generate parent checking; access is required to information from the CUSTOMER table. Ensure that the access mode is Check parent and that the search method is Scan if no match

5. Design the main screen like this:

where the fields are:

Number

Fieldname

1

ORDER_NUMBER

2

CUSTOMER_NUMBER

3

NAME

4

DELIVERY_DATE

5

ADDRESS

7

CREDIT_LIMIT

8

BALANCE

10

ORDER_DATE

11

ORDER_TIME

12

ORDER_VALUE

Double-click on the map to bring up its properties and:

·   make it a pop-up window

·   tick the title bar box

·   make the field layout 5 rows by 3 columns

6. Add an attachment field (field number 102) in the bottom left-hand corner. This is where a map showing order lines will be displayed by the other procedure.

7. The screen colours can be chosen for each control by double clicking on the particular control, choosing the Colour tab in the menu bar and clicking on the colour scheme drop down arrow. A list of schemes is presented which define the attributes for the control, these can be altered using the colour scheme editor which is located under the options selection in the menu bar.

Bring up the editor and select button as the type of control to change. Accept the defaults for a new scheme based on Button Controls (Default). You will notice by changing the type, the attributes for that control are shown below.
Buttons have face, face when active, button text and several more colours. On the right side of the dialog, there is a tabbed menu bar and below this several colours:
To change attribute colours, click on the attribute on the left and then on the chosen colour on the right. Your colour change will be reflected in the sample button shown at the bottom left corner of the dialog.
If you click on the DP4 tab on the right hand side, a list of colours appears; you can scroll through this using the arrow icons.
For example, to change the button face to yellow:

a) click on the face box

b) click on the DP4 tab

c) click on the right arrow until the screen which contains the yellow option appears, click on it and the sample button face will turn yellow.

8. In map properties, make sure that you set up 5 rows of 3 columns for the map. To display the map at the top of screen, which is the requirement, select the appropriate Output method option on the SCREEN DESIGN menu

9. For field processing, specify:

Step number

Input Field?

Table

Field

1

Yes

ORDER_HEADER

ORDER_NUMBER

2

Yes

ORDER_HEADER

CUSTOMER_NUMBER

3

No

CUSTOMER

NAME

4

Yes

ORDER_HEADER

DELIVERY_DATE

5

No

CUSTOMER

ADDRESS[1..3]

6

No

CUSTOMER

CREDIT_LIMIT

7

No

CUSTOMER

BALANCE

8

Yes

ORDER_HEADER

ORDER_DATE

9

Yes

ORDER_HEADER

ORDER_TIME

10

No

ORDER_HEADER

ORDER_VALUE