?
Solved

Changing Titles in Crystal Reports

Posted on 2007-03-29
9
Medium Priority
?
754 Views
Last Modified: 2008-02-01
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?
0
Comment
Question by:P1ST0LPETE
[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
  • 5
  • 4
9 Comments
 
LVL 101

Expert Comment

by:mlmcc
ID: 18816421
What do you mean the value names?

mlmcc
0
 
LVL 10

Author Comment

by:P1ST0LPETE
ID: 18816581
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
 
LVL 101

Expert Comment

by:mlmcc
ID: 18818170
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
Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

 
LVL 10

Author Comment

by:P1ST0LPETE
ID: 18823799
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
 
LVL 101

Accepted Solution

by:
mlmcc earned 2000 total points
ID: 18824253
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
 
LVL 10

Author Comment

by:P1ST0LPETE
ID: 18824486
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
 
LVL 101

Expert Comment

by:mlmcc
ID: 18825194
How are you providing the data?

mlmcc
0
 
LVL 10

Author Comment

by:P1ST0LPETE
ID: 18825527
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
 
LVL 101

Expert Comment

by:mlmcc
ID: 18825641
Glad i could help

mlmcc
0

Featured Post

Optimize your web performance

What's in the eBook?
- Full list of reasons for poor performance
- Ultimate measures to speed things up
- Primary web monitoring types
- KPIs you should be monitoring in order to increase your ROI

Question has a verified solution.

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

From implementing a password expiration date, to datatype conversions and file export options, these are some useful settings I've found in Jasper Server.
In this article we will learn how to fix  “Cannot install SQL Server 2014 Service Pack 2: Unable to install windows installer msi file” error ?
Using examples as well as descriptions, and references to Books Online, show the different Recovery Models available in SQL Server and explain, as well as show how full, differential and transaction log backups are performed
Viewers will learn how to use the SELECT statement in SQL to return specific rows and columns, with various degrees of sorting and limits in place.
Suggested Courses

801 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