Groups | Blog | Home
all groups > sql server reporting services > june 2006 >

sql server reporting services : Summarize data in a dataset, draw pie from it


Sur
6/13/2006 5:58:34 PM
Hi,

I have a question on a summarizing data in a dataset at the RS2005 end,
could someone shed some light on this?

I have created a RS2005 dataset like below through which a bar chart
with two series (PDF, RTF) is populated for EACH day for a given
period.

Date, DocType, Count
========== ======= =====
01/01/2006, PDF, 10
01/01/2006, RTF, 20
02/01/2006, PDF, 11
02/01/2006, RTF, 23
03/01/2006, PDF, 09
03/01/2006, RTF, 07
....
....
31/01/2006, RTF, 17

The bar chart works fine.

I would also like to have a pie chart, that shows the total PDF and RTF
doccuments for the WHOLE PERIOD, to be populated from this dataset. The
problems is to group/summarize 'Count' by 'DocType', so the resulting
pie chart has only two slices; one for PDF and another for RTF.

Is there a way to do this?

Thanks
Sur
Eva Pierce Monsen
6/14/2006 10:34:42 AM
I think you need to create a Category Grouping for the pie chart. What
you want to do is this:

Using the Visual Studio designer, drag a chart onto your report layout.
Change its type to Pie.

Right click the report and select Properties. Click the Data tab.
Select the appropriate data source in the "Dataset name" dropdown.

Beside Values, click Add. Click on the Value dropdown. Select
Sum(Fields!Count.Value) . Click OK.

Beside "Category Groups" click Add. Click on the first row for "Group
On". Click again to get the dropdown and select "Fields!Doctype.Value".
Click OK.

Preview the report... you should get a pie chart with only 2 slices.

--Eva
Sur
6/14/2006 11:49:28 PM
Hi Eva,

Thank you very much. Your suggestion solved my problem.

Cheers
Sur
AddThis Social Bookmark Button