• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 16. Advanced Report Design > Defining the Sorting and Grouping Criteria

Defining the Sorting and Grouping Criteria

The next thing you need to do is define the sorting and grouping criteria for the report. Click the Sorting And Grouping button on the toolbar to open the Sorting And Grouping window. This report should display the daily reservation data from the query in the Detail section, with summaries of reservations by date, by month, and by facility. Note that in the Sorting And Grouping window, you specify grouping values from the outermost to the innermost (like specifying a sorting criteria left to right). So, select the FacilityName field in the first line of the Sorting And Grouping window, and then set the Group Footer property to Yes. Notice that when you set the Group Header or Group Footer property to Yes for any field or expression in the Sorting And Grouping window, Microsoft Access shows you a grouping symbol on the row selector for that row. Access also adds an appropriate section to your report. You want to make sure that a group header doesn’t get “orphaned” at the bottom of a page, so set the Keep Together property to With First Detail. Note that you can also ask Access to attempt to keep all the detail for this level of grouping on one page by setting the Keep Together property to Whole Group. When you do this, Access will produce a new page if all the detail for the next group won’t fit on the current page. As you’ll see later, the report sections also have properties that you can set to force a new page with the start of each group.

The DateValue field from the query returns the date each room is occupied across a reservation span. When housing managers look at this report for more than one month, they might want to see subtotals by month. You can create a group on month by clicking the DateValue in the Field/Expression column and setting the Group On property to Month. See the sidebar, “Understanding Grouping Options,” for details about other options you can set. Also set the Group Footer property to Yes to create a space to place monthly totals on your report. It’s a good idea to set Keep Together to With First Detail for this group, too.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint