microsoft access 2010 chapter 6 advanced report techniques
TRANSCRIPT
MicrosoftAccess 2010
Chapter 6
Advanced Report Techniques
Advanced Report Techniques 2
• Create and relate additional tables• Create queries for reports• Create reports in Design view• Add fields and text boxes to a report• Format report controls• Group and ungroup report controls• Update multiple report controls
Objectives
Advanced Report Techniques 3
• Add and modify a subreport• Modify section properties• Add a title, page number, and date• Preview, print, and publish a report• Add totals and subtotals• Include a conditional value in a report
Objectives
Advanced Report Techniques 4
Project – Advanced Report Techniques
Advanced Report Techniques 5
• Determine the intended audience and purpose of the report
• Determine the source of data for the report• Determine the fields that belong on the report• Determine the organization of the report• Determine any calculations required for the
report• Determine the format and style of the report
General Project Guidelines
Advanced Report Techniques 6
• Click the Relationships button (Database Tools tab | Relationships group) to open the Relationships window
• Click the Show Table button (Relationship Tools Design tab | Relationships group) to display the Show Table dialog box
• Click each table to add, clicking the Add button after each table, and then click the Close button
• Drag the primary key from one table to the same field in the related table
• If desired, click the Enforce Referential Integrity check box• Click the create button to create the relationship• Click the Save button to save the changes and then click the Close
button (Relationship Tools Design tab | Relationships group)
Relating Several Tables
Advanced Report Techniques 7
Relating Several Tables
Advanced Report Techniques 8
• Click the Report Design button (Create tab | Reports group) to create a report in Design view
• Ensure the selector for the entire report, the box in the upper-left corner of the report, is selected
• Click the Property Sheet button (Report Design Tools Design tab | Tools group) to display a property sheet
• With the All tab (Property Sheet) selected, click the Record Source property box arrow to display the list of available tables and queries
• Click the desired table or query to use as the record source for the report
• Close the property sheet by clicking the Property Sheet button (Report Design Tools Design tab | Tools group)
Creating an Initial Report in Design View
Advanced Report Techniques 9
• Click the Group & Sort button (Report Design Tools Design tab | Grouping & Totals group) to display the Group, Sort, and Total pane
• Click the ‘Add a group’ button to display the list of available fields for grouping
• Click the field to group by• Click the ‘Add a sort’ button to display the list of
available fields for sorting• Click the field to sort by
Creating an Initial Report in Design View
Advanced Report Techniques 10
Creating an Initial Report in Design View
Advanced Report Techniques 11
• Click the Add Existing Fields button (Report Design Tools Design tab | Tools group) to display a field list
• Drag the field to add from the field list to the desired location
• Adjust the positions of the labels to their desired location(s). To move the control or the attached label separately, drag the large handle in the upper-left corner of the control or label. You can align controls using the Align button (Report Design Tools Arrange tab | Sizing & Ordering group) or adjust spacing by using the Size/Space button (Report Design Tools Arrange tab | Sizing & Ordering group)
Adding Fields to the Report in Design View
Advanced Report Techniques 12
Adding Fields to the Report in Design View
Advanced Report Techniques 13
• Click the label to change two times• Erase the current entry and type the new entry
Changing Labels
Advanced Report Techniques 14
• Click the Text Box tool (Report Design Tools Design tab | Controls group) and move the pointer to the desired position
• Click in the text box to produce an insertion point• In the text box, type the desired expression• Click in the text box label to select the label and then
click the label a second time to produce an insertion point
• Type the desired text box label text• Move the text box and label to the desired location
Adding Text Boxes
Advanced Report Techniques 15
Adding Text Boxes
Advanced Report Techniques 16
• Click the View button arrow (Report Design Tools Design tab | Views group) to produce the View button menu
• Click Print Preview on the View button menu to view the report in Print Preview
Viewing the Report in Print Preview
Advanced Report Techniques 17
• Click the control to format, and then click the Property Sheet button (Report Design Tools Design tab | Tools group) to display the property sheet
• If necessary, click the All tab• Set the desired properties in the property sheet• Remove the property sheet by clicking the
Property Sheet button (Report Design Tools Design tab | Tools group) a second time
Formatting a Control
Advanced Report Techniques 18
Formatting a Control
Advanced Report Techniques 19
• Select the controls to group• Click the Size/Space button (Report Design Tools
Arrange tab | Sizing & Ordering group) to display the Size/Space button menu
• Click Group on the Size/Space button menu to group the controls
Grouping Controls
Advanced Report Techniques 20
Grouping Controls
Advanced Report Techniques 21
• To modify grouped controls, click any one of the grouped controls to select the group, and then modify the properties in the property sheet
• To modify controls that are not grouped, select each control first, and then modify the properties in the property sheet
Modifying Grouped and Non-grouped Controls
Advanced Report Techniques 22
• Click the More button (Report Design Tools Design tab | Controls group) to display a menu of available tools
• Be sure the Use Control Wizards button is selected, click the Subform/Subreport tool, and then click the mouse in the desired location for the subreport and display the SubReport Wizard dialog box. Be sure the ‘Use existing Tables and Queries’ option button is selected
Adding a Subreport
Advanced Report Techniques 23
• Click the Next button• Click the Tables/Queries box arrow• Select the desired table or query for the
subreport, and then add the desired fields• Click the Next button and then ensure the ‘Choose
from a list’ option button is selected• Click the Next button, type the desired subreport
name, and then click the Finish button
Adding a Subreport
Advanced Report Techniques 24
Adding a Subreport
Advanced Report Techniques 25
• Open the Navigation Pane, scroll to the desired report to display, and right-click the report to produce a shortcut menu
• Click Design View on the shortcut menu to open the subreport in Design view
Opening a Subreport in Design View
Advanced Report Techniques 26
• Click the control for which you want to change the Can Grow property
• Click the Property Sheet button (Report Design Tools Design tab | Tools group) to display the property sheet
• With the All tab selected, scroll down until the Can Grow property appears, and then click the Can Grow property box arrow to display the list of possible values for the Can Grow property
• Click Yes in the list to allow the Course Description control to grow as needed
Changing the Can Grow Property
Advanced Report Techniques 27
Changing the Can Grow Property
Advanced Report Techniques 28
• Open the report containing the subreport in Design view
• Click the subreport and then drag the right sizing handle to change the size to the desired size, and then drag the subreport to the desired location
• Scroll down in the main report so that the lower boundary of the Detail section appears, and then drag the lower boundary of the section to the desired location
Resizing the Subreport and the Report in Design View
Advanced Report Techniques 29
Resizing the Subreport and the Report in Design View
Advanced Report Techniques 30
• Click the label for the section to modify, and then press the DELETE key to delete the label
• Click the Header bar to select the header, and then click the Property Sheet button (Report Design Tools Design tab | Tools group) to display the property sheet
• Make the desired modifications in the property sheet
Modifying Section Properties
Advanced Report Techniques 31
Modifying Section Properties
Advanced Report Techniques 32
• Display the Design tab, and then click the Title button (Report Design Tools Design tab | Header/Footer group) to add a title
• Click the Page Numbers button (Report Design Tools Design tab | Header/Footer group) to display the Page Numbers dialog box
• Click the desired format and position• Select the desired alignment, and whether you want
the number on the first page• Click the OK button
Adding a Title, Page Number, and Date
Advanced Report Techniques 33
• Click the Date and Time button (Report Design Tools Design tab | Header/Footer group) to display the Date and Time dialog box
• Click the desired date format, and select whether to include the time
• Click the OK button
Adding a Title, Page Number, and Date
Advanced Report Techniques 34
Adding a Title, Page Number, and Date
Advanced Report Techniques 35
• Right-click the Detail section to produce a shortcut menu
• Point to the Alternate Fill/Back Color arrow to produce a color palette
• Click None on the color palette to specify that there is to be no alternate color for the selected section
Removing the Alternate Color
Advanced Report Techniques 36
Removing the Alternate Color
Advanced Report Techniques 37
• Click the Add Existing Fields button (Report Design Tools Design tab | Tools group) to display a field list
• Drag the field to add from the field list to the desired location
Adding and Moving Fields in a Report
Advanced Report Techniques 38
• Scroll down so that the lower boundary of the Detail section appears, and then drag the lower boundary of the section to the desired location
Resizing the Detail Section
Advanced Report Techniques 39
• Click the Group & Sort button (Report Design Tools Design tab | Grouping & Totals group) to display the Group, Sort, and Total pane
• Group by the desired field• Click the Text Box tool (Report Design Tools Design tab |
Controls group), and then click the desired position for the text box
• Click the text box to produce an insertion point• Type the expression calculation for the sum (for example,
=Sum([Current Due]) ) and then press the ENTER key
Adding Totals and Subtotals
Advanced Report Techniques 40
Adding Totals and Subtotals
Advanced Report Techniques 41
• Click the View button arrow and then click Design View to return to Design view
• Right-click the report header to produce a shortcut menu
• Point to the Fill/Back Color arrow on the shortcut menu to display a color palette
• Click White in the first row, first column to change the background color to white
Removing the Color from the Report Header
Advanced Report Techniques 42
Removing the Color from the Report Header
Advanced Report Techniques 43
• Click the Text Box tool (Report Design Tools Design tab | Controls group) and click the desired location for the text box
• Click the text box to select it, and then click the Property Sheet button (Report Design Tools Design tab | Tools group) to display a property sheet
• Click the Control Source property to select it
Assigning a Conditional Value
Advanced Report Techniques 44
• Click the Build button to display the Expression Builder dialog box
• Double-click Functions in the first column to display the function subfolders
• Click Built-In Functions in the first column to display the various function categories in the second column
• Scroll down in the second column so that Program Flow appears, and then click Program Flow to display the available program flow functions in the third column
• Double-click IIf in the third column to select the IIf function
Assigning a Conditional Value
Advanced Report Techniques 45
• Click the <expression> argument to select it and type the desired expression (condition) (for example, [Amount Paid]>4000 )
• Click the <truepart> argument to select it and type the desired truepart (for example, .04*[Current Due] )
• Click the <falsepart> argument to select it and type the desired falsepart (for example, .02*[Current Due] )
• Click the OK button to specify the expression as the control source for the text box
Assigning a Conditional Value
Advanced Report Techniques 46
Assigning a Conditional Value
Advanced Report Techniques 47
• Create and relate additional tables• Create queries for reports• Create reports in Design view• Add fields and text boxes to a report• Format report controls• Group and ungroup report controls• Update multiple report controls
Chapter Summary
Advanced Report Techniques 48
• Add and modify a subreport• Modify section properties• Add a title, page number, and date• Preview, print, and publish a report• Add totals and subtotals• Include a conditional value in a report
Chapter Summary
Chapter 6 Complete
MicrosoftAccess 2010