Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Custom Function Integer to Text String

Posted on 2013-05-29
4
Medium Priority
?
412 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
4 Comments
 
LVL 101

Expert Comment

by:mlmcc
ID: 39206036
Try

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

Open in new window


mlmcc
0
 
LVL 101

Accepted Solution

by:
mlmcc earned 2000 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 101

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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Crystal Reports: 5 Tests for Top Performance It is complete, your masterpiece report.  Not only does it meet your customer’s expectations, it blows them out the water, all they want is beautifully summarised and displayed in a myriad of ways. …
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 …
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…

610 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