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!

Legend resizing and overlapping onto chart

Status
Not open for further replies.

nicmcd77

Technical User
Oct 11, 2016
17
0
0
US
I have a chart for Crystal Reports 2013. Does anyone know how I can force the legend to NOT resize if the text is too large? Can i force it to only display a certain number of values? I don't see anywhere I can configure anything with the legend. I need it to resize based on the values but obviously not for scenarios like below!
Thanks!
chart_vxbeds.png
 
Use a formula instead of the field shown in the legend. If this is a group name, you could either conditionally reduce the length of the field, by doing something like this:

If len({table.field})>20 then
Left({table.field, 20) else
{table.field}

Another approach would be to add in a check for spaces/hyphens and use the split function to display only a certain number of array elements or to limit it by length for values that are too long but contain no spaces/hyphens, etc.

You could either use this to replace the groupfield on which the legend is based or you could change the display of the group name in the group options tab.

-LB
 
Of course!! Formula worked perfectly. Thanks so much!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top