SSRS Help - SO Backlog - Format Chart

I am trying to right-align the text in the chart legend at the bottom of the Sales Order Backlog report. Seems like this should be simple. Anyone know how to do that?

I’ve searched google and stackoverflow. Some have suggested adding a table in place of the chart legend. Just worried that a table adds room for error, but maybe that would be a fine solution.

There sure doesn’t seem to be any property for that, unless some of those CustomProperties would jump out at us. Got to love the documentation for some of this stuff.

Maybe, enhancing the Expression so that it “pads” the output?

Thanks for the suggestion! My user is wanting it right-justified, so I don’t know that padding would work since the number of characters vary in the results.

However, I ended up adding a table in place of the legend. I don’t love it because the table could grow beyond the chart onto the next page. But the user accepted it!

What part should be right justified? The 2 right most columns of numbers?

And how do you get multiple columns in the legend like that?

Yes, they do vary, but there is probably some maximum that is consistent with your data.

For instance, if you know that its a decimal 5.2 then you could say well pad a length 10 of spaces with the numbers.

“##12345.12”
“####123.12”
“#####12.12”

And so forth.

Because, you can turn the value to string, calc the length of the label value, and then you can combine 2 strings - one of which will be the “spaces” that has been trimmed to fit.

( “##########” minus length of “12345.12” ) + “12345.12”
= “##” + “12345.12”
= “##12345.12”

Would something that results like this work:

image

I used the Series Properties → Legend sheet, and used a Custom Legend

image

Also, had to set the legends font to a monospaced one

1 Like

Yes, the 2 right most columns.

This was in the out-of-the-box SO Backlog. They are actually separate charts, where the legend is the only thing being displayed on the far right ones.

Ah, I see what you’re saying now! That is clever. :grinning: Thank you!

Yes!! That is similar in approach to what @Michael_Ramsey said too. Clever guys. Going to give this a shot!

Just change the Legend expression on each of the hidden charts to be something like:

=space(12 - len( Format(Sum(Fields!onhand.Value),"0.00"))) + Format(Sum(Fields!onhand.Value),"0.00")