Rreport headers which are used once at the beginning of the report and page headers that print at the top of each page. Group headers can be used when data is being grouped.The detail section is the main part of the report where detailed information can be printed. Then there are footers. There is a page header that can be used for date, time, page headers but not for numeric totals. These are down in the group footer section. The report footer is a one time area at the end of the report.
Using the Wizard:
First, I am going to run through a simple report using the wizard. I clicked on the wizard and then I must decided on the data that is to be the basis of the report. I decided to use a query that involved the donor, donation and drive tables to make this report. I then moved all of the fields over.
The next screen asks how you want to view the data (second picture on the following page). The picture shows the proposed layout.
The next screen gives an opportunity to change the way the report is structured.
If you click Summary Options, the following screen comes up. In this case, I choose to click on sum for the numeric field that is available, contribution.
The screen above deals with layout. You should experiment with the different options to see the available possibilities. You can then select the look that you want as shown in the next picture. Again, I suggest experiment with the options.
After the screen where you establish the style, the final screen asks you to name the report. I called it Donor Report 2000.
Now look at the report and compare it to the decisions I made as I created the report. First I grouped on DIdno and DName. I also specified that I wanted to SUM on DAmtCont and that summary line is shown. Notice that the summary line tells what group was summarized how many records were summarized and what the total is.
Report from Scratch:
Frequently when creating a report, it is a good idea to use a query to provide you the collection of data that you need for the report. If the appropriate query does not exist, you should create it prior to creating the report. To create this report, I am selecting design view and using the same threetable query.
When I bring this up, I see the toolbox, the properties for the report that shows the Record Source as the Threetables query and the field list which tells me what fields are available from the query. I can now create the report in much the same way that I created my forms, by dragging and positioning the data on the report. While you are here, note the things that are available when you are dealing with the report properties, for example order by, page header, page footer (note that the page header and footer have all pages selected and that indeed they appear on the sample report layout). Not shown here, but also available under properties are the grid X and grid Y which are currently set to 24 dots per inch but can be changed to centimeters (note that if you do not see the dots, you can go to the view menu and select the grid command).
Now I am going to use the sorting and grouping by to display the records on the report in a different order. If you know the field you want to order by, you can simply select the field under Field/Expression in the Sorting and Grouping window that comes up. If you need to put in an expression for the sort that can also be done. Note that in Access you enter the equal sign in front of the expression to signify that this is an expression, bot a field. If you want a header and a footer for the group, you should change the Group Header and Group Footer to yes. Ascending order is the default, if you want descending, you should change the Sorter Order column. Note that as soon as you change the Header and group footer to yes, you see additional groupings on the layout form - DIdno Header and DIdno Footer.
Now I am going to put the DIdno and the DName in the DIdno Header. Essentially the name changes with the identification number so they both are going to go in the header line.
Now it is time to put the rest of the data on the report. I can choose to put the column headers either in the page header where they will appear on each page or in the DIdno Header where they will appear each time the break happens. This is a look decision that the developer needs to make.
First I put on the page header as shown below (note I changed the font size to 12 and bold).
In the example above, I added the rest of the fields and put headers above in the page header area. I can either use the label individually to do this or I can cut and paste the label part of the field separately into the page header and then key in the words I want (the original label contains the name of the field). I also need to size the areas so that the detail and headers do not have lots of spaces above or below the field being shown. A partial view of the report is shown below.
When you are setting up the headers associated with text boxes, you can go into the text box icon on the tool box and get the defaults which can be changed. For example, you want to make sure that the Auto Label property is set to yes if you want the labels and to no if you want to do the labels as separate fields. You can also choose to get rid of the default colon that is associated with labels this way by setting the Add Colon property to no.
Notice that I do have group indicating by DIdno and that I have put the associated DName on the group line as well. Next I decided to use the line tool to put a line between the report header and the column headers. I changed the specs on the line as shown below.
Now I need to go back and put in group totals. I decided that I wanted to count the number of contributions in each group and get the total amount of the contributions and the sum.
To do this I used unbound text boxes. When I brought in the data such as DIdno and DName I used the field list to bring over the correct field. Now I used the text box to bring it over. I changed the format to semi-bold and italics to make them stand out a little. I put a name in just in case I want the reference (not really needed). The three formulas that I used are in the Control Source are: =Count(DIdno), = Sum(DAmtCont), =Avg(DAmtCont). The results are:
This would look better if I put on page numbers.
I put in the literal page and concatenated it with the reserved word page which tells which page and then concatenated with of and then concatenated with pages which tells the total number of pages. Note that I could have done this in the page footer.
Now I decided that I wanted to put in totals for the whole report. To do this, I first went to view and added report header/footer. Then I put in a label for report totals. Finally I copied and pasted the totals from the group and pasted them here, did a little alignment and saved.
Now I need to do one more thing, I need to format the numbers so that when the average is calculated I have limited decimal places. I decided the total fields and the detailed contribution fields should be formatted as currency. I went back and selected Currency from the list of choices presented under Format. I also went into the fields that contained the counts and changed the format to fixed and the decimal places to 0 so that I would see whole number formatting.
Now it is time to look at the report with the pages, final totals and formatting changes.