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

x
?
Solved

Changing Titles in Crystal Reports

Posted on 2007-03-29
9
Medium Priority
?
756 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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
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

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

Why is this different from all of the other step by step guides?  Because I make a living as a DBA and not as a writer and I lived through this experience. Defining the name: When I talk to people they say different names on this subject stuff l…
I have a large data set and a SSIS package. How can I load this file in multi threading?
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
Via a live example, show how to shrink a transaction log file down to a reasonable size.

609 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