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

让人想犯罪 __ 提交于 2019-12-08 12:20:59

问题


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:

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


回答1:


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.




回答2:


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?




回答3:


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.




回答4:


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.



来源:https://stackoverflow.com/questions/20316799/how-to-change-legend-text-of-a-chart-object-in-crystal-reports-10

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!