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.
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).
3 .Highlight the field in the Sort Order box, then select a radio button to determine how your sort will be arranged. You can sort by ascending or descending order, or by selecting a value list (Figure 5.51).
4 .Repeat steps 2 and 3 for any additional sub-summaries you added, or for any fields that appear in the Body part. After you''ve selected them, you can rearrange the fields in the Sort Order box (Figure 5.52).
If you''ve created several subtotals for multiple sub-summary parts, sort them in the order the Sub-summary parts appear.
5 .Click Sort. The choices you''ve made will be reflected in the report (Figure 5.53). In this case, our sales are broken out by state. Within each state, the lists are sorted alphabetically.
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).
4 .When the Specify Field dialog box appears, select the table containing your summary field, then select the field from the scrolling list (Figure 5.55).
Only summary fields are selectable. Any nonsummary fields are grayed out.
5 .Select a radio button to arrange your sort, then click Sort.
In this example, we select descending order, so the State with the highest sales will appear first.
6 .The new version of the sales report uses the criteria of total sales to sort the states'' results (Figure 5.56).