MSSQL Server Reporting Services: Master Chart Reports: Pie Charts in Reporting Services - Page 7

August 30, 2004

9.  Using the Palette dropdown selector, choose Semi-Transparent.

10.  Select Pie under Chart Type in the lower left corner of the General tab.

11.  Ensure that the leftmost of the two Chart sub-types is selected.

12.  Click the Data tab to select it.

13.  Select VendorStateAllocation in the Dataset name box.

14.  Highlighting [Value], click Edit, to the right of the Values box.

The Edit Chart Value dialog box appears.

15.  Click the Point Labels tab to select it.

16.  Click, to place a checkmark, in the checkbox to the left of Show point labels.

17.  Click the Expression button (pictured in Illustration 19) to the immediate right of the Data label selector box.

Illustration 19: The Expression Button

The Edit Expression dialog box appears.

18.  Type the following into the Expression area:

=Fields!StateCode.Value & vbcrlf & "(" & 

        CSTR(Count(Fields!VendorID.Value)) & ")"

The Edit Expression dialog appears as shown in Illustration 20.

Illustration 20: The Edit Expression Dialog with our Input

By typing in the expression above, we are leveraging the data label to perform two functions: First, we are generating a State abbreviation (recall we are focusing on Washington, California, and Oregon) to label the sections of the chart. Second, we are adding a count of vendors within each respective section. The delivery of this data is, in effect, adding another conceptual dimension to the information we are imparting.


We used "&" in the expression to concatenate each State abbreviation (always separate the "&" character from others by a single space on both sides) with the respective count of the vendors within each, adding a line break (via the old carriage return-line feed keyword, vbcrlf, ) to separate the two. (Using vbcrlf in this manner is a great way to make what would normally appear on a single line separate into two or more lines.

19.  Click OK to accept input.

The Edit Expression dialog box closes, returning us to the Point Labels tab.

20.  Click the Label Style button in the lower left section of the Point Labels tab.

The Style Properties dialog box appears.

21.  Make the settings, listed in Table 2 below, within the Style Properties dialog box:












Black (Default)



Table 2: Style Properties Dialog

The Style Properties dialog appears, with our settings, as depicted in Illustration 21.

Illustration 21: Style Properties Dialog Box with Settings

22.  Click OK to accept settings.

The Style Properties box closes. We return to the Edit Chart Value dialog box, which now appears as shown in Illustration 22.

Illustration 22: The Edit Chart Value Dialog Box

23.  Click OK to close the Edit Chart Value dialog.

We return to the Chart Properties dialog box, Data tab.

24.  Click the Legend tab to select it.

25.  Uncheck Show Legend.

As we shall see, our design will alleviate the need for a legend of the garden variety. Our expression in the Data Label above causes the placement of a label directly upon each section of the chart.

The Legend tab appears, with our settings, as depicted in Illustration 23.

Illustration 21: Legend Tab with Settings

26.  Click the 3-D Effect tab to select it.

The 3-D Effect tab appears, with our settings, as depicted in Illustration 24.

Illustration 24: 3-D Effect Tab with Settings

27.  Click the checkbox to the immediate left of Display Chart with 3-D Visual Effect, to place a checkmark there.

28.  Click the General tab to review settings.

The General tab appears, at this stage in our process, as shown in Illustration 25.

Illustration 25: The General Tab with Settings

29.  Click OK to accept all the settings we have made in the Chart Properties dialog box.

The Chart Properties dialog closes, returning us to the generic chart item in Report Designer, Layout tab.