the Calculated Member from the Cube into the Report
prepared the report, we are ready to assemble the data presentation requested
by the information consumers.
take the next step from our current position on the Layout tab, within
the Report Designer. Here we will add the new calculated member, Percent
Total Sales from
the Percent of Total cube.
Click the new
calculated member, named Measures_Percent_Total_Sales in the Report
Designer Field List, to select it.
Drag the Measures_Percent_Total_Sales
onto the Layout tab, dropping it to the right of the data field
underneath the Store Sales column in the matrix (just as we would add
any existing field to a report in Report Designer), as depicted in Illustration
the more obvious advantages in creating a calculated member in the cube,
versus creating an equivalent calculation in the report, is that the
calculation thereby becomes available to us anytime we refer to it in using the
parent cube as a data source. If we create it within the report, we have to
re-create it in subsequent reports. Using cube structures to house calculations
(and, as I show in numerous articles of the series, other report objects)
therefore means centralized creation and maintenance, not to mention
consistency in reporting, as calculations of this sort are more easily
controlled - we don't have three developers, for instance, creating three
separate calculations locally, in three separate reports, each, perhaps, giving
the calculation a different name, or, worse, each arriving at differing results
because of differences in the construction of the calculations themselves.
Performance gains can also be enjoyed by constructing the calculation within
the data source.
measure appears in a new column, automatically labeled Measures Percent
Total Sales, to the right of the Store Sales column.
the new data textbox, which currently displays the following expression:
from the context menu that appears, as shown in Illustration 48.
Illustration 48: Select
Properties for the New Data Item
Properties dialog opens.
text in the Name box (which was automatically provided) with the
existing expression in the Value box from:
to the following:
Click the Standard
radio button in the Format section (right half of the dialog) to
within the Standard list.
Click the top
selection in the two options in the right-most pane (the selection that
provides for two decimal points).
Properties dialog appears as depicted in Illustration 49.
Illustration 49: The
Textbox Properties Dialog, with Our Modifications
to accept our changes and to close the dialog.
the box directly above the textbox just modified (currently labeled Measures Percent Total Sales).
text in the box (which was automatically provided) with the following:
Cube % Total
With the newly
labeled field still selected, select Format --> Justify from the main menu of the Report
from the cascading menu that appears, as shown in Illustration 50.
Illustration 50: Centering
the New Label ...
report appears, in Layout view, as depicted in Illustration 51.
Illustration 51: The
Calculated Member Renamed ...
Click the Preview
tab, atop the design environment.
report executes quickly, and appears as shown in Illustration 52.
Illustration 52: Multi-Layer_Calculations,
Reflecting Modifications ...
the effects of our handiwork. We can easily compare the values to those we see
in the Cube Browser of Analysis Services, to ascertain accuracy. Next,
we will investigate the accomplishment of the same results with a solution that
is freestanding within the report layer.