CSCI 107 Lab 14, Creating Reports in MS ACCESS
All of the lists from tables and queries can produce printed output, but
these lists are rather drab looking and cannot produce headings, totals or
many other types of formats. Access as well as most DBMS applications contain
some kind of report generator. We will produce a few simple reports in this
lab.
We will follow the outline below.
- Your instructor will give a brief discussion and demonstration of some
simple reports created in Access.
- Selecting the table or query to use in the report
- Creating the header, footer, detail and total bands
- formating, fonts, and calculated fields
- The remainder of this handout will guide you through creating two
reports.
Creating a Report
We will create a report using the Customer table in the Clasdemo2.MDB
file. . If you do not already have an ACCESS folder on your floppy disk, then
use the WIndows Explorer or My Computer to create a new folder on your floppy
called ACCESS. Once you have the ACCESS folder on your disk, copy the
file Clasdemo2.mdb from the folder t:\massey into your ACCESS
folder.
- Open the Clasdemo2.mdb file on your disk.
- Click on the Reports tab, then the New button,
selectDesign View
- Click the down arrow to choose the table, customer, click
OK You now see the general format of all reports. Each band contains
text and fields that appear in the report
- The Report Header and Footer bands show text that appears only at
the begining of the report. We will need to add that band now.
- Click View, Report Header/Footer
- Point to the bottom of the report header band until the double headed
arrow appears, then drag the band down 1/2" to make room for text to be
added
- The Page Header and Footer bands show text that appears on each
page
- The Detail band shows the contents of each row of data
- Add a title to the Report Header band as follows:
- click on the Aa label box in the tool box, then drag a text box in
the Report Header band and type XYZ Travel Report
- Click anywhere outside the text box, then select the textbox again.
- change the font type and size using the tool bar.
- add in some fields to the Detail band
- Click the ab text box in the tool box and drag a box for the
FirstName field somewhere in the Detail band.
- Right click in the text box you created and select
Properties.
- Click in the Control Source box and select the field
FirstName.
- Close the Properties window and click on the label field
associated with this text field and press the delete key to delete it.
- Select the FirstName field and move it to the first column
- Use a similar method to insert the LastName, Destination and Cost
fields in four equally spaced columns.
- Use a simialr method to insert column labels in the Page Header
band for each of the columns, Use the Label Box in the tool box.
- Click the Report View button on the tool bar. Notice the several
bands
- Click the Design View button and adjust the widths of the Bands as
necessary.
- CLose and save the report by selecting File, Close, Yes . The
report will now appear in the Report Tab selections
- Close the database and turn in your disk at the end of the lab.