English 中文(简体)
Reporting Services Pie Chart
原标题:

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")
问题回答

暂无回答




相关问题
SQL Server database is not visible

I have installed ASP.NET application with database on our server. ASP.NET application created database using connection string below. The problem is that I do not see database in SQL Server Management ...

Most efficient way to store number 11.111 in SQL Server

What datatype is the most efficient to store a number such as 11.111. The numbers will have up 2 digits before the point and up to three after. Currently the column is a bigint , I am guessing that ...

表格和数据表

是否需要在提瓜表之后更新表格统计数据,还是自动更新?

Inconsistent Generate Change Script

I add a column of type tinyint and being set to not allow nulls in a table and generate the change scripts. The table has data in it at this time. The script has code that creates a temp table and ...

Performance of Sql subqueriesfunctions

I am currently working on a particularly complex use-case. Simplifying below :) First, a client record has a many-to-one relationship with a collection of services, that is, a single client may have ...

selecting one value out of an xml column

I have a particularly troublesome xml column to query data from. The schema is fixed by the Quebec Ministry of Revenue so "it is what it is" The important part of the query looks like this: with ...

Selecting records during recursive stored procedure

I ve got a content management system that contains a hierarchical structure of categories, with sub-categories subject to different ordering options at each level. Currently, that s retrieved by a (...

热门标签