WiseOwl Training - Established 1992 Wise Owl Training

Established May 1992
Wise Owl Training
See 479 reviews for our classroom and online training
If you found this blog useful and youâ€™d like to say thanks you can click here to make a contribution. Thanks for looking at our blogs!

BLOGS BY TOPIC

BLOGS BY AUTHOR

BLOGS BY YEAR

Free tutorial - Gauges in SSRS Reporting Services
Part three of a six-part series of blogs

SQL Server Reporting Services 2008 introduced gauges, in all their dazzling compexity. This free tutorial blog shows how to create gauges, format their pointers and scales, add labels and much else besides.

1. Free Tutorial on Reporting Services Gauges in SSRS
2. Creating Gauges
3. Gauge Layout and Positioning in Reporting Services (this blog)
4. The Pointer, Scale and Range
5. Gauge Labels in Reporting Services
6. Other Ideas for Gauges in Reporting Services

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.

Gauge Layout and Positioning

The main thing to learn about gauges is how Reporting Services positions them(both the gauges themselves, and the pointers, scales, etc within them).

All measurements are taken from the top left corner of the containing object, shown here with a red dot (this is true whether the containing object is the gauge, or - as in this case - the text box containing it).

So in the example above, the gauge will:

• Start 10% of the width of the text box in from the left, and take up 80% of the width (which will have the effect of centring it horizontally within the textbox); and
• Start 20% of the height of the text box from the top, and take up 60% of the height (which will have the effect of centring it vertically).

What this means is that you often need to get your calculator out to work out where an object will appear within a gauge.  Did it really have to be this complicated?

Our Example - Positioning the Gauge Itself

For our example, to position the gauge itself, first show its properties:

Right-click on the gauge and choose to display its properties, as shown here.

It's now vital that you stop Reporting Services auto-fitting your gauge inside its containing textbox:

Untick the Auto-fit all gauges in panel checkbox shown (otherwise you'll have no control over the positioning of the gauge).

You can now specify the X and Y positions of the gauge, using the diagram above as reference:

Here the gauge appears left-justified (0% of the text box width in from the left), and takes up 90% of the width; and appears 10% down from the top of the textbox and takes up 80% of the height, making it appear vertically centre aligned.

You should now have a gauge which doesn't fill its textbox:

Each gauge occupies 80% of the height and 90% of the width of its textbox.

It's now time to consider each element of the gauge: namely, the pointer, scale and range.