Page History
7.22.1 DEF_COND Parameters
Technical Reference Guide > 7. RDML Commands > 7.22 DEF_COND > 7.22.1 DEF_COND Parameters
7.22.1 DEF_COND Parameters
|
|---|
Specifies the name of the condition.
...
Since the DEF_COND command "defines" something, and is thus strictly non-executable, it is customary for it to be placed at the beginning of the program along with all other definition style commands (eg: DEFINE, DEF_LIST, GROUP_BY, etc).
|
|---|
Specifies the condition that is to be evaluated to test the "truth" of the condition. For more details, refer to Specifying Conditions and Expressions.
|
|---|
Specifies whether or not field column headings associated with a field controlled by this condition are to also be conditioned.
...
For example, making a whole column disappear:
...
DEF_COND NAME(*AUTSAL) COND('#GROUP = HO') COLHDG(*YES)
...
DEF_LINE NAME(#DETAIL) FIELDS(#A #B #C (#SALARY *AUTSAL))
specifies that field #SALARY and its column headings are only to appear on the report if the #GROUP = HO. This means that if the group is not HO, the salary column effectively disappears from the report.
However, making a field selectively disappear:
...
DEF_COND NAME(*PRTAMT) COND('(#CREDLMT *EQ 0) *OR (#OVERDUE *GT 30)') COLHDG(*NO)
...
DEF_LINE NAME(#DETAIL) FIELDS(#A #B #C (#AMTDUE *PRTAMT) #D #E #F)
specifies that field #AMTDUE is only to be printed if the credit limit is zero or the amount has been outstanding for more than 30 days. However, the associated column headings always appearappear on the report.
Please note: A condition controlling a column heading is tested at the time the column heading is printed or displayed. In the case of a report, this is at the time the first line on the report page is printed. In the case of a display, this is the time at which the DISPLAY, REQUEST, or POP_UP command is executed.
...