开发者

SSRS- Bar Chart with single bar needs to display Percentage data

开发者 https://www.devze.com 2022-12-28 13:49 出处:网络
I have a requirement to show percentages in bar chart on a single bar using SSRS. For example, I want to show a employees by Age in a percentage in an SSRS report.

I have a requirement to show percentages in bar chart on a single bar using SSRS. For example, I want to show a employees by Age in a percentage in an SSRS report.

1.How many % employees between age 20 and 30? 2.How many % employees between age 30 and 40? 3.How many % employees between age 40 and 50?

All this on a chart which has only single bar chart in pe开发者_Python百科rcentage?

Is it possible?

Thanks


Not sure I'm really understanding the question ("a chart which has only single bar chart in percentage"?), and I realise it's an old one, but I just came here with what I think is the same problem, and wanted to offer the solution I've come up with.

As far as I understand it, you have a bar chart which shows employees grouped by age. Age bracket along the X axis, number of employees (which I'll presume is calculated by something like "COUNT(Fields!EmployeeID.value)") up the Y axis. You want to see the percentage of employees which fall into each bracket.

What I've done is go into the chart properties, "Data" and select the "Values" entry for "Employees" (or similar). Then, hit Edit and add point labels, with a data label such as:

=COUNT(Fields!EmployeeID.value) / COUNT(Fields!EmployeeID.value, "Employees")

Where "Employees" is the name of your data set.

This is dividing the value of the current data group (from the "Values" tab) by same value but taken over the whole dataset.

Enter a format code of something like "#0%", et voila!

It achieved what I was after, and I hope it can help others with the same question.


You can easily do it in 2008, but I guess that's not what you wanted to hear.

So basically you want the concept of a pie-chart but as a single bar (known as a linear gauge in 2008)?

I don't think you can. This is about the limit of what you can do http://msdn.microsoft.com/en-us/library/aa964128%28SQL.90%29.aspx

You could always buy dundas http://www.sql-server-performance.com/articles/reporting/Enhancing_Reporting_Services_with_Dundas_Reporting_Controls_p1.aspx

essentially this what MS have rolled into 2008

0

精彩评论

暂无评论...
验证码 换一张
取 消