USING THE SAME REPORT FOR SUMMARY, DETAIL, AND SUMMARY/DETAIL REPORTS

Usually, when a client asks that data be displayed in summary or detail format, the developer creates two versions of the same report. For this example, three choices are requested, so three reports would be needed: summary, detail, and summary/detail. This section shows you how to do it with just one report.

This example uses the SectionsDisplayExample form, which calls the report of the same name. The form consists of an option group named optDisplay and two command buttons: cmdPreview, which performs the OpenReport method, and cmdClose, which closes the form. Figure 11.1 shows the form in Design view.

Figure 11.1. This form calls a report with three different layouts.

Get F. Scott Barker's Microsoft® Access 2000 Power Programming now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.