views:

930

answers:

4

I'm developing a simple bar-chart in Reporting Services 2005 with a stored procedure as data-source. The values in this graph can be both positive and negative, and can span a very big range, and hence I cannot specify any non-dynamic scale that will work for all scenarios.

The problem I'm facing is that the automatic scaling pretty much sucks. I get no line to show where the zero-point is, and the y-scale labels are from top to bottom:

8818

-191181

-391181

etc etc...

So my question is, what is the best approach to make the scale more adapted to human reading? Is there any guide out there? Does reporting services 2008 handle this better?

Also, moving away from Reporting Services is not really an option. I realize how to put values and expression in the max, min, and the gridline interval fields, although its more of a question what expressions I should put there.

+1  A: 

I have had a generally terrible experience with the charts in reporting services. They are not very flexible and have all sorts of small irritating bugs.

If you stick using them, you should be able to write some logic to return the scaling you need as part of your stored procedure. Then, you can use those values in the chart properties using their expression window.

I used to face the same problem. Now, I use google's charts for nearly everything. Modify your SP to return the correct URL. Setup an image in place of your chart and have the URL of the image generated by the return from your SP.

Unfortunately, you will need to do a little work to get use to the charts, but google has good documentation here: http://code.google.com/apis/chart/

K Richard
+1 charts are horrendous, and you have little control of where the labels go, I am looking at moving to flot: http://people.iola.dk/olau/flot/examples/
Sam Saffron
A: 

You might look in to getting a different charting control. I know we use the Dundas charts and they work for most of our scenarios. For one of my charts where there could be a large range of different bars, I have this set on the Y-Axis Min and Max:

Min: =Round(MAX(Fields!ItemTolLower.Value, "AggregateModel") * -1) -1
Max: =Round(MAX(Fields!ItemTolUpper.Value, "AggregateModel")) + 1

I have it find the high and low values in the AggregateModel dataset (my lower tolerance number is always positive, but is displayed as a negative so I have to multiply by -1).
But again, this is with the Dundas chart and not the stock Visual Studio chart of which I do not have much experience with.

Dustin Brooks
A: 

I found the answer myself.

There's a checkbox named "Side margins" in the Y Axis properties tab...

Man, I wasted wayyy to many hours on that.

A: 

Hi,

To answer the part of your question about how Reporting Services 2008 handles this kind of problems, I can say that the 2008 version of Reporting Services is much better than the 2005 version. A lot of options have been added to manage scales, intervals, etc...

Howewer the interface is not very intuitive, but once you are used to all the options, you can make good and user friendly charts.

Linkee.fr

Bloggeur