Mastering Business Analysis with Crystal Reports 9 (Wordware Applications Library)
|
All summary calculations are created in Crystal Reports through the Insert Summary dialog box. Before accessing that tool, let's first create a sample report that you can utilize for the examples within this chapter.
From the xtreme.mdb database, select the Customer and Orders tables. Allow Smart Linking to link these tables, or refer to the ER Model diagram in Appendix A.
Once you're at the Report Design area, add the following fields to the Details section:
-
Customer Name (from the Customer table)
-
Order ID (from the Orders table)
-
Order Date (from the Orders table)
-
Order Amount (from the Orders table)
Create a group using the Customer Name field. Readjust any sections as necessary.
Once you've done this, select the Design tab. Left-click once on the Order Amount field. Then, select Insert, Summary from the menu bar. The Insert Summary dialog box displays, as shown in Figure 9-1.
The Insert Summary dialog box contains the following functionality:
-
Choose the field to summarize: Allows users to view the fields and formulas used within a report. This drop-down field also allows users to view fields available from the report's data source.
Users select the field they wish to summarize here.
-
Calculate this summary: Contains all the possible mathematical operations for use within your reports.
-
Summary location: Displays the sections within your report where you may place this summary field.
-
Show as a percentage of: Allows you to calculate the percentage of the group total. After selecting this check box, the drop-down field below the check box becomes active.
You may use this drop-down field to select the group total that you wish to use as the comparison for your percentage.
-
Summarize across hierarchy: Allows you to calculate a summary across hierarchical groupings.
Hierarchical groupings are groups that show the relationship between two fields. This option won't display unless you create a hierarchy group.
The Insert Summary dialog is where you create all your summary calculations. Now that you're in this dialog box, let's try your first summary calculation: the subtotal.
|