HP 3000 Manuals

Task 3 - Painting the Product Report [ HP ALLBASE/4GL Developer Self-Paced Training Guide ] MPE/iX 5.0 Documentation


HP ALLBASE/4GL Developer Self-Paced Training Guide

Task 3 - Painting the Product Report 

The following layout shows the report you are about to paint.

              1         2         3         4         5         6         7         8

     P1.01:                           Product File Details             Page: NNNN
     P1.02:                                                            Date: AAAAAAAA

     C1.01:   Product   Description                     Supplier  Lead Time

     D1.01:   AAAAAA
     D1.02:             AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA   NNNNNN    NN Days

     TF.01:   Total Number of Products   NNNN

The following pages describe the procedure for creating this report
layout.

Step 1 - Entering Text Items 

As with the screen painter, you create text items on a report by simply
positioning the cursor at the beginning of the item, pressing Return and
entering the required text.  The painter automatically recognizes the
entered text as a literal.

You must have sufficient space in the window to enter a text item.  You
cannot create a text item that is longer than the width of the window,
but you can create two text items that span across two windows for long
report headings.

The first text item you need to enter on this report extends from column
33 to column 52.  To create this item, this range of columns must be
visible in the current window.  Enter the text items by following these
steps.

To enter the text items for header lines: 

Action                    Explanation 

------------------------------------------------------------------------------

Press cursor home and     The top left section of the report is displayed in
then press Return         the window.

Press  Window Keys        The window keys function keys are displayed.

Press  Right   Window     This moves the window 10 columns to the right.
                          This displays the range of columns needed to input
                          the next text item.

Press cursor right        Keep doing this until the cursor is located in
                          report column 33.  (The current cursor position
                          field contains the number of the column the cursor
                          is currently positioned at.  This field is at the
                          right hand side of the screen, just below the paint
                          region.  You must press Return to update this
                          cursor position display field.

          Table 6-0.  (cont.) 

Action                    Explanation 
------------------------------------------------------------------------------

Press Return              The painter enters the text input mode.  (The
                          screen shows an underline where you can input
                          text.)

Type Product File Details

Press Return              This terminates the entry of the text item.

Press Shift+cursor home   The bottom right section of the report is displayed
and then press Return     in the window.

Press cursor up           Keep pressing this key until the cursor is located
                          on line P1.01.

Press cursor left         Keep pressing this key until the cursor is located
                          at column 65.

Press Return              This updates the cursor position display.  The
                          painter enters text input mode.

Enter Page:

Move to P1.02 col 65

Press Return 

Enter Date:

This completes the entries for the text items that appear on the two
header lines of the report.

Now you can enter the remaining text items for the C1.01, D1.02, and
TF.01 lines.

To enter the text items for the remainder of the 
report: 

   1.  Use the cursor keys to move the cursor about the window.

   2.  Use the window keys to move about the report when you hit the
       window edge.

   3.  Use the cursor positions listed below as a guide.

Line Group   Text                      Cursor Position 

----------------------------------------------------------------------

C1.01        Product                                003
             Description                
             Supplier                               013
             Lead Time                  
                                                    045

                                                    057

D1.02        Days                                   061

TF.01        Total Number of Products               003

Step 2 - Defining Data Fields 

Next, you need to create the data fields on the report.  This can be done
in a number of ways with the field keys.

To create data fields: 

   1.  Position the cursor at line P1.01, column 71.

   2.  Return to the main function key set and press the  Field Keys  
       function key.

       The following function keys are displayed:

[]
Field Keys The Create Field and Dict. Field function keys allow you to define data fields on the report line. The function keys Enter Details , Commit Details , and Original Details allow you to define the data that is printed in the field and any formatting or totalling that is required for this field. 3. With the cursor still at line P1.01, column 71, complete the following steps. Action Explanation ------------------------------------------------------------------------------ Press Create Field An inverse video area extends to the right of the cursor in the report painter window. Type NNNN This specifies a numeric field 4 digits long. Press Return This completes entry to the field. HP ALLBASE/4GL should display the message: Item passed validation The character you use to define the field identifies the type of data that the field can contain. You can use the following characters: Character Field Type A Alphanumeric N Numeric Z Zero suppressed numeric The message that you receive confirms that you have entered a valid field definition. Now enter the details for this field using the Enter Details function key. 1. Position the cursor anywhere on the field (the current field will be highlighted) and press the Enter Details function key. The painter moves the cursor to the Field Name/Literal field in the lower portion of the screen. 2. Now step through the fields and make the necessary entries. To enter the field details: Field Entry Explanation --------------------------------------------------------------------------------------- Field Name/Literal *PAGENO Specifies the source of data for the report field. In this case, it is the communication area field *PAGENO. This field contains the number of the report page currently being printed. You will notice that when the current report field is a literal, this field contains a message: Literal - see line format. Edit Code Accept the default. This field has the same meaning as any other HP ALLBASE/4GL edit code field. The value in this field defaults to either N or X depending on the character you used to paint the field. Justification Accept the default. This defaults to a standard justification code depending on the character used to paint the field. Pad Character 0 (zero) This character fills blank spaces in the field after it has been justified in the correct direction. Table 6-0. (cont.) Field Entry Explanation --------------------------------------------------------------------------------------- Underline Leave blank. This is similar in meaning to the same field on the report line header screen. However, the underlining or overlining defined here only applies to this report line field, not to all the fields on the line. Print Field Control Accept the default. This entry defines when this field should be printed. A means always, or each time the line is printed. C means only when the value in the field changes. This feature is useful in the detail lines (D1 - D9), since printing the information for a field only when its value changes makes the report appear less cluttered. Total Number Leave blank. The automatic totalling facility for totalling fields down the report. The number you enter here relates to the communication area fields *TOTALS(1) to *TOTALS(16). When left blank it indicates that no totalling takes place for this field. Cross Add Number Leave blank. The automatic totalling facility for use across the print line. The number you enter here relates to the communication area fields *CROSS(1) to *CROSS(5). When left blank it indicates that no totalling takes place for this field. To complete and commit this field: 1. Having entered the details for this report line field, commit them by pressing the Commit Details function key. The painter returns the cursor to the report line field. The details for the field remain displayed. 2. To display the details for a field, press Return while the cursor is on the field. In Summary. * To enter details for a field press the Enter Details function key while the cursor is on the appropriate report line field. * To return to the painter mode, press the Commit Details function key to accept the values you have entered, or press the Original Details function key to abandon that entry of field details. * The field's original details will be restored after you press the Original Details function key. To create the field that displays the print date: Now you are ready to create the field that will display the print date for the report. Position the cursor at line P1.02, column 71 and perform the following steps: Action Explanation ------------------------------------------------------------------------------ Press Create Field An inverse video area extends to the right of the cursor in the painter window. Type AAAAAAAA This specifies an alphanumeric field 8 characters long. Press Return The painter displays the message: Item passed validation. Press Enter Details This will move the cursor to the field details portion of the screen. Enter *DATE This is a reference to the communications area field that contains the current formatted date. Enter D in the edit code This formats the date according to the system wide field. date format. Press Commit Details No further details are needed for this field. Commit the details for this field and return the cursor to the painter window. The page heading and column heading lines are now complete. You can now complete the total line. 1. Position the cursor at line TF.01, column 32 and create a four digit numeric field that refers to the communication area field *COUNT(1). This field maintains a count of the number of times the D1.01 line is printed. The fields for the D1 lines will be created by referring to the dictionary field specifications. Creating Fields Using Dictionary Field Specifications. You can create a data field on a report using a dictionary field specification name. The painter creates a field of the appropriate length and type. The painter also automatically constructs a data source field for the report line field. If the source field is not correct, you can easily correct it. This is the prompt you will see when entering the field specification name:
[]
Dictionary Specifications Window To enter fields using dictionary specifications window: 1. Position the cursor at line D1.01, column 3. You will have to display the window function keys, and use them, to move to this position. 2. Then perform the following steps from the Field Keys function key set: Action Explanation ------------------------------------------------------------------------------ Press Dict Field You are prompted to enter the name of a dictionary field specification. Type product_no This is the dictionary field specification name for this report field. Press Return The report painter automatically creates a field of the appropriate length and type on the screen. It creates a data source in the Field Name/Literal field. This field source defaults to the form F-field name.primary file name. In this case the source created will be F-product_no.product. This is exactly what you require, so the report line field is complete. To complete the remaining lines: 1. Position the cursor at line D1.02, column 13 and follow the same procedure to create a field using the field specification name description. 2. Position the cursor at line D1.02, column 46 and create a field using the field specification name supplier_no. 3. Now create the last field on this report. At line D1.02, column 58, create a field using the field specification name lead_time. This completes the painting of this report. Step 3 - Saving the Report To save this report image: 1. Return to the main set of function keys by pressing the Main Keys function key. 2. Then press the Exit function key. This automatically saves the report under the name that it was called up with. You are then returned to the Reports Menu. Now generate this report as explained in the next lesson.


MPE/iX 5.0 Documentation