Populate the Simple Pie Chart item to Meet the Business Requirements
While our
next steps might focus upon simply dragging fields from the Fields pane
of the Report Designer, we will populate our chart from inside the
multi-tabbed Chart Properties dialog. Because few charts I encounter in
the business environment can be built completely through the drag-and-drop
process anyway (expressions are often involved in combination with the date
fields, as an example), I long ago developed the habit of working from the Properties
dialog. (The practice of tabbing through the Properties dialog can
often remind us of other settings we need to make, additional options that are
available in meeting client / employer needs, and so forth, as an another
benefit.)
1.
Right-click
the generic chart item.
2.
Select Properties
from the context menu that appears, as shown in Illustration 11.
Illustration 11: Select Properties from the Context Menu
The Properties dialog appears, defaulted to the General
tab, where we will begin our examination of the chart properties in the subsections
that follow.
General Tab
1.
Type the
following into the Title box on the General tab:
Sales Reason Comparisons
2.
Click the
Style button, depicted (and also magnified) within the respective red
squares in Illustration 12, to the immediate right of the Title
box.
Illustration 12: Click the Style Button for the Title Box ...
The Style
Properties dialog box appears.
3.
Make the
settings, listed in Table 1 below, within the Style Properties
dialog box:
|
Property
|
|
Setting
|
|
|
|
|
|
Family
|
|
Arial
|
|
Size
|
|
12pt
|
|
Style
|
|
Italic
|
|
Weight
|
|
Bold
|
|
Color
|
|
Black
|
|
Decoration
|
|
None
|
|
|
|
|
Table 1: Style Properties Dialog
The Style
Properties dialog appears, with our settings, as shown in Illustration 13.
Illustration 13: Style Properties Dialog Box with Settings
4.
Click OK
to accept changes and to exit the Style Properties dialog box.
We return
to the General tab.
5.
Select Pie
in the Chart type selection list.
6.
Ensure that
the left-most selection, Pie chart (the simple versus the exploded Pie
chart) is highlighted, among the context-sensitive Chart sub-type
selections to the immediate right of the Chart type selection list.
7.
Click the Chart
Area Style... button, which appears in the bottom left corner of the General
tab.
We can
manipulate settings for chart borders and lines via the Borders and Lines
tab, depicted with default settings in Illustration 14.
Illustration 14: Style Properties Dialog Box Border and Line Tab (with Default Settings)
8.
Click the Fill
tab to expose the chart Fill settings, which appear (with defaults)
as shown in Illustration 15.
Illustration 15: Style Properties Dialog Box Fill Tab (with Default Settings)
9.
Click the
OK button at the bottom of the Style Properties... dialog, to dismiss
the dialog with all properties settings at default.
We return
to the General tab, once again.
10.
Click the
Plot Area Style... button, which appears to the immediate right of the Chart
Area Style... button at the bottom of the General tab.
The
two-tabbed Style Properties dialog that appears is identical to that
which we saw when we clicked the Chart Area Style... button in the
immediately preceding steps. Since we will be leaving these settings, too, at
their defaults, we will dismiss the Style Properties dialog at this
point.
11.
Click the
OK button at the bottom of the Style Properties dialog, to dismiss
the dialog with all properties settings at default.
We return
to the General tab, once again, which appears, with our settings, as
depicted in Illustration 16.
Illustration 16: Chart Properties Dialog Box General Tab with Our Settings
We will
move to the Data tab in the subsection that follows.
Data Tab
1.
Click the Data
tab.
2.
Using the
downward pointing arrow on the right side of the Dataset name box atop
the Data tab, display and select the ProductData dataset, as
shown in Illustration 17.
Illustration 17: Select the ProductData Dataset ...
3.
Click the Add...
button to the right of the Values list box, found immediately underneath
the Dataset name selector we populated above.
The values in a Value series determine the size of the
slice in the Pie. Multiple Value series appear as separate
slices. If we have multiple Category or Series groups, the group
labels are displayed in the chart legend.
The Edit
Chart Value dialog appears, defaulted to the Values tab.
4.
Type the
following into the Series label box, atop the Values tab:
Internet Sales
5.
Click the function
(fx) button to the right of the Value box, depicted within
a circle in Illustration 18.
Illustration 18: Click the Function Button for the Value Box ...
The Expression
Editor opens.
6.
Click the Fields
(ProductData) option in the bottom left corner pane of the Expression
Editor.
The field
values of the ProductData dataset appear within the pane in the bottom
right corner of the Expression Editor.
7.
Double-click Internet_Sales_Amount
to place this selection into the main pane atop the Expression Editor.
The Expression
Editor appears, with our input, as shown in Illustration 19.
Illustration 19: The Expression Editor with Our Input ...
8.
Click OK to
accept our input and to dismiss the Expression Editor.
We are
returned to the Edit Chart Value dialog, which appears with our input as
depicted in Illustration 20.
Illustration 20: The Edit Chart Value Dialog, with Our Input...
9.
Click the Appearance
tab on the Edit Chart Value dialog.
10.
Click the Series
Style... button in the lower left corner of the Appearance tab.
The dual
tabbed Style Properties dialog appears again, just as it did
for the Chart Area Style... and Plot Area Style... buttons we
examined earlier. We see the same Border and Line and Fill tabs,
which we will leave at default at this point.
11.
Click OK
to dismiss the Style Properties dialog, and to return to the Appearance
tab of the Edit Chart Value dialog.
12.
Click the Point
Labels tab on the Edit Chart Value dialog.
13.
Click the
check box to the immediate left of Show point labels atop the Point
Labels tab.
14.
Click the
downward pointing arrow to the right of the Data label box to display
data selection options.
15.
Select =Fields!Internet_Sales_Amount.Value
from the options, as shown in Illustration 21.
Illustration 21: Select =Fields!Internet_Sales_Amount.Value as the Data Label ...
16.
Within the Format
code box (just underneath the Data label selector) type the
following character pattern:
#,###
17.
Uncheck the Auto
checkbox to the right of the Format code box.
This will
result in the point labels being displayed outside the Pie, at an
angle to a connecting line, making the chart more compact and, in this case,
making the labels themselves somewhat easier to read.