Solved

Custom Function Integer to Text String

Posted on 2013-05-29
4
403 Views
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?

Thanks!
0
Comment
Question by:Drud1981
  • 3
4 Comments
 
LVL 100

Expert Comment

by:mlmcc
ID: 39206036
Try

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

Open in new window


mlmcc
0
 
LVL 100

Accepted Solution

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

If {YourField} = 1 then
    "Major"
Else If {YourField} = 1 then
    "Minor"
Else If {YourField} = 1 then
    "Unassigned"
Else
    "Error"

Open in new window


mlmcc
0
 

Author Closing Comment

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

Expert Comment

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

Good thing I added the other one

mlmcc
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Hot fix for .Net Crystal Reports 10.2.3600.0 to fix problems with sub reports running on 64 bit operating systems ISSUE: Reports which contain subreports fail with error "Missing Parameter Value" DEPLOYMENT SERVER OS: Windows 2008 with 64 bi…
There have always been a lot of questions related to when Crystal Reports evaluates report components (such as formulas, summaries, cross-tabs, charts, to name a few examples). Crystal Reports uses a two-pass reporting process to provide greater …
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…

707 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now