Unit 12 exercise. Reports


Exercise 1: Cars

Part 2:

In order to be able to file the clients of each city in different pages I need to obtain a list grouped by city (within the city the clients sorted by surname), and the clients from different cities also need to be printed on different sheets.

1 Position yourself in the Reports tab in the Database window of the Cars database.

2 Double click on the Create report by using wizard option.

3 Select the Clients table as thereport source.

4 Click on the button to add all the fields to the report.

5 Click on the Next button to go to the wizards next step.

6 Click on the Client city field to select it.

7 Click on the button to add this grouping.

8 Click on the Next button to go to the wizards next step.

9 Drop down the first combo box and select Client Surname so that the records appear sorted by surname.

10 Click on the Next button.

11 Leave the Stepped activated as the report's layout.

12 Click on the Next button.

13 Select the style of report that you like most.

14 Click on the Next button.

15 Type the title as Clients by city.

We have to rectify the design because we want it to skip to the next page after ending each city, so we will indicate the Modify the report's design option.

16 Click on the Finish button.

Once we are in the Form design window we can add the page skipping. We want it to skip after ending a group and so we will later indicate this in the group footer.

1 Click on the button on the toolbar to open the Sorting and Grouping box.

2 Put Yes in the Group footer property, and the group footer will appear.

3 Click into the City Footer section.

4 Open the Properties window by clicking on the button.

5 Click on Format tab of the Properties window.

6 In the Force new page property select the After section value so that when the section ends, the group footer is printed and then a page skipping is done.

7 Click on the button to see the result. Observe how the page changes when a city ends.

8 Click on the Close button to exit the print preview.

9 Save the changes and close the report.

 

Part 3:

1 Position yourself in the Reports tab in the Database window of the Cars database

2 Click on the Create report by using wizard option.

3 Select Sold cars as the report source.

4 Click on the button to add all the fields to the form.

5 Click on the Next button to go to the wizard's next step.

6 Click on the button to remove the Client grouping.

7 Click on the Make field to select it.

8 Click on the button to add this grouping.

9 Click on the Next button to go to the wizard's next step.

10 Drop down the first combo box and select Model so that the records will appear sorted by model within the same make.

As we want to add a line of totals...

11 Click on the Summary Options... button to add the totals.

12 Mark the box corresponding the Price field in the Sum column so that it will calculate the sum of the prices of the same make.

13 Click on OK to return to the wizard.

14 Click on the Next button.

15 Leave the Stepped option activated as the report distribution.

16 Click on the Next button.

17 Select the style of report that you like most.

18 Click on the Next button.

19 Type the title as Cars by make.

We have to rectify the design because we want to add the amount of cars sold by make, so we will indicate the Modify the report's design.

20 Click on the Finish button.

When we are in the Report design window we will add a control. The total that we added with the wizard appear in the corresponding group footer (that which calculates the total of the prices). We are going to use this control to create a new one.

1 Click on the control corresponding the sum of prices so that it remains selected.

2 Press Ctrl + C to copy it.

3 Press Ctrl + V to paste it. A new control will appear.

4 Drag this control till the place in the report where you want it to remain. Maintain it selected.

5 Open the Properties box with the button (if it is not open). The new control's properties should appear, if not, click on the control to select it.

6 In the Control source property, change =sum([price]) for =count([license]) so that this control counts the licenses (it is the same counting cars as licenses).

7 Click on the button to see the result. Observe how you now have the both totals. To improve the design you can change the text of the labels and the format of the second total.

8 Click on the Close button to exit the print preview.

9 Save the changes and close the report.

 

Part 4:

In order to perform this exercise you need to follow the same steps as in the previous parts but without defining groupings or sortings.

 

Here you can practice moving and aligning the controls.

 

Exercise 2: Clinic

 

Part 2:

We will use the Patients with doctor query created in unit 7.

1 Position yourself in the Reports tab in the Database window of the Clinic database.

2 Click on the Create report by using wizard option.

3 Select the Patients with doctor query as the report source.

4 Click on Entry date field to select it.

5 Click on the button to add it to the list of fields in the report.

6 Click on the Patient surname field to select it.

7 Click on the button to add it to the list of fields in the report.

8 Click on the Doctor surname field to select it.

9 Click on the button to add it to the list of fields in the report.

10 Click on the OK button.

11 Click on the Next button to go to the wizard's next step.

12 Click on the Next button to go to the wirzard's next step.

13 Click on the Next button.

14 Leave the Tabular option as the report layout.

15 Click on the Next button.

16 Select the style of report that you like most.

17 Click on the Next button.

18 Type the title as Patient and doctor Entries.

19 Click on the Finish button.

20 Click on the button to see the result.

21 Click on the Close button to exit the print preview.

22 Save the changes and close the report.

You can also practice changing the column headers and the format of the controls.



 
Legal warning: Authorised on-line use only. It is not allowed the use of these courses in companies or private teaching centres.
© aulaClic. All rights reserved. Reproduction in any form whatsoever is prohibited. April-2006.