17
Reports in Access Please make sure that you have completed the queries task sheet before attempting this tutorial. You can create a variety of different reports in Microsoft Office Access 2007, ranging from the simple to the complex. Begin by thinking about your report's record source. Whether your report is a simple listing of records or a grouped summary of sales by region, you must first determine which fields contain the data you want to see in your report, and in which tables or queries they reside. After you choose your record source, you will usually find it is easiest to create your report by using the Report Wizard. The Report Wizard is a feature in Access that guides you through a series of questions and then generates a report based on your answers. http://office.microsoft.com/en-us/access/ HA012307391033.aspx Introduction: From the queries task sheet you should have created a query called “qryCustomerOrder”. This query should enable the user to enter a particular Order ID to retrieve a customer’s order. This query should have included a calculated field to calculate the cost of the quantity of each item multiplied by the price of the item. Create a Report_ EROS Page 1 of 17

Reports in Access

Embed Size (px)

DESCRIPTION

castlecollegeHNC web pages - Database Design Concepts_files

Citation preview

Page 1: Reports in Access

Reports in AccessPlease make sure that you have completed the queries task sheet before

attempting this tutorial.

You can create a variety of different reports in Microsoft Office Access 2007,

ranging from the simple to the complex. Begin by thinking about your report's

record source. Whether your report is a simple listing of records or a grouped

summary of sales by region, you must first determine which fields contain the

data you want to see in your report, and in which tables or queries they

reside.

After you choose your record source, you will usually find it is easiest to

create your report by using the Report Wizard. The Report Wizard is a feature

in Access that guides you through a series of questions and then generates a

report based on your answers.

http://office.microsoft.com/en-us/access/HA012307391033.aspx

Introduction:

From the queries task sheet you should have created a query called

“qryCustomerOrder”. This query should enable the user to enter a particular

Order ID to retrieve a customer’s order. This query should have included a

calculated field to calculate the cost of the quantity of each item multiplied by

the price of the item.

We should present this information in the form of a professional report. This

report will be given to the customer as an invoice.

Create a Report_ EROS Page 1 of 10

Page 2: Reports in Access

First Task:

Remove the calculated field from the query that you have previously created,

however make a note of it, we will need it again later on in this tutorial.

Once the first task is completed, follow each of the steps to create an invoice.

Step One:

Select the “Reports” object, and click on “Create report using the wizard”.

Step Two:

Once the wizard starts, select the “qryCustomerOrder” in Tables/Queries.

Select all fields by clicking on “>>”.

Create a Report_ EROS Page 2 of 10

Page 3: Reports in Access

Note:The >> brings over all of the fields. The < brings back one of the fields which you have selected and << brings back all of the fields. If you make

a mistake, or want to start over, click the << selection to bring back all of the

fields and try again.

Step Three:

You can select to view the data by each table within the query that was used

as the data source. As the order is related to the customer, select view “by Customer”, then click “Next”.

Create a Report_ EROS Page 3 of 10

Page 4: Reports in Access

Step Four:

This Report Wizard menu screen asks if you want to add Grouping.

Grouping simply “groups” records by an item in the report you are designing.

As these records are grouped already, simply select “Next”.

Step Five:

First, the above screen requests that you indicate a Sort Order. This simply

means that within each “group, the records will be sorted in alphabetical order. We’ll sort by “Description”.

Create a Report_ EROS Page 4 of 10

Page 5: Reports in Access

Note:Notice the Ascending button to the right of the Sort box. This indicates that

the Field that you select is in A to Z or ascending order. If you click-on this

button, it will reverse the order from Z to A, or descending order.

Notice a Summary Options button below the sort fields you have selected.

Access 2003 is “really smart.” Whenever you see the Summary Options box

it is because Access 2003 knows that you selected a number field for your

report. The Summary Options box ONLY appears when a number field is

selected!

The Summary Options menu box allows you to enter calculations for

numerical and currency fields if you have selected any.

Step Six:

This Report Wizard screen allows you to select a layout for your report. Click-in the small circles to the left of each choice in the layout area and

observe the results.

Select “Align Left 1”, “Landscape” and Tick the “Adjust the field width”

check box.

Create a Report_ EROS Page 5 of 10

Page 6: Reports in Access

Step Seven:

This menu screen allows you to select the Style that you would like for your

report. Click-on the choices (Bold, Casual, etc.) and see what each “looks

like”. Choose whichever style you desire and click-on Next> again.

Create a Report_ EROS Page 6 of 10

Page 7: Reports in Access

Step Eight:

The next Report Wizard screen is the last screen in the sequence. It allows

you to select a title different from the name of your database - if you so

choose. Note that the small circle in front of Preview the Report is “dotted”.

When we click-on the Finish button Access 2003 will go to a preview copy

of your report. We’ll title this report Invoice. Use this name, or any name you

desire, and click-on Finish.

Step Nine:

Your Report should look similar to the one below:

Create a Report_ EROS Page 7 of 10

Page 8: Reports in Access

Put this report in design view using “ ”.

Step Ten:

Add a label to the report and label it as “Cost”, using the label icon of the

toolbox.

Now add a textbox in the detail section (delete the automatically created label

that the textbox is accompanied with) and using the calculation that you took

out of the query from step one, insert the calculation part i.e. =[ItemPrice] *

[Qty]. – Remember these should match the names of your fields.

Format the textbox to “Currency”.

Create a Report_ EROS Page 8 of 10

Page 9: Reports in Access

You access these properties by right clicking on the textbox and selecting

“Properties”.

Change Format

Once completed run your report, and notice the calculated field.

Step Eleven:

The final task is to add a grand total field to the report. To achieve this, drag

down the report in the “Report Footer” and add a textbox. In the new label

change the text to “Total Cost” and change the text in the textbox to:

“=Sum([ItemPrice]*[Qty]). This will add up all the Cost per item values.

Create a Report_ EROS Page 9 of 10

Page 10: Reports in Access

Congratulations you have created an Invoice.

Your finished report should look like the one below, more formatting should be

applied to this report to make it more professional, make use of a logo.

Create a Report_ EROS Page 10 of 10