0
votes

How to Change Legend Text of a Chart Object in Crystal Reports 10?

I did a report with chart by Crystal Report. The chart show me how many males and females there. So now the male enter to database as int = 0, and the females enter to database as int = 1, so in legend of chart display 0 = 226 and 1 = 44, means that the Males = 226, and the Females = 44. I need to make a formula that can change the 0 to Males, and the 1 to Females. please see the picture below:

Chart to display how many males and females there

See the Format Object I couldnot find any Display strings formula:

Format Object

4
Very strange @_@ is there any one know about this problem pleaseMany Mar

4 Answers

4
votes

Obtained here:

I had the same dificulty and found de answer (at least for me, was the solution).

Below (I use CR 2008):
1. Open report in CR.
2. Set report do "Preview Mode" by clicking View -> Print Preview
3. When in "Preview Mode", select the Legend label you want to change the text of.
4. Right click on the Legend label and select "Edit Axis Label"
5. Then, select the chart, right click and select Chart Expert -> Apply template to group.
6 Save the modified report.

3
votes

You had a formula "DisplayString" that does what you need, why don't you use this formula in the chart as values to show?

Instead of using the field directly, you can use the formula and problem solved!

Or is there something that prevents you from doing that?

2
votes

create a formula field, give it the name you would like i.e. males, then assign it the value of the data field. use the formula field in the chart itself. now the legend will read @males and you will get correct data.

0
votes

The only way I know how to change the data labels is by previewing the report, selecting a label, right-clicking on the label and then selecting "Edit Axis Label". It's called a label alias.