Report is a database object in Microsoft Access. It is used to pull data from table(s) or query(queries) to create a report. Moreover, you can use it to analyze or print data in specific layout. For example, you create a report with name and address data formatted to print mailing labels.
To create a report, you have fives ways as the following:
Once you want to create a basic report quickly, you can use Report tool. For example, you intend to create a report to display all data from TblCustomer. To do so, following the steps:
- Open your database
- Click TblCustomer in the Navigation Pane
- Click Create tab
- Click Report in the Reports group
Access creates and opens a report in layout view as below:
In this view, you can make design changes to a report while the data is displaying. For example, you can resize the text boxes, change font color, and font size of the displaying data.
It is a way of creating a report in Design View. In this view, you can make advanced design changes to a report such as dragging the fields that you want to display on a report from the data sources, inserting controls, and writing the VBA code. For instance, you intend to create a report to show all Categories in TblCategory. To do this task, do the following:
- Open your database
- Click Create tab
- Click Report Design in the Reports group
Access creates and opens a blank report in design view as the figure below:
As you see the report's figure above are divided into three main parts: Page Header, Detail and Page Footer.
- Page Header: This section is printed on the top the page. You use this section for the information such as field title, line, image, etc. Something you placed here displays on every page of a report when you view or print preview a report.
- Detail: It is the body of a report where the data that you pulled from the data sources displays.
- Page Footer: You can place page number, author's name, data time, etc what you want to display on the bottom of page. The report's page footer is the same as the document's page footer where you always put page number or author's name. The data you place on the report's page footer, it displays on every page of a report.
There are two other sections that do not display yet. To show them, you need to:
- Right on the square in front of Page Header, Detail or Page Footer section
- Click Report Header/Footer
Access adds two sections more as the figure below:
- Report Header: This section is printed on the top of a report above the page header, displaying just once. Report Header usually uses for the formation such as title of a report, logo, date time, etc. It plays as the cover page of a report.
- Report Footer: This section is printed on the bottom of a report, above the page footer. You can use it to display the total of entire report or summary information of entire report; it displays just once.
Note: When you open a report in Design View, you see the report footer is below the page footer. However, once you view a report you see something you place in report footer is above something place in page footer.
Back to the example, after Access creates and opens a report in Design View. Do the next steps:
- Click Add Existing Fields next to the Property Sheet in the Tools group
Access displays the Field List pane as the figure:
- Click Show all tables to displays names of the tables.
- Click plus sign (+) in front of table's name you want to drag its fields to crate a report
- Double-click or drag the field you want to display on a report
- Click View to see the result
If you want to add more features to a report such as title, logo, background, change font size, or font name of displaying data, open a report in Design View. See other three ways of creating a report on the next page.
This website intents to provide free and high quality tutorials, examples, exercises and solutions, questions and answers of programming and scripting languages: