Reporting Services 2005中正确的图表缩放

时间:2022-08-09 08:16:53

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.

我正在使用存储过程作为数据源在Reporting Services 2005中开发一个简单的条形图。此图中的值可以是正数也可以是负数,并且可以跨越很大范围,因此我无法指定任何适用于所有方案的非动态比例。

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:

我面临的问题是自动缩放非常糟糕。我没有显示零点的位置,y尺度标签是从上到下:

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?

所以我的问题是,使规模更适应人类阅读的最佳方法是什么?那里有指南吗?报告服务2008能更好地处理这个问题吗

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.

此外,远离Reporting Services并不是一个真正的选择。我意识到如何将值和表达式放在max,min和gridline interval字段中,尽管更多的问题是我应该放在那里的表达式。

4 个解决方案

#1


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.

我曾经面临同样的问题。现在,我使用谷歌的图表几乎所有。修改您的SP以返回正确的URL。设置图像以代替图表,并具有SP返回生成的图像的URL。

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/

不幸的是,您需要做一些工作才能使用图表,但谷歌在这里有很好的文档:http://code.google.com/apis/chart/

#2


I found the answer myself.

我自己找到了答案。

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

Y轴属性选项卡中有一个名为“侧边距”的复选框...

Man, I wasted wayyy to many hours on that.

伙计,我浪费了很多时间。

#3


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:

您可能会考虑获得不同的图表控件。我知道我们使用Dundas图表,它们适用于我们的大多数场景。对于我的一个可能存在大量不同条形图的图表,我在Y轴Min和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.

我在AggregateModel数据集中找到了高值和低值(我的较低容差值始终为正,但显示为负值,因此我必须乘以-1)。但同样,这是与Dundas图表,而不是我没有太多经验的股票Visual Studio图表。

#4


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...

要回答有关Reporting Services 2008如何处理此类问题的问题,我可以说2008版Reporting Services比2005版本要好得多。已经添加了很多选项来管理比例,间隔等...

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

#1


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.

我曾经面临同样的问题。现在,我使用谷歌的图表几乎所有。修改您的SP以返回正确的URL。设置图像以代替图表,并具有SP返回生成的图像的URL。

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/

不幸的是,您需要做一些工作才能使用图表,但谷歌在这里有很好的文档:http://code.google.com/apis/chart/

#2


I found the answer myself.

我自己找到了答案。

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

Y轴属性选项卡中有一个名为“侧边距”的复选框...

Man, I wasted wayyy to many hours on that.

伙计,我浪费了很多时间。

#3


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:

您可能会考虑获得不同的图表控件。我知道我们使用Dundas图表,它们适用于我们的大多数场景。对于我的一个可能存在大量不同条形图的图表,我在Y轴Min和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.

我在AggregateModel数据集中找到了高值和低值(我的较低容差值始终为正,但显示为负值,因此我必须乘以-1)。但同样,这是与Dundas图表,而不是我没有太多经验的股票Visual Studio图表。

#4


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...

要回答有关Reporting Services 2008如何处理此类问题的问题,我可以说2008版Reporting Services比2005版本要好得多。已经添加了很多选项来管理比例,间隔等...

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