creating the report objectWe now have several forms in our applications that will be used constantly to input information into the tables. Forms can also be used to output data (the results of queries) but they can be looked at only by the person sitting in front of the screen.
Now, you must know that in any commercial application, there is always a need to produce hard-copy versions of the screen info. That is the job of the report object in Access.
A report is very similar to a form but it's meant to be output to a printer and that will create certains restrictions.
the simplest reportLet's say you need a printed list of customers for the Garage app.
You select the Customers table, hit the Report button in the Create tab and it's done.
Now if you do a print preview on this you'll see that the layout of the report is nowhere near acceptable - there are too many fields, the columns are too wide and every customer record is printed-out over 3 pages. Obviously some changes are needed.
Lesson 1: just about every report you create will have to be customized. To do that you'll use the Report Design Tools that you get by choosing Design view for your report.
Lesson 2: an important trick that will avoid a lot of frustration - to move individual controls around, right-click on "Select entire row" and then on "Layout - Remove layout". If you don't do that the entire row only moves as one. You will probably use this a lot!
Lesson 3: if you're working with the Portrait layout you have a horizontal space of about 8 inches to work with. You will have to resize the controls and move them about to fit them into the space available. Then use the Arrange tab to space them and adjust the spacing, etc. so that the printed page will display neat rows and columns. Don't forget to drag the right margin back to the 8" line.
Lesson 4: fix Headers and Footers. The Headers contain the titles you wish to have printed. Notice that in the examples they do not match 100% with the Details. For example, there is usually no need to print Street, City, ZIP for an address - the title "Address" will suffice. You will also notice that the Date and Time have been added automatically to the report header. If you don't want to see them, just Delete the fields.
Footers are used for sub-totals, totals, etc. The number of pages is automatically included and you can see that there is a Count of the number of customers in the report footer. There are several functions that you can use in the footer when you have numeric fields to work with: Average(), Sum(), etc. We will see those in the next tutorial.