Mastering Business Analysis with Crystal Reports 9 (Wordware Applications Library)

Subtotals summarize the values of a numeric field within a group and may use any variety of mathematical operations, such as the sum of a field, the average of a field, or the maximum or minimum value of a field. You may place subtotals either in the Group Footer (which is the default) or the Group Header sections of your groups.

Tip

Remember, groups are necessary in order to create summary calculations. Should you need to create a group for the field for which you're creating a subtotal, press the Insert Group button (in the Insert Summary dialog box). The Insert Group dialog box displays, allowing you to create a group. After you save your group, it appears within the Summary location list, which you may then select.

To add a subtotal to your report, perform the following steps. Make sure you're in the Insert Summary dialog box.

  1. In the Choose the field to summarize drop-down field, select the Order Amount field (from the Orders table).

  2. In the Calculate this summary drop-down field, select Sum.

  3. In the Summary location field, select the Group#1Customer.Customer Name — A field.

Once you've done these steps, press the OK button. Preview your report. Figure 9-2 displays how your screen should look.

Figure 9-2: Adding subtotals to your reports

Note

The operations from the Calculate this summary drop-down field may vary, depending on the field's data type. For example, you won't find summary or average operations for a field that has character text or is a date/time data type.

Категории