views:

314

answers:

1

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.

+2  A: 

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")
AGoodDisplayName