HP 3000 Manuals

Conditions [ HP ALLBASE/BRW Reference Manual ] MPE/iX 5.0 Documentation


HP ALLBASE/BRW Reference Manual

Conditions 

A condition is any form of calculation that produces a Boolean result.
That is, a result that can be either true or false.

Conditions include:

   *   selection conditions

   *   relation conditions

   *   suppress line conditions

   *   suppress lineset conditions

The screen for each condition is described in Chapter 16  in
alphabetical order.  The screens are also pictured in sections of the
manual describing tasks that are done using that screen.  All the
condition screens are similar, and all use the Calculation Language to
produce a Boolean (condition) result.  A general example of a condition
screen is shown below:

[]
This condition is true if CUSTOMER-NO is less than "444444". If the CUSTOMER-NO is greater than or equal to "444444", this condition is false. Conditions can use any Calculation Language arguments. Selection Conditions Selection conditions are used to define selection criteria for a subset of data. The Selection Condition screen is used to define them. See Chapter 16 for the screen description. Characteristics Selection Conditions have the following characteristics: * They select a subset of data from the final access table. * They are calculated from items, parameters or constants. * They can use table calculated items, since a table calculated item is used like any other item after it is projected from its table. Example Suppose you want to produce a report that would include only products from Product Line 60 that have been ordered during December. You could use this selection condition: PRODUCT-LINE = "60" AND MONTH_OF (ORDER-DATE) = 12 This condition produces a report including only products from Product Line 60 which have been ordered in month 12. That is, when the condition is true the data is selected. Relation Conditions Relation conditions are similar to selection conditions but are defined within a table. Relation conditions are defined on the Define Relation Screen. See Chapter 16 for the screen description. Characteristics Relation conditions have these characteristics: * They are used to select a subset of the records to be included in a table. * They are calculated from items, table calculated items or table functions defined in the same table, parameters, or constants. Example If you want a report with only the records for the WESTERN sales area, you could use this Relation Condition: SALES-AREA = "WESTERN" This condition allows only those records whose sales areas are WESTERN to be written to the table. When the condition is true, the data is written to the table.
NOTE For better performance: Although relation conditions are defined to select data from the final access table, they are optimized so they are evaluated as early as possible. The same is true for selection conditions. See the "Using the Compile Listing" section in Chapter 19 for more information.
Suppress Line Conditions Suppress line conditions are used to define criteria under which the printing of a line is suppressed. It is especially useful when there is only one condition you want to exclude from the report. Suppressing the line for that condition is simpler than selecting lines based on multiple conditions. Suppressed lines are defined on the Suppress Line screen. See Chapter 16 for the screen description. Characteristics Suppress line conditions have the following characteristics: * They are calculated from items, layout calculated items, or layout functions, parameters or constants. * They can use column calculation results as arguments. Example Suppose you have an invoice report where there are multiple entries under one dollar (1.00). You don't want the report cluttered with these amounts. If you want your report to print only lines where the INVOICE-AMOUNT is over 1 dollar, you can suppress the line based on this calculation: INVOICE-AMOUNT < 1.00 All lines where the invoice amount is less than 1.00 are suppressed. The report will only contain those lines whose INVOICE-AMOUNT is 1 dollar or over. When the condition is true, the line is suppressed. However, a TOTAL or AVG column calculation will still include these values. (This is not true for suppress lineset conditions.) Suppress Lineset Conditions Suppress lineset conditions are similar to suppress line conditions, except that they suppress complete lineset instead of specific lines within a lineset. They are defined on the Suppress Lineset screen. See Chapter 16 for a description of the screen. Characteristics Suppress lineset conditions have these characteristics: * They are calculated from items, layout calculated items, or layout functions, parameters, or constants (the same as suppress line conditions). * They can use column calculation results as arguments (the same as suppress line conditions). * They are used to suppress complete linesets. * They suppress all of the following: * all lines in the lineset * pagination defined for the lineset * any records to be written to the lineset's output file * column calculations to be calculated, if the lineset is a detail or a break footing Example Suppose you are creating a Customer Order report and you do not want any details printed when a customer has no orders. You can use this Suppress Lineset condition: ORDER-NO = NO_VALUE With this condition, no details are printed for a customer who has no orders. When the condition is true, the lineset is suppressed. Related Sections * Arguments * Arrays and Array Items * Aggregate/Array Operations * Calculations * Column Calculation Results * Conditions/Boolean Operations * Constants * Expressions * Functions * Operators/Operations * Parameters


MPE/iX 5.0 Documentation