BLOGS BY TOPIC
BLOGS BY AUTHOR
BLOGS BY YEAR
Indicators are one of the nicest new features of SSRS 2008 R2 (or SQL Server Reporting Services, to give the software its full name). This blog shows how to add indicators to a table, format them and set scaling correctly.
Posted by Andy Brown on 25 July 2011
You need a minimum screen resolution of about 700 pixels width to see our blogs. This is because they contain diagrams and tables which would not be viewable easily on a mobile phone or small laptop. Please use a larger tablet, notebook or desktop computer, or change your screen resolution settings.
Let's assume that you've created a basic tabular report as follows:
|The report in Design view||The report in Preview view|
We now want to put an indicator in the third column. The first step, surprisingly, is to add a rectangle.
Step One - Adding a Rectangle
The reason you may need to add a rectangle first is to avoid effects like this:
In this example, when a film name spans more than one line, so does its indicator. This usually looks messy!
By placing an indicator inside a rectangle, you can stop SSRS stretching indicators as above.
Drag the Rectangle tool shown into the text box highlighted
Step Two - Adding the Indicator
Once you've added a rectangle, you can add an indicator to it:
Drag the Indicator tool shown onto the rectangle we've just added
You can now choose an indicator from the palette. There are two things to note about the palette shown below:
- The categories on the left - Directional, Symbols, etc - are pointless, since you can see all the visible symbols in one go anyway.
- It doesn't matter too much which symbol you choose, as it's easy enough to make changes afterwards anyway.
The possible indicators you can add
There are in fact more symbols that you can use than are shown in this dialog box; to get at the others, you need to change the indicator's properties after you have created it.
In our case we'll choose the star symbols, although we'll need to modify these later to change the colour and number of symbols:
Note that these symbols don't mean that you will get one, two, three, for our five stars - instead they mean that you will always get one star, but the degree of shading will vary.
Step Three - Assigning a Data Field
The next question is: what does the indicator we've just added indicate? The easiest way to add this is as follows:
Click on the indicator you've just added, then click on the drop down arrow shown and choose a field to assign to it. Here we're showing the length of films.
You can also drag a data field onto the indicator, and from there onto the (Unspecified) property, to achieve the same result.
If you've followed the steps above, you should now have a fairly unpromising-looking indicator!
Since SSRS has set default scaling, the results aren't what we want.
It's time now to consider the issue of scaling.