tim44202
asked on
Crystal Formula error
The following produces a syntax error:
IF "vw_Medicaid_Utilization_W eeks_Left" ."Weekly Average" <> 0
THEN
"vw_Medicaid_Utilization_W eeks_Left" ."FY Hours Available"/"vw_Medicaid_Ut ilization_ Weeks_Left "."Weekly Average"
ELSE
9999
The following produces a divide by zero error:
"vw_Medicaid_Utilization_W eeks_Left" ."FY Hours Available"/"vw_Medicaid_Ut ilization_ Weeks_Left "."Weekly Average"
IF "vw_Medicaid_Utilization_W
THEN
"vw_Medicaid_Utilization_W
ELSE
9999
The following produces a divide by zero error:
"vw_Medicaid_Utilization_W
Actually, you shouldn't be using the quotes unless you're creating a SQL Expression against a database that supports that format and this isn't proper syntax for a SQL Expression. In a Crystal Reports formula, it should be something like this:
IF
{vw_Medicaid_Utilization_W eeks_Left. Weekly Average} = 0
THEN
9999
Else
{vw_Medicaid_Utilization_W eeks_Left. FY Hours Available}/{vw_Medicaid_Ut ilization_ Weeks_Left .Weekly Average}
IF
{vw_Medicaid_Utilization_W
THEN
9999
Else
{vw_Medicaid_Utilization_W
ASKER
Rhinok,
Same error
Same error
ASKER
Rhinok,
Same error with your second suggestion. BTW the quoted version was created by selecting fields in the Crystal Formula Workshop
Same error with your second suggestion. BTW the quoted version was created by selecting fields in the Crystal Formula Workshop
the quoted version was created by selecting fields in the Crystal Formula Workshop
That's not possible, since it's not Crystal Reports recognized syntax. French braces denote database fields in the formula editor, not quotes. The format with the quotes is only available through the SQL Expression editor (and even then it depends what type of database you're hitting). Chances are you're just in the wrong editor.
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
IF
"vw_Medicaid_Utilization_W
THEN
9999
Else
"vw_Medicaid_Utilization_W
Basically the same thing, but changes the order.