Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Placing additional text on an SSRS chart

On an SSRS chart in design mode, I noticed that I can add titles and axis titles where you can type the title text using the title properties.

We would like to place some additional text on the chart that is not a title and not be restricted to the positioning of the text. We are trying to do something like when you place a text label on a web form or a Windows form, but on a SSRS chart instead.

The text will be used to further describe and explain the data that's on the chart.

If this can be done, please let us know how to do it.

like image 942
Emad-ud-deen Avatar asked Nov 20 '25 16:11

Emad-ud-deen


2 Answers

One thing that I found that works for me is using Titles, but then use CustomPosition at the bottom of the Properties Pane.

screenshot of the CustomPosition fields in Properties

like image 87
Adam Bird Avatar answered Nov 23 '25 14:11

Adam Bird


It's not something that I think can be achieved that easily with report services.

One way (depending on the chart you're using, and where you want your label), maybe to use the chart data labels.

You can toggle visibility of each label based on an expression and padding the bottom of the text can be done with additional line breaks in the expression.

Here is a quick example chart I knocked up. Where I just show 1 label in either the top left or right corner of the graph.

Chart1 Chart2

If you're setting an expression as the data label then you need to set the UseLabelAsValue parameter to false.


As promised here is a few screenshots and description of the steps I took:

Step 1

I used a line graph for this example, but it should work in the same principle for any graph.

Right click on the series and show data labels

Step 2

In the parameter bar in the misc section change UseLabelAsValue to False. In the 'visible' parameter enter the following expression.

=(Last(Fields!label.Value,"Chart1")=Fields!label.Value)

("Chart1" is the data scope of the chart). That will return true for only the last data point. (You could use First if you wanted the label on the left of the graph)

Position can be set relative to the data point and also can be used with an expression. I've been using Top and TopRight for testing. This will allow you control of where the data label is placed.

Label is where you put what you want to be displayed. You can add line breaks using VbCrLf, and if you want to raise the label higher you can pad the text with additional line breaks.

I used

="This is a test" & VbCrLf & "Put text here" & VbCrLf & "Description"

Step 3

like image 25
Sam Avatar answered Nov 23 '25 14:11

Sam



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!