Creating a New Report without Wizards etc.

Click on new and select design view - pick a table or query to work with. If you want data from multiple tables, create a query first and then use the query to create the report.

You should see the report form and the tool box (if not, select toolbox from the view menu or use the icon). It is also helpful to have the field list. You can get that from the view menu or from the icon. You should also see the rulers below - if not they too can be gotten from the view menu.

Now we are going to position some fields on the report layout. To do that, take the name from the field list and drag it over to the report - in the detail section. Notice that two fields appear. The left field is the label for the field and the right field is the actual data. If you grab the the left hand corner - a hand with one finger appears - you can move the two parts around separately. If you grab the field anywhere in the middle area - you see the full hand - you can move them around together. An of the other corners can be used to resize either of the boxed. At this point you can design a layout. Once the boxes are separate - you can delete the label portion and retain the data if you want to.

The figure below shows the boxes brought over for empdept and deptname. Notice that I have left the deptname label and data together, but that I have moved the label for empdept above the data.

In the following example, I deleted the label portions and positioned the data portions near the detail bar. Then I brought over label boxes into the header area to create headers for the columns. I wrote my own header information in the headers. I then dragged the footer bar up to control spacing between lines. The layout and the resulting report are shown below.

Looking at the results, you can see that the headers were lined up over the columns in the page header section. When you examine the output you also see multiple records in the detail area. Access automatically prints the data one row at a time. Because I left room around my columns, you can see that the rows are separated. If I had not brought up the page footer, the room would have been extremely large. The closer you position things between the detail and the page header, the less space you will see.



Now I am recreating this report and putting in a report header at the top. To do this I moved in the field names in the detail (I haven't redone the header names yet) and then I put in the page header. I right clicked and brought up the properties which I modified for look.

Now I will put the column headers back in with color also. I changed a couple of properties and the results are shown below.

This time I am using the pay table. First I brought over the id, then I wanted to concatenate the names. I brought in a text field from the tool box (it is called unbound), got rid of its header and clicked on properties. I then selected control source and used the expression builder to concatenate the name. It is interesting that when I click on fields and include the pay in front of the fields I have trouble and when I simply enter the fields it works. If anybody finds the reason, let me know. Also note that I did not put in the [ ] - Access added them.

Next, I brought over salary and then I did another expression builder with the pay per hour time the hours times 52. I also changed the format in the properties to currency.


Now I am adding totals. To do this, I first create a report header and footer (they come in a pair). Now I reduce the header so it is empty. Then I put sum information in the report footer. This is done with the expression builder and =sum(formula).

Notice that the =sum(empsalary) is in control source and the running sum is set to over all and the format to currency. In all of these it would be more professional to code a name.

Next I am going to group in the report. To do this you select sort and group from view and fill in the field to group on and whether or not you want group headers and or footers.