Step by step exercise. Reports with groups


Objective.

 

To practice to design reports with grouping levels.

 

Open the Classes database.

We will use the report created in the previous exercise to modify it in the Report design window.

1 Position yourself in the Reports tab found in the Database window.

2 Click on the List of students by year report to select it.

3 Click on the button to enter into the Form design window.

4 Drop down the File menu and select the Save as... option.

5 Type Students by city.

6 Click on the OK button.

We are now going to change the grouping, we will group the students by city.

7 Click on the button on the toolbar. The Sorting and Grouping dialog box will open.

8 Notice how a group appears with the Date of birth field.

9 Drop down the list and change Date of birth for City field.

10 Change the Group on property, select Each value and close the dialog box.

11 Click on the control in the City Header section and Del Key to eliminate it.

12 Click on the City control in Detail section and drag it to the City header section.

13 Click on the City label in the Page Header section and Del Key to eliminate it.

14 Click on the button to see the result.

15 Close the print preview window by clicking on the Close button.

16 Enlarge the City control in the City Header section by clicking on it and draging its size selector on the right.

17 Click on the Address control in the Detail section and keeping depressed the Shift key, click on Address label in Page Header section.

18 Enlarge the two controls by draging Address control's size selector on the right.

We will now add a line of totals per city.

19 Click on the button on the toolbar to open the Sorting and Grouping window.

20 Change the Group footer property, substituting No with the Yes value e.g double clicking on No. Observe how a new City footer section has opened.

In this section a textbox control will be created based on Student Code field.

21 Open the Field List by clicking on the button.

22 Click on Student Code field and drag it into the City Footer section.

23 Open the Properties box that you have created by clicking on the button.

24 In the Control source property in the Data tab type = Count([Student code]).

25 In the Running sum property leave the value as No. We want a total for this group not for all records printed.

26 Select the control defined in this way and create another by copying it. (Select it, Ctrl + C, Ctrl + V and move the new to the right) so that they do not overlap)

27 In the Running sum property of the new control select the Over all value. This control will tell us how many students we have listed untill now.

28 Change the content of the labels of these two new fields as Students fron this city: and Students listed until now: respectively. (click on the label to select it and then click inside and type the new content)

29 Click on the button to see the result.

30 Save the changes and close the report.



   
   
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.