Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Changing Legend on Graph

Status
Not open for further replies.

Mannga

Programmer
Jun 21, 2002
85
0
0
GB
Hi All,

I am trying to change the legend on my Graph in ver 8.5 and I have run into trouble.

I read somewhere else on this forum that the only realy way to get the legend to say exactly what you want is to remove it and create your own. Is this true?

I have tried to do this but when I place a rectangle on my graph it is never visible? I have tried sending the graph to the back and changing the type of rectangle but nothing?
If I place text on my graph I can see that. Could someone please let me in on the secret.

Thanks,
Gavin
 
Hi Gavin,

Why don´t u just display the legends in the main report? That´s what i do...if someone as a better solution just let me(us) know!

 
Thanks for the reply kataka,

Well I could put the legend in my main report but I have over 20 reports on a website and on 19 of them the legend is automatically created and is fine, I don't really want to change all of them and I would like them to all look the same.

Thanks,
Gavin
 
What version of CR?
On the 'Data' tab is this a "Group" chart or an "Advanced" or "Detail" chart?
What is wrong with the Legend? Ken Hamady, On-site Custom Crystal Reports Training & Consulting
Public classes and individual training.
Guide to using Crystal in VB
tek@kenhamady.com
 
I am using CR 8.5
It is a Advanced Chart.
The legend is showing "Sum of @Male" when I want it to say "Male"

Thanks
 
There is no way to directly change the legend, but you can change it indirectly by changing the structure of the report (in some cases).

What is the formula for @male? Ken Hamady, On-site Custom Crystal Reports Training & Consulting
Public classes and individual training.
Guide to using Crystal in VB
tek@kenhamady.com
 
The Formula is simple

if ISNULL({dbt_Patient.pt_Sex}) = false AND {dbt_Patient.pt_Sex} = '1' then 1

 
I have just figured out how to display my customised legend on top of my graph...

Just change the graph's background to transparent in the Graph Expert window.
 
Oops, spoke to soon.
This solved the problem in Crystal Reports but when I view it through ASP it still does not work?

Anyone know why that is?

Thanks.
 
Why not write a formula that is something like:

If Sex = '1'
then "Male"
else "Female"

Add a group and a summary count on this formula, and then use a Group chart instead of an advanced chart. That way the Legend will be what you want. Ken Hamady, On-site Custom Crystal Reports Training & Consulting
Public classes and individual training.
Guide to using Crystal in VB
tek@kenhamady.com
 
Kenhamady,

I am not sure how your formula would work the same.

I have a table with the following headings

Month || Male || Female || Unknown || No Data || Total

and then a total at the bottom of each.

How would I create this chart with your explanation?

Thanks,
Gavin
 
The word table can have 2 meanings. Do you mean the data table that the report is reading looks like this? Or is the report creating something that looks like this?

If the underlying table has a SEX field and value for each person's record, then you should be able to create a cross-tab that does this table, and then chart the data as I described above. Ken Hamady, On-site Custom Crystal Reports Training & Consulting
Public classes and individual training.
Guide to using Crystal in VB
tek@kenhamady.com
 
The word table in this context meant the report table :).. My database table will either have a 1(Male) or 2(Female) or 3(Unknown) or null(No Data)

How do you mean cross-tab?

Thanks,
Gavin
 
Use Insert Cross-tab, and make the column field and summarized field your SEX field. Put it in the report header. You will get a rough idea.

Ken Hamady, On-site Custom Crystal Reports Training & Consulting
Public classes and individual training.
Guide to using Crystal in VB
tek@kenhamady.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top