HP 3000 Manuals

Report Painter [ HP ALLBASE/4GL Developer Reference Manual Vol. 1 ] MPE/iX 5.0 Documentation


HP ALLBASE/4GL Developer Reference Manual Vol. 1

Report Painter 

The report painter allows you to define the format of the report lines
and the fields to be printed in each line on a report.

To run the report painter, select the Painter option on the reports menu.
This starts the report painter and displays a prompt to allow you to
enter the report name.

The report painter then displays the report painter screen.

Screen Image 

[]
The report painter screen is divided into two parts. The upper part of the screen is a window that shows you part of the layout of the report. You can use the cursor control keys and the report painter function keys to paint report lines in this area. The display in the window can be scrolled horizontally and vertically. This allows you to see report lines, or parts of report lines that are outside the current window area. A ruler line above the window indicates the column numbers on the report page. A display-only field to the left of the painter window lists the report lines that you have defined with the report line header screen. The lower part of the report painter screen contains a number of data entry fields. You can enter the specification of the various report line fields in these screen fields. Refer to "Screen Descriptions" for the details of these fields. Two display-only fields in the lower part of the screen show the current cursor position and the length of the current field. The last two lines on the report painter screen are prompt lines. The display in this area prompts you for an input where appropriate, or indicates the next appropriate action. The report painter also displays error messages in this area of the screen. Cursor Movement You can move the cursor to any position on the defined report lines within the report painter window using the terminal keyboard cursor control keys cursor right, cursor left, cursor up, and cursor down. The new cursor position is only recognized when you press Return, Tab, or a function key. If you move the cursor to a position outside of the report painter window, the painter issues a warning message and places the cursor at the closest valid position within the window. Pressing cursor home, followed by Return, moves the cursor to the top left corner of the report. Pressing Shift and cursor home together, followed by Return, moves the cursor to the end of the last line defined on the report. Pressing Tab moves the cursor from field to field in the window. Pressing Shift and Tab together, followed by Return, moves the cursor from field to field in reverse order. Display Scrolling If you have defined more report lines than the window can accommodate vertically, or the report lines are longer than the window, you can scroll the window display vertically or horizontally. The Window Keys set of function keys control the scrolling of the report painter window. To call up the Window Keys function keys set, press the Window Keys function key. The painter responds by displaying the following function keys.
[]
The Up Window , Down Window , Left Window , and Right Window keys scroll the display in the selected direction. You can change the size of the scroll steps with the Set Horz. Scroll and Set Vert. Scroll function keys. To change the size of the scroll steps, press the appropriate set scroll function key. The painter responds by displaying a message requesting you to enter the new step size. Enter the required step size, and then press Return. The default scroll step sizes are two lines for vertical scrolling, and 10 characters for horizontal scrolling. The Centre Window function key centers the window vertically with respect to the number of report lines you have defined, and horizontally with respect to the length of the report lines. Report Painter Function Keys The report painter has a number of sets of function keys. The Main Keys function key set appears when the painter starts. Pressing the Window Keys , Field Keys , or More Keys function keys displays the other sets of function keys. The function keys and their actions are described below. Main Function Key Set. f1 Move Indicates to the report painter that you want to move the current field to a different location in the window. (Refer to Moving, Copying, and Deleting Fields.) f2 Copy Indicates to the report painter that you want to copy the current field to a different location in the window. (Refer to Moving, Copying, and Deleting Fields.) f3 End Function Indicates to the report painter that you want to terminate the current move or copy operation. (Refer to Moving, Copying, and Deleting Fields.) f4 Delete Indicates to the report painter that you want to delete the current field in the window. (Refer to Moving, Copying, and Deleting Fields.) f5 Window Keys Displays the Window Keys function keys, allowing you to scroll the display in the report painter window. f6 Field Keys Displays the Field Keys function keys, allowing you to create or modify output fields or dictionary fields on report lines. f7 More Keys Displays the More Keys function key set. f8 Exit Saves the current report line layout and terminates the report painter program. Window Keys Function Key Set. f1 Up Window Scrolls the report painter window up by the vertical scroll distance. (Default is two lines.) f2 Down Window Scrolls the report painter window down by the vertical scroll distance. (Default is two lines.) f3 Left Window Scrolls the report painter window to the left by the horizontal scroll distance. (Default is 10 characters.) f4 Right Window Scrolls the report painter window to the right by the horizontal scroll distance. (Default is 10 characters.) f5 Centre Window Centres the report painter window display vertically with respect to the number of report line types you have defined, and horizontally with respect to the defined line length. f6 Set Horz Scroll Allows you to change the size of the horizontal scrolling step. f7 Set Vert Scroll Allows you to change the size of the vertical scrolling step. f8 Main Keys Restores the report painter main keys function key set. Field Keys Function Key Set. f1 Create Field Indicates to the report painter that you want to create an output field at the current cursor location. f2 Modify Field Indicates to the report painter that you want to change the characteristics of the field at the current cursor position. f3 Dict. Field Indicates to the report painter that you want to create an output field using a dictionary field specification name at the current cursor location. f5 Enter Details Indicates to the report painter that you want to enter the details for the current report line field into the detail fields on the lower part of the report painter screen. When you press this key, the cursor moves to the Field Name/Literal screen field. f6 Commit Details Completes data entry in the detail fields and returns the cursor to the report painter window. f7 Original Details Restores the original field details in the detail fields, provided you haven't committed any changes for the details in these fields. f8 Main Keys Restores the report painter main keys function key set. More Keys Function Key Set. f1 Abort Painter Abandons the current report line layout, and terminates the report painter program. f4 Another Report Optionally allows you to save the current report layout, and then reinitializes the report painter to allow you to define another report layout. The painter prompts you for the name of the next report. f5 Identify Report Displays the name of the current report. f6 Refresh Window Repaints the image in the report painter window. f7 Avail. Space Displays the amount of space (in characters) between the current cursor position and the beginning of the next field on the same line, or the end of the report line if there are no other fields on the line. f8 Main Keys Returns you to the main function key set. Painting Report Lines All report lines except type C lines can contain literals, output fields, and dictionary fields. The procedure for defining a field depends on the type of field. Literal Fields. To define a literal field on a report line, move the cursor to the starting position for the literal, press Return, and type in the text for the literal. The report painter echoes your input on the screen. You can use the normal terminal keyboard control keys to insert characters, delete characters, or backspace in a literal field. Press Return to terminate the entry. When you're defining literal fields on a report line, you can only enter text up to the boundary of the window. If you want to enter a field that goes beyond the current window boundary, use the Window Keys function keys to set the position of the window before you define the field. Output Fields. To define an output field on a report line, move the cursor to the starting position of the field, and then press the Create Field function key. You can now specify the length and type of the field by entering a string of one of the characters shown in the following table. The number of characters you enter determines the length of the field and the actual character determines the type of field. Press Return to terminate the entry. Character Meaning A Alphanumeric field N Numeric field Z Suppressed zero numeric field For numeric output fields you can use the following additional codes to specify the way numbers are printed. Character Where Placed Meaning $ Start of field Print system currency symbol before the value ., Where needed Numeric punctuation ( ) Surrounding field Print brackets around the value if it is negative CR End of field Print CR after the value if it is negative DR End of field Print DR after the value if it is positive - Start of field Print - before first digit if the value is negative - End of field Print - after last digit is the value is negative If numeric overflow occurs while a report is being printed, the field is filled with asterisks (****). Press the Enter Details function key to enter the details for the report line output field. This moves the cursor to the Field Name/Literal screen field where you can enter the name of the HP ALLBASE/4GL entity to be printed in the report line field. Refer to Screen Field Descriptions for details of the acceptable entries in this field and the other fields in this part of the screen. Press the Commit Details function key when you have completed your entries in the detail fields. This action commits the data that you have entered for this report line field, and returns the cursor to the window to allow you to define further report line fields. Dictionary Fields. To create an output field using a dictionary field specification name, move the cursor to the starting point for the field and press the Dict. Field function key. The painter prompts you for the field specification name. When you enter the name, the report painter retrieves the field specification from the dictionary and creates a field of the appropriate length and type at the cursor location. The painter assumes that you want to reference the field on the default record of the primary report file, and creates the appropriate file record field reference in the Field Name/Literal screen field. You can alter this reference if you require. The painter also retrieves the edit code and justification code for the field specification from the dictionary. Moving, Copying and Deleting Fields. The report painter allows you to move fields, copy fields, or delete fields in the window area. To move or copy a field, move the cursor to the field, and then press the Move or Copy function key. The painter then asks you to move the cursor to the desired location for the new field. Press Return to complete the move. You cannot move or copy an output field to a type C line group. To delete a field, move the cursor to the field, and press the Delete function key. The painter responds with a message asking you to confirm the deletion. Enter Y to confirm the deletion. Any other entry cancels the delete command. Saving Reports When you have defined all the fields for the report, press the Exit function key to save the report layout and terminate the painter program. Pressing the Another Report function key allows you to optionally save the current report, and then continue with another report. Screen Field Descriptions The following paragraphs describe the data entry fields on the lower part of the report painter screen. Refer to Painting Report Lines for details of the procedure for creating report line fields. Current Field Length A display-only field that shows the length of the current field in characters. Current Cursor Position A display-only field that shows the position of the cursor on the current report line. Field Name/Literal For an output field on the report line, this field allows you to enter the name of the item to be printed. If you have already defined the output field on the report line, this field displays the item name. The permissible entries in this field are: * Title name. * Numeric or alphanumeric constant. * Variable or calculated item. * screen field reference. * scratch-pad field reference. * file record field reference. * work area field reference. * communication area field. You cannot use synonyms for communication area field names. If the report line field is a literal, this screen field displays the message: Literal - See line format. Edit Code. Enter the edit code for an output field on the report line. Refer to chapter 3 for details of the edit codes. The entry in this field defaults to the following values: X for alphanumeric report line fields N for unsigned numeric report line fields S for signed numeric report line fields Justification. Enter the justification code for the report line field. Refer to chapter 3 for an explanation of the justification codes. Underline. The entry in this field specifies the print line highlighting applied to the field. The report generator highlights report line fields by printing a line of hyphens above (Prior to) the field, below the field (After), or both above and below the field. The entries for this field are: P Print hyphens above field A Print hyphens below field B Print hyphens above and below field Total Number. The entry in this field specifies which of the communication area fields *TOTALS(1) to *TOTALS(16) is used to accumulate the total for this report line field (numeric fields only). Leave this screen field blank if you don't want to accumulate totals for the report line field. You cannot accumulate totals for fields that are on type T lines. Pad Character. Enter a character used to replace spaces at the beginning or end of the report line field. This field defaults to a blank. Print Field Control. The entry in this field controls when the report line field is printed. Enter A to specify that the field is always printed. Enter C to specify that the field is only printed when its value changes or at the start of a new page. Cross Add Number. Optional. Enter a number between 1 and 5 to specify the *CROSS field used to accumulate the contents of this report line field (numeric fields only). The cross-add fields accumulate totals across one physical print line only. They are reset immediately after the line is printed.


MPE/iX 5.0 Documentation