Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Probs with if/else formula 1

Status
Not open for further replies.

Parkypark

IS-IT--Management
Jan 6, 2003
43
GB
I have a simple if / else formula, which i wish to expand on.
Please can some one point me in the right direction

what I have already
is
if {priority} ='medium' and {business hours} >8.00 then "Fail"
else
"Pass"

This works fine, but my report has 3 possibilities
Fail, Pass and Unassigned

How do I if / else the 3 possibilities

I have tried multiple else statements but I ended up with 4 catergories, of Fail , pass, Unassigned, and blank.

Help, b4 if Throw my Crystal machine out the window.
 
If there is a possibililty that you have a null value, you need to test for it first using the isnull() function. Software Sales, Training, Implementation and Support for Exact Macola, eSynergy, and Crystal Reports
dgilsdorf@trianglepartners.com
 
It would be something like this:

if {priority} ='medium' and {business hours} >8.00
then "Fail"
else

if {priority} ='medium' and {business hours} <= 8.00
then &quot;Pass&quot;
else &quot;Unassigned&quot;
Ken Hamady, On-site Custom Crystal Reports Training & Consulting
Public classes and individual training.
Expert's Guide to Formulas / Guide to Crystal in VB
- tek@kenhamady.com
 
Ken
I have tried this and I get pass, fail and blank

My business hrs will be a null value (blank field )if unresponded
does this help

cheers
Parky
 
Your first If should be the one for null values:

If IsNull ({field})
then ... Ken Hamady, On-site Custom Crystal Reports Training & Consulting
Public classes and individual training.
Expert's Guide to Formulas / Guide to Crystal in VB
- tek@kenhamady.com
 
Thanks ken It worked a treat

I am also having trouble with more date fields
see more date probs


once again thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top