Procedure: Create a Simple Doughnut Chart within the Report
Add a Chart Control to the Report Canvas
At
this point, we will position
the Chart item from the Report Items listed within the Toolbox pane (the
position of which is defaulted to the left of the Layout tab). Once the general control is placed
on the report canvas, we will adjust it, setting properties as appropriate to
meet the report specifications.
1.
Select View
from the main menu.
2.
Select Toolbox from the menu, which appears as partially shown in Illustration 7, to place the
Toolbox within easy reach (if it already appears, simply disregard this step).
Illustration 7: Calling the Toolbox to View (Partial View Menu Shown)
The
toolbox window should appear similar to that depicted in Illustration 8. Mine
is pinned to the upper left corner of the design environment, where I find it
most convenient. This is, of course, subject to your own choice. (I dock my
Fields and Server Explorer panes in this area to maximize design real estate,
as an aside.)
Illustration 8: The Toolbox, Pinned to the Upper Left Corner of the Design Environment
3.
Click the
Chart item (at the bottom of the Toolbox pane).
The
cursor becomes a small chart icon in combination with crosshairs when held
above the Layout canvas. This indicates that we can click to anchor the
point, from which we wish to draw the box that the chart will inhabit.
4.
Click on the
canvas, below the existing matrix, approximately as shown in Illustration 9.
Illustration 9: Placing the Chart Selection onto the Report Campus ...
The chart item appears, in its generic manifestation, as
depicted in Illustration
10.
Illustration 10: The Generic Chart Item Appears
NOTE: Should you accidentally place or drop the chart item into a
position that is not satisfactory, you can simply move the item by clicking
inside the chart item, then pointing to the now shaded border of the chart item,
to drag it to a new location.
Clicking again on the border will also allow you to expand /
contract the chart shape. (The nuances are easy to learn with a little
practice.) Double-clicking the chart item will make the drop regions, seen
above, appear.
5.
Pass the
cursor over the left border of the chart item, until it becomes a four-arrow
icon.
6.
Click and drag
the chart item to the left side of the report canvas.
7.
Click the
canvas, outside the chart item.
The chart
item is now in place, and we are ready to specify its simple Doughnut chart
nature, as well as to populate it with the primary dataset that is already in
place.
Populate the Simple Doughnut 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 Doughnut
in the Chart type selection list.
6.
Ensure that
the left-most selection, Doughnut chart (the Simple versus the Exploded Doughnut
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.