报告服务饼图
饼图让我抓狂...请原谅,如果我听起来很无知,但我已经相对轻松地弄清楚了其他 RS 图表,这是我第一次不得不使用 Reporting Services 饼图。
我有一个数据集:
列:
ChildId int
评估类型 varchar
Score int
我想要的只是一个饼图,显示每种评估类型占整体的百分比。因此,如果我返回 10 条记录,其中包含以下内容:
2 个“THIS”评估类型
5 种“THAT”评估类型
3“其他”评估类型
我希望饼图显示饼图的“这个”评估部分为 20%,“那个”为 50%,“其他”为 30%,但我无法计算了解如何设置它。任何人都可以帮我解决这个问题,或者将我推荐到某个地方。我已经寻找了一段时间,但找不到任何帮助我进行此控制的页面。
The pie chart is driving me nuts...Excuse me if I sound ignorant but I have figured out the other RS charts with relative ease, and this is the first time I have had to use the Reporting Services pie chart.
I have a dataset:
Columns:
ChildId int
AssessmentType varchar
Score int
All I want is to have a pie chart that displays the percent of the whole for each assessment type. So if I had 10 records returned with the following:
2 "THIS" Assessment Types
5 "THAT" Assessment Types
3 "THEOTHER" Assessment Types
I would want the pie chart to show that the "THIS" Assessment peice of the pie is 20%, the "THAT" is 50%, "THEOTHER" as 30%, but I cannot figure out how to set it up. Can any one help me out on this, or refer me somewhere. I have been looking for some time and can't find any pages that have helped me with this control.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我想出了这个...要显示百分比:
编辑表达式并计算百分比。在我的示例中,我将使用下面的代码。
<代码>
=Count(Fields!Childid.Value) / Count(Fields!Childid.Value, "MyDataset")
我遇到的问题是我使用过滤器表达式在图表级别过滤数据集。因此,当我尝试使用下面的代码计算百分比时,我的数字被抛弃了。当像我一样检索时,过滤器不会应用数据集计数。
I figured this out...To show the percentage:
Edit the expression and calculate your percentage. In my example I would use the code below.
=Count(Fields!ChildId.Value) / Count(Fields!Childid.Value, "MyDataset")
The problem I was having is that I was filtering the data set at the chart level with a filter expression. So when I was trying to calculate the percentage using the code below my numbers were getting thrown off. The filter is not applied the dataset count when retrieved like I was doing it.