Solved

How to edit Chart Legend

Posted on 2001-07-11
15
873 Views
Last Modified: 2008-02-01
Hi Experts,

I'm doing a report in CR7 running under MSSQL7. I need to include a Chart of this particular report.

My problem is that it seems there's no way to edit the displayed chart legend. It shows like "Sum of @Male ages 0 -17". I wanted to edit this wordings and change it to "Male ages 0-17".

Is there a way to do this with CR7? Do I need to use a 3rd party tool?

Please Help,

zero

0
Comment
Question by:zerobro
  • 5
  • 4
  • 2
  • +3
15 Comments
 
LVL 4

Expert Comment

by:jsweby
ID: 6275999
zero,

I have exactly the same problem and remember looking for a similar solution at the time. I have the report calculating sums and want to show a grpah of those but it shows the legend as "@..." like yours. I'm pretty sure that there is no way to deal with this in CR7 (unless someone can show us how), maybe they dealt with this in CR8 (anyone?).

J.
0
 

Expert Comment

by:Salim060800
ID: 6320622
I am using CR8.0 and there seems no hope. Stuck with the same problem.
HELP!!!!!

Sal
0
 

Expert Comment

by:Salim060800
ID: 6328966
hey guys,

CR has a limitation to permit customizing legends. I found help on www.tek-tips.com It is similar to eperts-exchange. Become a member and search for customizing legends in Crystal decisions category.

One can customize legends if the graph is a bar graph for advanced and detailed graphs it is not possible. In such cases, the only way one can customize legend is by creating one using drawing tools and textboxes.

Good luck

salim
0
 
LVL 1

Expert Comment

by:Moondancer
ID: 6351983
Has anyone helped you here, or is more needed, zerobro.  It is important, in order for you to get what you need, to respond with comments as information is provided, and if help was found, accept the comment to grade and close.

Thanks,
Moondancer
Community Support Modertor @ Experts Exchange
0
 

Author Comment

by:zerobro
ID: 6354597
Hi Moondancer,

Sorry for not being very responsive lately :-)
Anyway, I'm reading everything that the experts been posting here and I'm still waiting for the "right" answer which might still be coming.
It seems the comments that were posted here by experts didn't exactly fit my need...and still hoping to here a better solution.

Thanks,
zerobro
0
 
LVL 1

Expert Comment

by:Moondancer
ID: 6357467
Thanks for updating this question.  Ideally the participating experts will now return to collaborate further with you to bring this to an excellent conclusion.  If you have more information to add in terms of recommendations and results, that may help expedite a resolution.

Moondancer
Community Support Moderator @ Experts Exchange
0
 
LVL 12

Expert Comment

by:DRRYAN3
ID: 6369512
zerobro

There are limited options for modifying the text associated with a graph.  It seems you must use the Print Engine API to perform these tasks.  Check this function in the Developers Help.

Declare Function PESetGraphTextInfo Lib "crpe32.dll" (
     ByVal printJob As Integer, ByVal sectionN As Integer,
     ByVal graphN As Integer, ByVal titleType As Integer,
     ByVal title As String ) As Integer


You might also explore the GraphObject in the CRAXDRT library, specifically the LegendLayout method.  After browsing these, however, I don't think you can do what you want to do directly.

You can suppress the legend and add a text box object at the appropriate location which contains the text you want, or add a field object referencing a parameter you pass to the report.

See also

http://support.crystaldecisions.com/kbase/c2005433.asp

Hope some of that is useful
DRRYAN3

0
Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 

Author Comment

by:zerobro
ID: 6371172
Hi DRRYAN3,

I understand you're one of the top experts on this area as I can see your name posted on the right side column.
Thanks for taking the time to help me a bit on this problem of mine.

It seems the link you gave above about creating my own legend is the best (I supposed) solution to my problem however, my graph (which is actually a bar graph) is a 14 columns chart.
My problem is that crystal will assign unique color for each of these columns (bars) when you preview the rpt (right?). What will I do to be sure that when I custom-make the small rectangles color (for the legends) for each of the bars that it will coincide with the actual bar color when I preview the rpt?
Is there a way to get the actual color for each of these bars so that I can use it in my custom legend boxes?

TIA,
zerobro
0
 
LVL 12

Expert Comment

by:DRRYAN3
ID: 6372704
I don't know yet how to determine the colors of the displayed bars.  In http://support.crystaldecisions.com/CommunityCS/TechnicalPapers/rdc7_topissues.doc it is stated that the graph exists only at runtime, and only after the bar graph has been displayed.

In http://support.crystaldecisions.com/kbase/c2008467.asp it appears that in order to change the bar colors you have to preview the report in the designer and use the report analyzer menu features to set the bar colors.  They don't offer a programmatic way to do it.

And in http://support.crystaldecisions.com/kbase/c2007209.asp where a graph is added to a report being created on the fly, it seems you can set a graph to be color or black and white, but not set the individual bar colors.

You may need to explore the creation of chart templates to force your colors to some known value for each bar.  Another option may be to use a different app, like excel, to create your graph and drop that into your report.

Good luck
0
 

Author Comment

by:zerobro
ID: 6374921
Hi DRRYAN3,

Thanks for your very detailed reply.
What do you mean by to create the graph (like excel) and drop that into your report? You mean I'll use OLE link object to do this?
When I distribute the rpt, do I have to require the customer to have Excel installed on their machine?
I'm using MSSQL 2K and will be moving to cr85 anytime soon.
On the otherhand, it may sound damn but I don't know how to do a graph using excel...but if this is the right path, I guess I have to do something with it as soon as possible.

I think I have to try the one you said "explore the creation of chart templates." Maybe I can find something there which can be use.
The problem with seagate is that it seems they're ignoring the chart capability area of this product. It seems it's one area that didn't get much attention from them in all upgrades that they are making. I hope they'll make "major" improvements to this by version 9 ;-)

Until such time I'll find a solution to this problem, I'll keep this question open in the hope that someone out there can share a much better inputs regarding this matter.

Thanks,
zerobro


0
 
LVL 12

Expert Comment

by:DRRYAN3
ID: 6523805
This question has been open for some time now.  Please return and either
1.  Accept an answer
2.  Post a comment stating that you need more information
3.  Ask Community Support to delete the question if you feel the information here has no value to you or anyone else.
4.  Ask Community Support to PAQ the question because your question was not answered but you feel the information here may be of some value to others.

Community Support is here:  http://www.experts-exchange.com/jsp/qList.jsp?ta=commspt and you can leave a message by posting a zero point question.  Be sure to reference the question ID, found in the Address bar of your browser.

Thanks
DRRYAN3
0
 

Author Comment

by:zerobro
ID: 6525981
Hi DRRYAN3,

Thanks for the reminder.
However, as I stated above, I'm still waiting for a "better" solution to this problem. I'm thinking that by making this question open, someone later on might have a solution...a very acceptable solution.
Until now, I'm still finding ways to solve this problem of mine and I'm putting this rpt that I'm doing on hold...waiting for further information that I might gather/have soon.
No need to notify me as I'm assuring you that I'm keeping track of all the questions I'm posting here but thanks anyway.

zerobro
0
 
LVL 12

Expert Comment

by:DRRYAN3
ID: 6526077
zerobro

Thanks for getting back.  Nothing personal, I posted that same message in every open question in the Crystal TA older than Aug 15 2001.

I've found that after your question scrolls off the first page, as yours has, that the responses you tend to see are bottom feeders and newbies trying to get points instead of people looking at new questions.  Maybe you might want to post a zero point link to your question every once in a while to bring it back into focus.

Hope you get an answer.

DRRYAN3
0
 
LVL 4

Accepted Solution

by:
jrmn earned 55 total points
ID: 6735551
Hi zerobro,

In case you still haven't solve this problem of yours (as this one has been posted for quit awhile now, Here is my 2 cents worth of idea:

Your problem sounds like you are using a detail chart?   You might be able to rename the formula used for the 'show' field to get rid of the "Sum of", but you will still get the "@" no matter what.  

If you can use a Group chart (grouping your records and doing one bar/slice per group) you can name the groups and get the chart legend to reflect this.  

However if you are using multiple totals at the same level, you will have to use the detail or advanced chart.  Here you have no control over the legend.

By changing the group field to a formula.  Or  by using specified order grouping to name the groups, maybe will solve your problem.

This only works for group charts (where the bar is linked to groupings in the report).  If you are doing an advanced or detailed chart, you have no way of changing the legend.  These charts allow you to chart totals that are "side by side" in the report, like 2 grand totals.  You would have to shut off the legend and create your own.

Hope this helps,
jrmn
0
 

Author Comment

by:zerobro
ID: 6735878
Hi jrmn,

Thank you very much. I'm really looking forward on having a solid or rather nice answer to this question of mine.
I'm actually putting this task behind in the hope that someday I could find a better solution to this one.

Anyway, yup, I guess your suggestion is the right approached (until this time) in dealing with crystal report's charting options. Your idea solved my problem (it may not be the way I want it to be but it did for the meantime).

Thanks to all the experts who contributed to this question.

zerobro
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Suggested Solutions

I hate sub reports and always consider them the last resort in any reporting solution.  The negative effect on performance and maintainability is just not worth the easy ride they give the report writer.  Nine times out of ten reporting requirements…
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 …
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

706 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now