Group, Son, and Total X
Group on Altist ,.. with A on top ,.. , bJ entire value ,.. , With no tot.ls • , with title d ck to add ,
with a header section ... without a footer scroon ... . do not keep group together on one page • • less •
Ir- Add a group : ! Add a sort
USING MICROSOFT ACCESS 2016 Guided Project 6-1
Step 1: Download start file
Guided Project 6-1 For this project, you enhance the functionality of the database for a friend’s music collection. Recall that in Guided Project 4-1 you used the Report Wizard to create a report that shows all the songs on each album. For this project, you create an improved report that is grouped by artist and shows all the albums and song details. You use Design view to create the main report and the subreport and customize the report in Design view to add sections, add and edit controls, and add a running total. This project has been modified for use in SIMnet®.
Skills Covered in This Project • Create a main report in Design view. • Edit report in Design view. • Add a group section to a report. • Add and edit a control in a report.
• Create a subreport using the Report Wizard. • Add totals to a subreport. • Concatenate text data. • Add totals to a main report.
1. Open the MusicDatabase-06 database start file.
2. The file will be renamed automatically to include your name. Change the project file name if directed to do so by your instructor.
3. Enable content in the security warning.
4. Build the main report. To provide context for the steps in the project, view the completed report in Figure 6-106. a. Click the Report Design button [Create tab, Reports group] to open a new report. b. Click the Property Sheet button [Report Design Tools Design tab, Tools group] and the Format
tab, if necessary. c. Enter 7" in the Width property. d. Click the Data tab. e. Click the drop-down arrow in the Record Source property and select the Albums table. f. Click the Add Existing Fields button [Report Design Tools Design tab, Tools group] to open the
Field List. g. Double-click the AlbumName and Artist fields to add them into the Detail section. h. Save the report as SongListingOnAlbumsByArtist.
5. Add a group section to the report. a. Click the Group & Sort button [Report Design Tools Design tab, Grouping & Totals group] to
open the Group, Sort, and Total pane at the bottom of the report. b. Select the Add a group option in the Group, Sort, and Total pane. c. Select the Artist field from the field list. d. Click the More button in the Group, Sort, and Total pane to display the available options
(Figure 6-102).
6-102 Group, Sort, and Total pane
e. Change the without a footer section option to with a footer section. f. Change the do not keep group together on one page option to keep whole group together
on one page.
Access 2016 Chapter 6 Creating Advanced Queries and Reports Last Updated: 1/11/18 Page 1
USING MICROSOFT ACCESS 2016 Guided Project 6-1
g. Close the Group, Sort, and Total pane by clicking the X on the Group, Sort, and Total pane header. Be careful not to click the Delete button inside the pane or you will remove the group.
h. Save the changes made to the report. 6. Modify the report.
a. Move your pointer to the bottom edge of the Page Header section. The pointer changes to the resize arrow. Move the resize arrow up to the Page Header bar to remove the space in the section.
b. Right-click inside the report to open the context menu. c. Select the Report Header/Footer option to add Report Header and Report Footer sections to
the report. d. Click inside the Report Header section. e. Press F4 to open the Property Sheet and click the Format tab, if necessary. f. Enter .5" in the Height property. g. Click inside the Artist Header section. h. Enter .3" in the Height property. i. Follow the same steps to set the Height property of the Artist Footer section and Page Footer
section to .25", and the Detail section to 2". j. Add a label control into the Report Header section and type Songs on My Albums into the
label. k. Select the label and enter 1.8" in the Width property, .25" in the Height property, .15" in the
Top property, 2.7" in the Left property, 14 in the Font Size property, select Bold in the Font Weight property, and Yes in the Font Italic property.
l. Click the Page Numbers button [Report Design Tools Design tab, Header/Footer group]. m. Select the Page N of M radio button, the Bottom of Page [Footer] radio button, and Center
alignment. n. Click OK. o. Select the Artist text box. Press and hold the Shift key and select the Artist label. Both controls
should be selected. p. Drag the selected controls into the Artist Header section. Click anywhere to deselect both
controls. q. Select the Artist text box and enter 2.5" in the Width property, .03" in the Top property, and
1.5" in the Left property, and select Transparent in the Border Style property. When entering property values, don't worry if Access slightly changes a few of the values (for example, .03" becomes .0299".)
r. Select the Artist label and enter Recording Artist in the Caption property, 1.1" in the Width property, .03" in the Top property, and .35" in the Left property.
s. Select the AlbumName label and enter Album in the Caption property, .5" in the Width property, .05" in the Top property, and .35" in the Left property.
Access 2016 Chapter 6 Creating Advanced Queries and Reports Last Updated: 1/11/18 Page 2
f • ' ' ' I ' ' ' 1 ' ' ' I ' ' '2 ' ' ' I ' ' '3 ' ' ' I ' ' ' 4 ' ' ' I ' ' ' 5 ' ' ' I ' ' ' 6 ~ Report Header ........ .... ...... ,,,,. ... ............... ,,
~ Deta il .................. ,,, ... ............... ,,,,. .................. ,,,,, , ............. ,,,,
~ Report Footer .............. .............. ........ .......
H\\ Songntle Length .. ,,,,, ...... ........... . ''''' .. .... ........... . ''''' ' ....... .
,,, ............... . ,,, ............... . , , , .. ...... ..... .. .
.... ...
,,, ............... . ,,, ......... .... .. . ,,,, ............ .. .
. ... -------·
'''' .. .... .... . . . .. ... ........ .. . '' '' .. ...... .... .
................ .......... .... '' ........... .
USING MICROSOFT ACCESS 2016 Guided Project 6-1
t. Select the AlbumName text box and enter 3.5" in the Width property, .05" in the Top property, and 1" in the Left property, and select Transparent in the Border Style property. The report should look similar to Figure 6-103.
u. Save and close the report. 7. Build the subreport.
a. Click the Report Design button [Create tab, Reports group] to create a new report.
b. Press F4 to open the Property Sheet and click the Format tab, if necessary.
c. Type 6" in the Width property. d. Click the Data tab. e. Click the drop-down arrow in the Record Source property and select the Songs table. f. Click the Add Existing Fields button [Report Design Tools Design tab, Tools group] to open the
Field List. g. Add the SongTitle and Length fields into the Detail section. The Length text box should be
selected. h. Press and hold the Shift key and select the SongTitle text box. i. Click Tabular [Report Design Tools Arrange tab, Table group]. j. Press F4 to open the Property Sheet and click the Format tab, if necessary. k. Enter .02" in the Top property. l. Right-click inside the report to open the context menu. m. Select the Report Header/Footer option to add Report Header and Report Footer sections to
the report. n. Select both label controls in the Page Header section. o. Click the Move Up button [Report Design Tools Arrange tab, Move group]. p. Enter .2" in the Height property and .02" in the Top property. q. Right-click inside the report to open the context menu. r. Select the Page Header/Footer option to delete the Page Header and Footer sections. s. Click the Report Header section bar and enter .25" in the Height property. t. Follow the same steps to set the Height property of the Detail and Report Footer sections to
.25". The report should be similar to Figure 6-104.
6-103 Design view of the main report
6-104 Design view of the subreport
u. Save the report as SongsSubreport. v. Close the report.
Access 2016 Chapter 6 Creating Advanced Queries and Reports Last Updated: 1/11/18 Page 3
Songs on My Albums
Recording Artist Adele
Album 21
Son sSubre ort SongT .le
§ oiling in the ~I 3:49J § umour Has It J [ 3:43]
USING MICROSOFT ACCESS 2016 Guided Project 6-1
6-105 Layout view of the main report after adding the subreport
8. Add the subreport to the main report. a. Open the SongListingOnAlbumsByArtist report in Design view. b. Click the Subform/Subreport button [Report Design Tools Design tab, Controls group]. c. Click inside the Detail section of the report, close to the left border, below the Album label.
The SubReport Wizard launches. d. Select the Use an existing report or form radio button. The SongsSubreport report should be
highlighted in the list. e. Click Next. f. Accept the Choose from a list radio button and the Show Songs for each record in Album
using AlbumID statement and click Next. g. Accept the suggested name for the subreport and click Finish. The subreport is added into
the main report. h. Switch to Layout view (Figure 6-105). Verify that the subreport is correctly linked to the main
report.
i. Save the report. 9. Customize the main report and subreport.
a. Switch to Design view. b. Click to select the SongsSubreport label. c. Press Delete. d. Select the subreport. e. Enter .4" in the Top property, 1" in the Left property, and select Transparent in the Border Style
property. f. Save and close the report.
10. Open the SongsSubreport in Design view. a. Open the Property Sheet and click the Format tab, if necessary. b. Select both the Length text box and label. c. Enter .5" in the Width property. d. Select both the SongTitle text box and label. e. Enter .2" in the Left property and 4.7" in the Width property. f. Select the Report Footer section bar and enter .3" in the Height property. g. Add a text box control to the Report Footer section. h. Click the Data tab and then click the Build button on the Control Source property. i. Type =Count([SongTitle]) into the Expression Builder and click OK. j. Click the Format tab, and enter .35" in the Width property, .02" in the Top property, and 4.6"
in the Left property of the text box. k. Select the label control of that text box. l. Enter Total number of songs: in the Caption property, 1.55" in the Width property, .02" in the
Top property, and 3" in the Left property. Access 2016 Chapter 6 Creating Advanced Queries and Reports Last Updated: 1/11/18 Page 4
songs u11 My Album5
Recorcfi'l, Arnst Adele
Album 21
Album 19
SongT1ie lef"€1:h
floling in the Deep 71 3:49I ====================: ~ um our Ha; It ==================:11 4101 Turning Tables
Dont You Remember?
i;et Fire t o the Ra'1 II~ ===============~11 ~
~eWon't Go
TOr.e ltAII
II~ ===============~1 3481 rn BeWllld~
p neandOnly I~ ================~11 S:48j
---------------~~ ,Lovesong
~eone Like 'l'ou ______________ 7_='1 4:47I Total number of;,:,~ n
SongTj!'je length
,ba;dr e,m er
Bes! !of La,z 7C3:40J ==================;L4:1aj
Ch"""€ Pavements
r o1d Shoulder
]L}3o] ----------------------~11~
¢razv for You
:Met M y Heart to Stone ===============~II 3281 11 ml ================~~ First love
f ight..,Roh
~ ate You feel My Love
My Sane
===================;II ~ ====================;II ::§1 --------------==II ~
'ri-e:J ,Horn et<>N n GIOIV ================Q:1a1 ---'------------~=-II ~
Tocalnuf'lber of ,or-,.s: l12J
1otaJ number ofalbumsbv Ade'.e: j []
l>i:t:e1 of 30
USING MICROSOFT ACCESS 2016 Guided Project 6-1
m. Save and close the report. 11. Open the SongListingOnAlbumsByArtist report in Design view.
a. Click the Detail section bar and enter 1.4" in the Height property. b. Add a text box control to the Artist Footer section. c. Delete the label control of that text box. d. Select the text box, and on the Data tab click the Build button in the Control Source
property. e. Type ="Total number of albums by " & [Artist] & ":" into the Expression Builder and click OK. f. Click the Format tab, and enter 3.3" in the Width property, .02" in the Top property, .7" in the
Left property, and select Right in the Text Align property. g. Add another text box control to the Artist Footer section. h. Delete the label control of that text box. i. Select the text box, and on the Data tab click the Build button in the Control Source
property. j. Enter =Count([AlbumName]) into the Expression Builder and click OK. k. Click the Format tab, and enter .2" in the Width property, .02" in the Top property, and 4.1" in
the Left property, and select Left in the Text Align property. l. Enter .25" in the Height property
of the Artist Footer section. m. Save the report. n. Switch to Print Preview view. The
completed report should look similar to Figure 6-106. Notice how Adele’s name appears only once, at the top of both of her albums. This is because Artist is the grouping header.
o. Navigate to page 2 and then 3 of the report. Notice how Carly Rae Jepsen’s data starts on the top of page 3 instead of at the middle of page 2. This is because keep the whole group together on one page is selected in the grouping options.
p. Click the Close Print Preview button.
q. Close the report.
12. Close the database.
13. Upload and save your project file.
14. Submit project for grading.
Step 2 Upload & Save
Step 3 Grade my Project
6-106 Print Preview view of completed report
Access 2016 Chapter 6 Creating Advanced Queries and Reports Last Updated: 1/11/18 Page 5