×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Legend resizing and overlapping onto chart

Legend resizing and overlapping onto chart

Legend resizing and overlapping onto chart

(OP)
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!

RE: Legend resizing and overlapping onto chart

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

RE: Legend resizing and overlapping onto chart

(OP)
Of course!! Formula worked perfectly. Thanks so much!

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close