Usage
x = y
x is equal to y
The equal operator tells the program to evaluate an expression (x=y) and return a TRUE (if x is equal to y) or FALSE (if x is not equal to y).
Examples
{file.QUANTITY} = 3
TRUE, where {file.QUANTITY} has a value of 3.
{file.QUANTITY} = 3
FALSE, in all other situations.
{file.YTD} = {file.LASTYEARYTD}
TRUE, where the value of the field {file.YTD} is identical to the value of the field {file.LASTYEARYTD}.
{file.YTD} = {file.LASTYEARYTD}
FALSE, in all other situations.
({file.SALES} - {file.COGS}) = 22,654
TRUE, where calculating the expression {file.SALES}-{file.COGS} produces the value 22,654, for example {file.SALES} = 109,986} and {file.COGS} = 87,332}.
({file.SALES} - {file.COGS}) = 22,654
FALSE, in all other situations.
{customer.LAST NAME} = "Johnson"
TRUE, where the text string in the {customer.LAST NAME} field is "Johnson".
{customer.LAST NAME} = "Johnson"
FALSE, in all other situations.
Comments
This operator is often used in expressions with If-Then-Else operators. For example in Crystal syntax:
If {file.PURCHASES} = 0 Then
"Your account had no activity this month."
Else
"";
Which prints the "Your account..." statement if the {file.PURCHASES} field has a zero value, and prints nothing (indicated by the empty string "") if the {file.PURCHASES} field has something other than a zero value.