Sorting Data for Sub-Summary Reports
If you go directly to Preview mode after adding Sub-summary parts to a report, the subtotals will not appear. Before you preview, you must sort the database to match the sub-summaries in your layout.Depending on how you order and combine your sort criteria, you can provide a variety of different summary reports from the same layout and data. In the example in the previous section, we created a sub-summary report that displayed subtotals by state. Here, we''ll create two sub-summary reports, one sorted by state, the other using a sub-summary field to sort by total sales for each state.
To sort data for sub-summary reports
1 .Since you can''t sort records in Layout mode, switch to either Browse or Preview mode. Then choose Records > Sort Records (Control+S/Command+S).2 .When the Sort Records dialog box appears, double-click the first field you want to sort by. (You could also highlight the field, then click Move.) This example uses the Home State field for the first sort (Figure 5.50).
Figure 5.50. Choose as your first sort field the one for the first Sub-summary part on the layout.

Figure 5.51. Select the arrangement for the sort order to view sections alphabetically, numerically, or in a customized order.

Figure 5.52. After you sort the summary field(s), you can choose the sort order for the records in the Body part.

Figure 5.53. This report summarizes sales totals by state.
[View full size image]
To sort data based on sub-summary fields
1 .Repeat steps 14 in the preceding section "To sort data for sub-summary reports."2 .In the Sort Order box, highlight the field you want to sort based on the value in a summary field. In this example, we select Home State.3 .Check the "Reorder based on summary field" check box (Figure 5.54).
Figure 5.54. Select the field you want to reorder from the Sort Order section.

Figure 5.55. Unlike most Specify Field dialog boxes, when you reorder by summary field, only summary fields can be specified.

Figure 5.56. When reordered by the total sales summary field, state reports are reordered by sales volume.
[View full size image]