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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

If Then Statement

Status
Not open for further replies.

iamtrying

Technical User
Sep 28, 2004
128
US
gm

I have the following statement which is converting a problem code {number) to a modified code consisting of a character and a number. I would like the original problem code {INCIDENT.PROBLEM_CODE} number to display if the code is not within specified else if statement. I am getting the name INCIDENT.PROBLEM_CODE with my current statement.

ty

If {INCIDENT.PROBLEM_CODE} = 1 then "M1"
else if {INCIDENT.PROBLEM_CODE} = 159 then "B59"
else if {INCIDENT.PROBLEM_CODE} = 160 then "B60"
else if {INCIDENT.PROBLEM_CODE} = 46 then "B22"
else if {INCIDENT.PROBLEM_CODE} = 49 then "B40"
else "{INCIDENT.PROBLEM_CODE}"
 

If {INCIDENT.PROBLEM_CODE} = 1 then "M1"
else if {INCIDENT.PROBLEM_CODE} = 159 then "B59"
else if {INCIDENT.PROBLEM_CODE} = 160 then "B60"
else if {INCIDENT.PROBLEM_CODE} = 46 then "B22"
else if {INCIDENT.PROBLEM_CODE} = 49 then "B40"
else totext({INCIDENT.PROBLEM_CODE},0)

_____________________________________
Crystal Reports XI Developer Version
Intersystems Cache 5.X ODBC connection

 
Thanks CoSpringsGuy. Now the report is complete with a full list of codes
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top