12. Report-Writer Statements : Conditional and Assignment Statements : .If Statement—Specify Alternative Statements : Description
 
Share this page                  
Description
The .if statement specifies alternative blocks of statements to be executed depending upon the value of the specified condition.
Report-Writer evaluates the conditions in the .if and .elseif clauses one after another. When a condition is met, Report-Writer executes the statements following the subsequent .then statement. If none of the specified conditions is met, Report-Writer does nothing. If none of the conditions is met and there is an .else clause included in the .if statement, Report-Writer executes the statements following the .else statement.