Link to home
Start Free TrialLog in
Avatar of rsanglim
rsanglim

asked on

The special variable 'Formula' must be assigned a value within the formula

Greetings...I'm new to crystal and trying to execute the following code to color a textbox, but I get "The special variable 'Formula' must be assigned a value within the formula". What can I do to resolve this?

Scott

If {Total}  <  ({Average}/2) Then
    crRed
ElseIf {Total}  >=  ({Average}/2) And {Total}  <  {Average} Then
    crYellow
ElseIf {Total}  >=  {Average} Then
    crGreen
End If
Avatar of rsanglim
rsanglim

ASKER

sorry...v!0 connected to MS SQL 7.0 on Win2k
ASKER CERTIFIED SOLUTION
Avatar of vidru
vidru

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
You must have the syntax set to Basic in the drop down in the upper right of the formula workshop.
Change that drop down to Crystal syntax and that should clear up that error.
Thanks, Dave...that looks like it got it...appreciate the quick response!
I was using the Basic syntax, but missed explicitly stating the formula.
Glad to help.

-dave
If I switch to Basic Syntax and type "Formula = {crBodyText}

the result is "This field name is not known." yet I am pretty sure this field (crBodyText) does exist in the report!
Sorry - posted to wrong question - PLEASE IGNORE!!    :D