Friday, April 27, 2012

Make a pie chart in a SSRS report.

I figured out how to make a pie chart in an .rdl file inside of BIDS for SSRS2008. Assisting me were these links:

  1. http://www.experts-exchange.com/Microsoft/Development/MS-SQL-Server/MS-SQL_Reporting/A_1884-Pie-Chart-Techniques.html
  2. http://msdn.microsoft.com/en-us/library/cc281304.aspx

 
 

Steps:

  1. Drag a chart out of the Toolbox to the Design view of a report.
  2. A dialog box will appear prompting you to pick a type of report. Pick "Pie" under "Shape."
  3. You will have a pie chart. If you click on it twice you should see three areas appear about three edges of the chart reading:
    • Drop date fields here
    • Drop series fields here
    • Drop category fields here
  4. Open the Report Data pane. You will find it at: View > Report Data
  5. Drag the field you wish to track to "Drop category fields here" first. (This should make the legend populate)
  6. Drag the field you wish to track to "Drop date fields here" next. (This should calculate the pieces of the pie)

 
 

I am assuming here that you wish to pick a column, such as FullName, which has both varying values and duplicates of the varying values, from a dataset and report percentages on how much of the record set John Doe appears in as opposed to Joe Shmoe.

If you right click on the "Drop date fields here" item and select "Series Properties..." you should get a dialog box like the leftmost below and clicking the fx button by the Value field should produce a dialog box like the rightmost below.

Share photos on twitter with Twitpic

=Count(Fields!FullName.Value)

...should calculate the count of FullName for a given pie slice.

No comments:

Post a Comment