Click here for great value web hosting.








Search for



Creating Simple Reports

Reports allow you to lay out your data in various ways to produce printouts of the contents of tables and the results of queries.  We are going to create a report using the Report Wizard.

To create a report using the Report Wizard, double click on Create report by using wizard in the Reports section of the database window as shown below.

A window appears as shown below from which you can choose fields from tables and/or queries to use as the basis for your report.  We are using the Employees table in this case, the window below shows the selected fields on the right hand side. 

Click the Next button and you will be given the opportunity to group your output, you do not have to choose a grouping field if you do not want to.  We are going to group our report by Department and the window below shows the grouping being selected.

If you click on the Grouping Options button you will be able to change the interval for the grouping fields, for instance, you may want the report to look at the first 2 letters of a field (e.g. AP123, AP285, AP35 would all group together under the AP group using the first 2 letters) and group by that rather than the whole field as we have done.

When you click Next after choosing any grouping you will be given an opportunity to sort your output, we are sorting by Surname and then by First name as shown below.  Again, you do not have to sort if you do not want to.

Click the Next button and you can choose a layout for your report as below.  If you report is likely to be wide, you might like to change the page orientation to landscape at this point.

When you click Next to go to the next window, you will be able to choose a style for your report, we have chosen the Corporate style as shown below.

Click Next and you will be able to name your report as shown below.  We have also chosen to Modify the report's design as we are now going to add an extra calculated field to our report.

When you click the Finish button you will see the form design if you have selected the options above or the finished report if you have chosen to preview it.  The window below shows our form design.

If necessary, you can re-size the text and field boxes to ensure that all your data can be seen.  Notice how we have dragged down the Page Header section and made the Date of Birth label deeper so that the column title goes on to two lines.  We are now going to add a new Text Box field using the Text Box control from the tool box.  When you have clicked on the Text Box control, drag out a suitable box anywhere in the Detail section of your report.  When you have done this you will probably want to move the label part of the text box to the Page Header section of the report.  To do this, click on the label part so that it is marked by black boxes on the corners and then use the Edit menu and Cut or press CTRL+X to cut the label onto the clipboard.  Click your cursor in the Page Header section of the report and choose Copy from the Edit menu or press CTRL+V.

When you have positioned your new text box, click your right mouse button on the data part of the box in the Detail section and choose Properties from the menu which appears.  Click on the Data tab of the window which appears and then click in the Control Source box.  You will see a box containing three dots appear at the side of this box when you enter it, click on this and you will see the Expression Builder window appear as shown below.  The window below shows the properties for our text box and the expression builder being used to enter a formula to calculate the age of the employee.

When you have finished building your expression, click OK and your new text box calculated field will be shown on your report as below.

Check that you are happy with the layout and then save the report by clicking the floppy disk icon.  To view your report, choose the report from the Reports section of the database window and click the Preview button.  Our finished report output is shown below.

When you have completed your report, you can change its design by clicking on the Reports section of the database window, choosing your report and clicking the Design button.  If you click on the Insert drop-down menu you will see that there are options for inserting page numbers or current date and time.  Any information entered in the Page Header and Page Footer sections will print on every page of the report.  You can edit the existing report title by double-clicking on the title to bring up the flashing cursor, you may then delete text and enter extra text as you require.

The typeface and size of font can be changed for any of the items in the report by clicking once on the box you want to change and selecting a new font and/or size from the boxes just below the icons at the top of the screen.  You may also embolden, italicise or underline items using the appropriate icons to the right of the typeface settings.  Remember that you may need to re-size the field boxes if you make the font face larger.

When you are in Design View you can change the sorting and grouping settings for your report by clicking on the Sorting and Grouping icon at the top of the screen .  This will bring up a window showing the sorting and grouping settings as below.

Notice the symbol to the left of the line that is set as the grouping field.  This symbol can be placed on another line by changing the value in the Group Header box at the bottom of the window to Yes for that field.  Note that the Group Interval can also be changed, this can be useful when you are grouping by numeric values and want to change the size of the groups.

Don't forget to save your report if you make any changes to its design.

Click here to return to the Access index.