Sei sulla pagina 1di 10

Creating Reports In Microsoft Access 2010

Sandra Dyke, 2012

Access 2010 Tutorial

This tutorial assumes the Microsoft Access 2010 Tutorial has been completed to create the Basic Sales System Database Objective: to create a report which could be used as a statement and looks like the following:

Sandra Dyke, 2012

Page 1

Access 2010 Tutorial Creating Reports

Producing a Report Using a Query Select the qCompleteSale Detail Query Select Create Report Design option

With the Property Sheet open, click on the down arrow for the record source and select qCompleteSaleDetail: You may need to resize the Property Sheet Window first.

If the query is not available, make sure the Selection type: Report shows Report at the top of the property sheet

Select the Add Existing Fields option and all of the fields contained in the query will be available. If any are missing, go back to the query, make sure the fields are contained in the query and the show box is ticked. Make any adjustments required to the query. Save your query. The new fields should then be available.

Save the report as rCustomerStatement

Sandra Dyke, 2012

Page 2

Access 2010 Tutorial Creating Reports

Adding Fields to the Report This is the report being created:

Drag (or double click) all of the fields required for the report into the Detail section of the blank report:

Dont worry about tiding anything up yet. Switch to Report View - fairly ugly really isnt it? Also, the customer details are repeated for each purchase.

Sandra Dyke, 2012

Page 3

Access 2010 Tutorial Creating Reports

Reducing Repeated Data Creating a sort based on CustomerID so that each customers details are only shown once. Make sure the Groups & Sort option on the Design tab is selected

Click on the Add a group button in the Group, Sort, and Total section at the bottom of the page.

Select CustomerID

This has created a Customer Header above the detail section of the report

And added a group tab in the Group, Sort, and Total section

Select the customer details in the Details section and cut and paste into the CustomerID Header

Now when the report is viewed, the customer details only appear once followed by all the sale details related to the customer. Sandra Dyke, 2012 Page 4 Access 2010 Tutorial Creating Reports

The sale detail headings are still being repeated so these need to be moved into the CustomerID Header section as well. To do this, the labels for each field needs to be separated from their field details. Select the sale details Click on the Stacked option in the Arrange tab Then while these items are still selected, click on the Remove Layout option Click on the top of the Detail bar until the pointer changes into a double headed arrow with a line through it and drag the bar down to make some space.

Click on the label portion of the field (should be the left half) and cut and paste into the CustomerID Header section. If the textbox portion is cut and paste as well, redo the separation step above.

Repeat the stack and remove actions above for the address details and then delete the customer detail labels so only the customer details remain.

Sandra Dyke, 2012

Page 5

Access 2010 Tutorial Creating Reports

Rearrange everything so that it looks like the following:

The CustomerID Header, Detail and Page Footer bars can be moved in the same way as the Detail bar was moved above. The space between the items in the report is determined by the space in each section so the separator bars may need to be adjusted to make things like right. View the report:

Sandra Dyke, 2012

Page 6

Access 2010 Tutorial Creating Reports

Creating Separate Pages Now to separate each customer on to their own page:

Click on the CustomerID Header to select it and change the GroupHeader0 name to CustomerIDHeader Then change the Force New Page option to Before Section.

View the report using the Print Preview option

Move through the pages by using the arrows at the bottom of the page. NB if the report is viewed in the Report option, there wont be separate pages.

Sandra Dyke, 2012

Page 7

Access 2010 Tutorial Creating Reports

Adding the statement total Click on More in the Group on CustomerID section and show the footer

Change the with no totals option to

The following: Make sure the TotalSalePrice is shown before selecting the ShowGrandTotal and Show in group footer options.

Add a label for total sales for period

Format the TotalSalePrice field to currency on the property sheet

Sandra Dyke, 2012

Page 8

Access 2010 Tutorial Creating Reports

Final Adjustments Make any final adjustments (eg bold headings, bring in a company logo this was done by using WordArt in Word and copying it to this report)

The date can be added to the page footer, a report title can be added to the report header and the date and time of printing the report can be added to the report footer but I leave this to you to try yourselves.

Sandra Dyke, 2012

Page 9

Access 2010 Tutorial Creating Reports

Potrebbero piacerti anche