Define sorting and grouping

Note

Now you specify sorting and grouping. You want the report to group contacts by title. This means you need to sort by title and then specify grouping by title.

  1. Select Rows>Sort from the menu bar.

    The Specify Sort Columns dialog box displays.

    Shown is the Specify Sort Columns dialog box with intructions at top to Drag and Drop items and to double click a column to edit it. At left is a box labeled Source Data displaying controls such as last name and first name. At right is a box with the headers Columns and Ascending.
  2. Move the pointer to the word title in the Source Data box and drag it to the Columns box.

    (To drag, press and hold the left mouse button, move the mouse, then release the mouse button.)

    Shown is the Specify Sort Columns dialog box. At left is a box labeled Source Data displaying controls such as last name and first name. At right is a box with the headers Columns and Ascending. Title is displayed under Column and a selected check box is displayed under Ascending.

    You have specified the sorting required to group by title.

    Next you specify sorting by last name and then by first name. This alphabetizes your contacts within each group.

  3. Drag last_name and first_name to the Columns box.

    Shown is the Specify Sort Columns dialog box. At left is a box labeled Source Data displaying controls such as last name and first name. At right is a box with the headers Columns and Ascending. Title, last _ name, and first _ name are displayed under Column with selected check boxes under Ascending.
  4. Click OK.

    The sorting definition is complete.

  5. Select Rows>Create Group from the menu bar.

    The Specify Group Columns dialog box displays. You are going to group on the title column. All contacts with the same title will be grouped together.

  6. Drag title to the Columns box and click OK.

    Shown is the Specify Group Columns dialog box. At left is a box labeled Source Data displaying controls such as last name and first name. At right is a box with the header Columns and under it is the single entry title.

    The grouping definition is completed. You have two new bands for the group in the report. You learn about bands in the next exercise.

    Shown is the  Design view for contacts _ by _ job role.  The text for the column headers is displayed across the top in the Header band, including Last Name, First Name, and so on. Next is a Header group title, then the Detail band, where the names of the columns appear in the positions where the data values will be displayed. Below this are a Trailer group title band and Summary and Footer bands.
  7. Look at the Preview view.

    You see the report and its data. Notice that the data is sorted. You do not see the groups yet. In a few minutes you will make some changes so the groups appear.

    Shown is the Preview view for the report contacts _ by _ job role. It has columns labeled Last Name, First Name, and so on, and rows of data arranged in alphabetical order by last name.