Home Access 2002 Group Intervals Set Group Intervals In Reports   |   Search MS Office A-Z   |   Search Web Pages/ Design A-Z

Set Group Intervals In Reports

You use a report in Access to create a hard copy of your records. Reports also add value by efficiently arranging and summarizing your data.

The key tool for organizing records in reports is Grouping. When you group your records by, let’s say products (or film director), you divide the data into sections that help readers focus on specific areas of your business (or video collection).

You can enhance Grouping by selecting Group Intervals. For example, you can group purchases by date and then include group intervals that show totals for each day, month, quarter, or year.

Intervals aren’t confined to fields with the Date/Time data type, however. You can also use them with Text, AutoNumber, Currency, and Number fields, as well. For example, a Company Name field with the Text data type could have intervals that segment results by the first letter of the company: Acme and Apex Materials under the As, Best Products and Bolton under the Bs, and so on.

Or consider this example. Let’s say you’re a parts supplier, and each part in your inventory has a two-letter prefix, followed by a number. The first letter tells you the main category of the part, and the second letter is the subcategory. You could use a one-letter or two-letter group interval to summarize, respectively, the records of each category or each subcategory.

Let’s take a look at how to create group intervals in reports by using the Report Wizard.

 Create A Report

Suppose you are the transportation manager at Northwind Trading. You have a few temps in to help you audit order and delivery dates. You want to group your audit records by order date and separate them into quarterly intervals, so that each temp has several quarters to work on.

Open the Northwind.mdb database in the Samples subfolder of your Microsoft Office folder. Assuming you’ve made a copy (or have a backup) of the Northwind database, open the file. In the Northwind: Database window, click the Tables button and double-click the Orders table to open it. Briefly review the fields and data in the table and close it.

With the Orders table selected in the Database Window, click the Insert menu and then Report. Select Report Wizard and click OK.

In the Available Fields section, double-click the OrderID, OrderDate, RequiredDate, ShippedDate, and ShipVia fields to add them to the Selected Fields section.

Click Next. In this dialog box, you decide how to group your records. As you can see in the scheme on the right, Access has already chosen ShipVia as the most likely grouping option.

You can easily change that. Click the Left arrow to move the ShipVia field to the left side, thus eliminating this group. Double-click OrderDate to group the records by order date.

 Choose The Group Interval

By default, Access chose a group interval of one month, as shown at the top of the scheme. You can choose a different interval.

Click Grouping Options. The only Group-Level Field is OrderDate. The Grouping Intervals selection is currently Month. Click the arrow and note that the time intervals extend from a Minute to a Year. Select Quarter and click OK. The group is now OrderDate by Quarter. Click Next.

You can choose to sort the records within each interval by other fields. In big reports with many fields, you may want to sort by as many as four fields. In this small report, one field will do. Click the drop-down arrow and select OrderID from the list. Click Next.

 Finish The Report

The next dialog box determines the layout. In most reports, a Landscape orientation is preferable because you want to fit more fields on the page. So in the Orientation section, click the Landscape button.

Click each radio button in the Layout section to view the various designs and then click Stepped and leave it selected. With just five fields in the report, you can probably fit all the fields comfortably on one page. Make sure the Adjust The Field Width So All Fields Fit On The Page option is checked. Click Next.

Use the Corporate style and choose Next. Highlight the text of the suggested title and type Smart Computing Orders By Quarter. Click Finish. Access creates your report.

The report includes records for the five fields you selected. At the far left, there’s also a column that labels the quarter. Within each of the quarterly intervals, records are sorted by OrderID.

Sorting And Grouping [Copy editor: I’ve left the "ing” ending because that’s what the actual tools are called.]

Click View to switch to Design View. Click View and then Sorting And Grouping. Click anywhere in the first row. In the very first column, you can see the group symbol for OrderDate, which tells you the report is grouped by this field. In the Group Properties below, click in the Group On property, which determines the interval. Qtr (for quarter) is the current selection. Click the down-arrow button to see a menu of other interval selections for this Date/Time field.

At this point, we’d love to add "If you prefer a different time interval for your report, just select it from the list.” Unfortunately, that won’t work. The labels and expressions that were generated when you created the report won’t automatically change to match the new interval. Although you could rework the report to agree with the new interval, it’s usually easier to just create a new report with the wizard.

Close the Smart Computing Orders By Quarter report. If you wish to discard it, click Reports in the Database Windows, right-click the report, select Delete, and confirm.