Changing Titles in Crystal Reports

Using Crystal Reports XI Developer:

Is there anyway to override/change the field names displayed in graphs?
I know you can change the Chart Title, and the Titles on the X and Y Axes, but what about the actual value names for each element on the X and Y Axes?
LVL 10
P1ST0LPETEAsked:
Who is Participating?
 
mlmccConnect With a Mentor Commented:
You can't change the database field which is what you are trying to do.

A formula simply returns a value and you put the formula on the report instaed of the {questionid} field.

Your formula for survey 13 will look like

IF {questionid} = "1" then
  "117"
ELSE IF {questionid} = "2" then
  "456"
etc

UNfortunately you will require a different formula for each survey thus my idea of a table that has
Survey#    Question#    RealQuestion#
    13                 1                  1117
    13                 2                     65

mlmcc
mlmcc
0
 
mlmccCommented:
What do you mean the value names?

mlmcc
0
 
P1ST0LPETEAuthor Commented:
I'll have to explain a little for it to make more sense.
I work for a consulting company that does a lot of surveys.  All the survey questions for every survey are all in one database table.  The result of this is that question #1 on Survey #13 may actually be question # 1117 on the database; or question #2 or survey #5 may be question #456 on the database.  

Under these circumstances, when I create a bar-graph showing answers for question 1 on survey 13, the graph has question #1 labeled as #1117.  I'm just wondering if there is a way in Crystal Reports to change what is displayed there.  You can do aliases for field names, but can you for actual data? :-)

If there is no solution in Crystal Reports I'm going to have to play with the actual database.
0
Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

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.

 
mlmccCommented:
I assume you have a group in the report to do the totals

Is there a table that maps the Survey Question # to the real question?

Try this
Right click the group header of the left margin in the group
Click CHANGE GROUP
Select the CUSTOMIZE GROUP NAME FIELD
You could use a formula like
IF {QuestionNumber} = "#1117" then
  "#13"
ELSE IF etc

A better way would be to use the real question number field if there is a table.

mlmcc
0
 
P1ST0LPETEAuthor Commented:
Currently there isn't a table that maps the Survey Questions to the real questions.  We're using server side programming to do that converting for the actual surveys.  I also agree that one way to do it would be to set up a table to map the change, but for now I'd like to stay away from the database.

On the otherhand, your suggestion to use the if statement formula seems like just the ticket.  I'm currently trying it, and getting hung up.  The formula I'm using looks like this:

         If {questionid} = 1117 then {questionid} = 1;

I'm using the check formula button, and it's telling me " The formula result must be a string".  So I put quotes around the 1 and it then tells me I need a number there.  (The actual data type in the database is NUMBER).  So I thought I may need to convert the result to a string, so I tried:

          If{questionid} = 1117 then {questionid} = CStr (1);

To this, the same error was given, saying I need a number where "CStr (1)" is.

Any ideas?
0
 
P1ST0LPETEAuthor Commented:
I finally got your formula to work.  Had to take the quotes off the first number:

If {questionid} = 1117 then "1"
ELSE IF
etc

Which works great by the way.  One more problem though......The chart that I have reflecting this data is still showing 1117 insteaf of 1.  Can we alter the chart ?
0
 
mlmccCommented:
How are you providing the data?

mlmcc
0
 
P1ST0LPETEAuthor Commented:
The Survey is taken by 20-30 people groups usuall.

Off of the data, the charts will show the average answer for each question.  (On the actual Survey, there are 5 radio buttons (1-5) to select from for each question.)

So for example, right now my bar-graph chart looks something like this:

5
4
3
2
1
      1117  |  1118  |  1119  |  1120  |  1121  |  1122  |  1123  |

While I'd like the 1117-1123 to be replaced with 1 | 2 | 3 | 4 | 5 | 6 | 7 |

I was hoping that Group Name formula would carry to the chart, but it is not.
0
 
mlmccCommented:
Glad i could help

mlmcc
0
All Courses

From novice to tech pro — start learning today.