开发者

Reporting Services Pie Chart

开发者 https://www.devze.com 2022-12-27 16:19 出处:网络
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 Report

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.


I figured this out...To show the percentage:

  • Right click on the chart and click on properties.
  • Go the the Data table, select your "[Value]" and click edit.
  • Go to the Point Labels tab and check "Show point labels".
  • In the format code enter P
  • 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.

 Count(Fields!Childid.Value, "MyDataset")
0

精彩评论

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

关注公众号