Navigation:  How to > The Report Wizard > The Report Wizard Step 3: Create Work Field Columns >

Definition of all Operators

Navigation:  How to > The Report Wizard > The Report Wizard Step 3: Create Work Field Columns >

Definition of all Operators

Previous pageReturn to chapter overviewNext page  Print this Topic

Steps 3, 4, and 6 of the Report Wizard offer several operators to be used in creating calculations. For your convenience the complete definitions of all the available operators are listed below.

 

_bm8  (And)

 

The And operator has an expression to its left and to its right. It is a logical operator that resolves to either 1 or 0 (true or false). For it to resolve to 1, both the left and the right expression must be true. For example, if the following phrase is entered in the Step 4:Enter Row Selection Logic’s Select If: data area

 

Current Balance > 0  &  Interest Rate = 0

 

only non-zero balance accounts that have a zero interest rate will be selected. If either the balance is zero, or there is an interest rate, the account will not appear in the report.

 

 

_bm9  (Or)

 

The Or operator has an expression to its left and to its right. It is a logical operator that resolves to either 1 or 0 (true or false). For it to resolve to 1, either the left or the right expression (or both) need to be true. For example, if the following phrase is entered in the Step 4:Enter Row Selection Logic’s Select If: data area

 

Current Balance > 0  |  Interest Rate = 0

 

any account that has a non-zero balance or has no interest rate will be selected. The only accounts that would be skipped are zero balance accounts that have an interest rate.

 

 

_bm10  (Not)

 

The Not operator refers to the expression to its right. It changes a true expression to false and a false expression to true. Because it may sometimes be confusing to read, it is often a good idea to include the expression that is being changed in parentheses.  You can almost always use the other logical functions in a different way to avoid using the Not operator. It is often difficult to understand because most people tend to think positively. The easiest way to understand the Not operator is to understand what it refers to and then do the opposite. For the following examples, assume the expression is being used to select data.

 

! (Current Balance = 0)  

Would select all non-zero balance accounts.

 

! (Current Balance = 0 | Interest Rate = 0)

         Would select all accounts with non-zero balances and rates.

 

! (Acct Closed = YES)

         Would select all open accounts

 

 

_bm11  (Equal to)

 

The Equal operator compares the expression to its left with the expression to its right. If they are equivalent, it resolves to 1 (true). If not equal, it resolves to 0 (false). There are three different types of fields: numeric, text, or date. You can only compare like types of fields together. Text fields are compared alphabetically. For example, the expression Current Balance = 0 will be true if the account balance is zero. The expression Product Code Descr = 'Super Checking' will be true if the account’s product code description contains the text "Super Checking."

 

 

_bm12  (Not equal to)

 

The Not Equal To operator compares the expression to its left with the expression to its right and returns 1 (true) if they are different, or 0 (false) if they are the same. See = above for more information about comparisons.

 

Loan example: LNPBAL <> 5,000.00 would place loans with a principal balance not equal to 5,000.00 on the report.

 

 

_bm13  (Less than)

 

The Less Than operator compares the expression to its left with the expression to its right and returns 1 (true) if the left is less, or 0 (false) if the left is greater than or equal to the right. See = above for more information about comparisons.

 

Loan example: LNPBAL < 10,000.00 would place accounts with a principal balance less than 10,000.00 on the report.

 

 

_bm14  (Greater than)

 

The Greater Than operator compares the expression to its left with the expression to its right and returns 1 (true) if the left is greater than the right or 0 (false) if the left is less than or equal to the right. See = above for more information about comparisons.

 

Loan example: LNPBAL > 10,000.00 would place accounts with a principal balance greater than 10,000.00 on the report.

 

 

_bm15  (Less than or Equal to)

 

The Less Than or Equal To operator compares the expression to its left with the expression to its right and returns 1 (true) if the left is less than or equal to the right, or 0 (false) if the left is greater than the right. See = above for more information about comparisons.

 

Loan example: LNPBAL <= 5,000.00 would place accounts with a principal balance less than or equal to 5,000.00 on the report.

 

 

_bm16  (Greater than or Equal to)

 

The Greater Than or Equal To operator compares the expression to its left with the expression to its right and returns 1 (true) if the left is greater than or equal to the right, or 0 (false) if the left is less than the right. See = above for more information about comparisons.

 

Loan example: LNPBAL >= 5,000.00 would place all accounts with a principal balance greater than or equal to 5,000.00 on the report.

 

 

_bm17_bm18

 

Certain fields ask a question such as the Account Closed field that can be answered yes or no. The YES and NO operations are provided to help logical expressions be understood and used for these fields. Note that these operations are not enclosed in quotation marks. Use these operations to select for the question fields. For example, Club Account Feature = YES will select accounts that are club accounts, and Account Closed = NO will select open accounts.

 

 

_bm19

 

The Parentheses operations are used to create an expression of higher precedence than other expressions. Expressions enclosed in parentheses are always done first. Parentheses can be embedded within other parentheses. For example,

 

! ( (Club Acct Feature = YES  |  Acct Closed = NO) & (Current Balance <> 0))

 

the expressions in the inner parentheses are first evaluated, so the first expression is evaluated as true if it is either a club account or an open account. The second expression is evaluated as true if the current balance is not zero. Then those two expressions are evaluated as true only if each of the two inner expressions are true. And finally, the whole result is made just the opposite. Therefore, this complex expression will select those accounts that have a current balance of zero and that are neither club accounts or open accounts. Or in other words, it will select all closed non-club accounts with a non-zero balance.

 

In the example, (Work1 + Work2) * Work3 the first two fields will be added before multiplying by the third field. Since multiplication is done before addition, if there were no parantheses, Work2 would be multiplied by Work3 before adding Work1.

 

 

_bm20  (Comma)

 

This operator allows you to separate values used in a value list.

 

Loan example: Collateral code = 17, 20, 25, 40 would place all loans with a collateral code equal to 17, 20, 25, or 40 on the report.

 

 

_bm21  (Tilde)

 

This operator allows you to designate a range of values in a value list. Enter the start value, then a ~ symbol, then the ending value.

 

Loan example: LNTYPE = 5 ~ 20 would place accounts with a loan type equal to 5 through 20 on the report.

 

 

_bm22   _bm23   _bm24

 

The IF, THEN, ELSE operation allows you to make logical decisions in selecting what data you want to use. They are only available in Report Wizard Step 3: Create Work Field Columns and Report Wizard Step 6: Setup Totals. The IF statement is followed by a logical expression. If its result is true, the expression following the THEN statement is used to fill in the work field or the total field. If it is false, the expression following the ELSE statement is used to fill in the work field or total field. The ELSE is optional and does not have to be there. If there is no ELSE, then the field will get its default value - blank for text, 0 for numbers, and undefined  (zero) for dates.

 

It is legal to use IF statements within the THEN or ELSE statements as long as they eventually resolve to a value of the type designated for the work field or the total field. You must use parentheses to avoid ambiguity when you do this. Examples:

 

IF Work1 > Work2 THEN ‘OK’ ELSE ‘BAD’

This expression will place OK in a text work field if Work1 is greater than Work2. If it’s not, then the text field will get BAD.

 

IF Account Closed = YES THEN

  (IF Current Balance <> 0 THEN 1 ELSE 2)  ELSE 3

This expression will place a 1 in a numeric field for a closed account with a non-zero balance, a 2 in the field for closed accounts with zero balances, and a 3 in the field for open accounts.

 

IF Work1 = Work2 THEN ‘SAME’

This expression will put the word SAME into a text field if Work1 and Work2 are equal. Otherwise, it will leave it blank.

 

_bm25                Adds the value on the right side of the + to the value on the left side

 

 

_bm26                Subtracts the value on the right side of the - from the value on the left side

 

 

_bm27                Multiplies the value on the left side by the value on the right side

 

 

_bm28                Divides the value on the left side by the value on the right side

 

 

_bm29        Modulus - divides the value on the left side by the value on the right side and returns the remainder. For example 12 % 7 returns 5 because 7 goes into 12 once with a remainder of 5.

 

 

_bm30        Exponent - raises the value on the left side to the power of the value on the right side. The right side value must be a positive integer. For example, 4 ^ 3 will give 64 because 4 cubed is 64.

 

 


backarrowsmall

Back to The Report Wizard Step 3: Create Work Field Columns

forwardarrowsmall

Forward to Definition of all Functions

 

©2021 GOLDPoint Systems. All rights reserved.