HP 3000 Manuals

Positioning and Editing Items [ HP ALLBASE/BRW Reference Manual ] MPE/iX 5.0 Documentation


HP ALLBASE/BRW Reference Manual

Positioning and Editing Items 

Item values can be printed anywhere in the lineset, as long as there is
no overlap with text or other items.  HP ALLBASE/BRW provides a variety
of editing capabilities for item values.

You can position and edit items, array items, and parameters.

As indicated in the task description earlier in this chapter, HP
ALLBASE/BRW provides defaults if you omit line and length in an item
specification.

Printing Array Items 

You can print array items (also called array components) by adding the
array index to the array name when you list the item on the Define Lines
screen.

Example:  Printing array items 

In this example, the array item is TURNOVER and the index is (6).

	       Click here to view figure.
            

If you omit the array index on the Define Lines screen, the first array
component is printed, with the following exceptions:

   *   If you specify a column calculation for the array name without an
       index, the aggregate of all the array components is used in the
       calculation.

   *   If an array name without an index is included in an output file,
       the entire array (that is, all the array components) is output.

For more information, see "Arrays and Array Items" in Chapter 15 , the
"Layout Calculations" section in this chapter, and the "About Output
Files" section in Chapter 12 .

Printing Parameters 

You can print single value parameters just as you can print any other
item.  Specify the parameter name preceded by a question mark.

Example:  Printing single value parameters 

In this example, the parameter ?MONTH is positioned as shown below:

	       Click here to view figure.
            

Suppressing Repeating Item Values 

You can make a tabular report more readable by omitting its redundant
elements.

For an item in a detail lineset, you can define that it is only to be
printed for the first detail within a certain break by typing the break
level in the SuppRep field of the Detail Lines screen:

	       Click here to view figure.
            

Example:  Suppressing lines 

Suppose your report, without suppressing lines, looks like this:
___________________________________________
|                                         |
|     Sales Area    Customer              |
|     ----------    ------------------    |
|     North         Hillside Market       |
|     North         Kingsford Shirt Shop  |
|     North         Mineshaft Supplies    |
|     South         Better Bedrooms       |
|     South         Jack Frost Company    |
|     South         Nice 'N Light Creamery|
___________________________________________

            

You can suppress the SALES-AREA item on the break level that changes when
the Sales Area changes.  The resulting report would look like this:
___________________________________________
|                                         |
|     Sales Area    Customer              |
|     ----------    ------------------    |
|     North         Hillside Market       |
|                   Kingsford Shirt Shop  |
|                   Mineshaft Supplies    |
|     South         Better Bedrooms       |
|                   Jack Frost Company    |
|                   Nice 'N Light Creamery|
___________________________________________

            

Editing Items 

You can specify rules for editing item values before they are printed.
Rules are defined on the Item Edits screen.

To edit an item 

   1.  At the Define Lines screen, choose other keys and then choose Item
       Edits.

   2.  A prompt asks you to type the name of the item to be edited:

            Type the item edit name

   3.  Press Enter.

If the item is a string, the String Item Edit screen appears.

	       Click here to view figure.
            

If the item is a numeric, the Numeric Item Edit screen appears.

	       Click here to view figure.
            

String item edits and numeric item edits are described in the next
sections.


NOTE Upper-and lower-case characters are treated literally in edit masks.
Editing items is optional. You need not explicitly supply item edits for all items. HP ALLBASE/BRW copies the default item edits from the configuration file, once you have specified an item on the Define Lines screen. This default item edit is displayed automatically on the Item Edits screen for an item. See Chapter 17 if you want to alter the default edit mask. Item edits are performed in the sequence in which the edits are displayed on the screen. For instance, in the example of a string item edit (following), a string value is shifted to all upper-case characters, then edited with the edit mask and, finally, right justified. String Item Edits To edit string items 1. From the Define Lines screen, choose Item Edits. * For unedited printing, leave the Edit Mask field blank. * For edited printing, you can: 2. specify the letters in the string as all uppercase, all lower-case or initial capitals; 3. use an edit mask to include additional characters in the string. For example, you can use the edit mask XX-XXX-X (shown on the next screen example) to print the product number 61288f as 61-288-f. Click here to view figure. Note that string values are truncated on the right without warning if the print field is not large enough or if the edit mask does not contain enough X characters. Numeric and Integer Item Edits. Items of types N and I need an edit mask for printing. However, the default edit mask is often all that is needed. To change the default edit masks, see Chapter 17, "Configuration and Security." Numeric item edits are defined at the Numeric Item Edits screen. Click here to view figure. If you do not want the default item edits, you can explicitly do one of these types of edits: * Scale the number. This means moving the decimal point to the left, or to the right (if the scaling is negative). You can also define how many decimal places are to be appended to the scaled number and whether the scaling is to round (R), truncate (T) or ceil (C) the original number. This section of the Numeric Item Edits screen illustrates scaling: Click here to view figure. --------------------------------------------------------------------------------------------- | | | | Original Values | Edited Values | | | | --------------------------------------------------------------------------------------------- | | | | 5893100 | 5.9 | | | | | 56999067.89 | 57.0 | | | | | 9989871.21444 | 10.0 | | | | | 57248971.89 | 57.2 | | | | --------------------------------------------------------------------------------------------- * Define a prefix and a suffix for both positive and negative numbers. For example, this Numeric Item Edits screen shows a prefix assigned to the item for the positive as well as the negative instance of the value. Click here to view figure. This table shows the result of a suffix edit on a positive and a negative value. --------------------------------------------------------------------------------------------- | | | | Original Values | Edited Values | | | | --------------------------------------------------------------------------------------------- | | | | -12.37 | Cr 12.37 | | | | | +50.92 | Dr 50.92 | | | | --------------------------------------------------------------------------------------------- * Define an edit mask to print the number with or without leading and trailing zeros (in the fraction part). You can define symbols for decimal and thousands characters, or you can have the words "millions" and "thousands" written out instead of the single character. The following example shows how the edit mask is specified: Click here to view figure. --------------------------------------------------------------------------------------------- | | | | Original Values | Edited Values | | | | --------------------------------------------------------------------------------------------- | | | | 720.50 | 720.50 | | | | | 132720.00 | 132,720.00 | | | | --------------------------------------------------------------------------------------------- * Specify a value to print a zero number as dashes or blanks instead of zeroes, as shown below: Click here to view figure. --------------------------------------------------------------------------------------------- | | | | Original Values | Edited Values | | | | --------------------------------------------------------------------------------------------- | | | | 0 | -----.-- | | | | --------------------------------------------------------------------------------------------- Real Item Edits See the screen Real Item Edits in Chapter 16 for a description of how you can print Real Items. Date Item Edits Date items always need an edit mask for printing. If you do not want the default item edits, you can specify another edit mask to print the date item, as shown here: Click here to view figure. Time Item Edits Time items always need an edit mask for printing. If you do not want the default item edits, you can specify another edit mask to print the time item, as shown here: Click here to view figure. Justify And Prefill You also can specify justification and prefill item edits for all types of items. Edits performed after the above string, numeric, date or time item edits are: * The edited item value is justified left, right, or it is centered in the print field. * The edited item value is prefilled from the left with a character you supply, as shown here: Click here to view figure. --------------------------------------------------------------------------------------------- | | | | Value | Results In: | | | | --------------------------------------------------------------------------------------------- | | | | 50 | ***50.00 | | | | --------------------------------------------------------------------------------------------- Item Edits For Exception Cases NO_VALUE and error values (see Chapter 15, "Calculations") do not permit item edits to be performed and require default edits. System defaults for these edits are described in Chapter 17, "Configuration". These and other exception cases are described below: * NO_VALUE is edited by filling the print field with the default no-value character. * Error values are edited by filling the print field with the default error-value character. * Numeric field overflow occurs if the number is too large to be expressed with the desired edit mask. In that case, the print field is filled with the default field-overflow character. Below is a sample report in which exception cases are illustrated: __________________________________________________________ | | | | | Customer No. Inv. No. Amount AMT-Due Paid-AMT| | | | ------------ -------- ------ ------- -------- | | | | 10000 IN5378 200.00 ??????? <<<<<<< | | | | 10023 IN5566 1500.50 500.50 1000.00 | | | | 10034 ------ ------- ------- ------- | | | | 11255 IN2370 1009.00 9.00 1000.00 | | | | | | | | | __________________________________________________________ In addition, a warning message, such as those listed below, is printed at the end of the report if one of these exception cases occurs. The following exceptions occurred in this report: Field overflow occurred with item PAID-AMOUNT (54*) Error values occurred with itme AMT-DUE (24*) The number to the right of the message indicate the number of times the exception occurred in the report.
NOTE HP ALLBASE/BRW will print a warning message each time a 'non-printable character' is found. However, you cannot specify a character to be printed as a substitute character for non-printable characters.


MPE/iX 5.0 Documentation