Custom Function Integer to Text String

Posted on 2013-05-29
Medium Priority
Last Modified: 2013-05-29
Hi All,

I have a report I am generating in Crystal Reports from Sql. One of the table columns returns the values 1, 2, 3, and 4 where 1=Major, 2=Minor, 3=Unassigned, and 4=Error

How do I convert the returned values in the column to the text values associated with them? Can someone please show me what the string/function would look like?

Question by:Drud1981
  • 3
LVL 101

Expert Comment

ID: 39206036

Local StringVar Array  DispString := ["Major", "Minor", "Unassigned", "Error"];

Open in new window

LVL 101

Accepted Solution

mlmcc earned 2000 total points
ID: 39206041
You can also use if-then or case logic

If {YourField} = 1 then
Else If {YourField} = 1 then
Else If {YourField} = 1 then

Open in new window


Author Closing Comment

ID: 39206071
Thank you! The first answer gave me an error that highlighted the first comma and told me the ) was missing.
LVL 101

Expert Comment

ID: 39206097
I just tried it and I don't get an error.

Good thing I added the other one


Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

I hate sub reports and always consider them the last resort in any reporting solution.  The negative effect on performance and maintainability is just not worth the easy ride they give the report writer.  Nine times out of ten reporting requirements…
Hello everyone, Hope you find this as helpful as we did. We have on the company I work for an application built in Delphi V with Crystal Reports 8. We all know that Crystal & Delphi can be temperamental sometimes and the worst thing is, nearly…
This video tutorial shows you the steps to go through to set up what I believe to be the best email app on the android platform to read Exchange mail.  Get the app on your phone: The first step is to make sure you have the Samsung Email app on your …
When you have multiple client accounts to manage, it often feels like there aren’t enough hours in the day. With too many applications to juggle, you can’t focus on your clients, much less your growing to-do list. But that doesn’t have to be the cas…

622 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question