Customizing Reports
Adding a Date to a Report
Reference Window Adding a Date to a Report Display the report in the design view Click the Text Box Tool on the ToolBox Position the Pointer where you want the date to appear and then click to place the text box in the report. Click the text box and then type : =Date() and then press the Enter Key Page AC 6.19
There are two ways to add a date to a report. A second way is to click on Insert on the menu bar and select Date/Time...
There are two ways to add a date to a report. The Insert Date/Time Dialog box will appear giving you several options for your Date and or Time field.
Adding a Page # to a Report
Adding Page Numbers to a Report Reference Window Adding Page Numbers to a Report Display the Report in the Design view Click the Text Box tool on the toolbox Position the pointer where you want the Page # to appear Click to place the text box in the report. Click the textbox to activate it, type =[Page] and then press the Enter key. Page AC 6.21
There are two ways to add a Page # to a report. A second way is to click on Insert on the menu bar and select Page Numbers...
There are two ways to add a date to a report. The Insert Page Number Dialog box will appear giving you several options for your Page Number field.
Adding lines to a report
Adding Lines to a Report Reference Window Adding Lines to a Report Display the Report in the Design view Click the Line tool on the toolbox Position the pointer where you want one end of the line to appear Click, hold and drag the pointer to the other end of the line, and then release the mouse button. Page AC 6.21
You can use lines in a report to improve the report’s readability and to group related information together. The Line tool on the toolbox allows you to add a line to a report or from.
A line on a report is an object, just like a text box or label. You can therefore view it’s properties in a property window.
Notice the border style property. This is where you can select what kind of line you want such as a solid line or a dash.
Notice the border Width property. This is where you can select how bold of a line you want.
In Access 2000 Is here
Conditional formatting allows you to automatically change the format of a report or form control based on the control’s value. $1,000 $2,000 $2,000
For example, you can change the OwedAmt field’s font style or color when its value is over $2000 and change to a different font style or color when its value is between $1500 and 2000; the defined font style or color for the control is used for all other values.
Conditional Formatting Reference Window Defining Conditional Formatting for a Control In the Design view, click the control to select it. Click Format on the Menu Bar then Select Conditional Formatting. Select & enter the conditions, then select the format options to be used. For a second or third conditional format click Add. Click the OK button. Page AC 6.26
In the “Define Conditional Formatting Dialog Box the first section is for Default Formatting. This format will be used if no conditions are met. In the “Define Conditional Formatting Dialog Box the first section is for Default Formatting. This format will be used if no conditions are met.
You define the conditions desired in this area.
As you set formats, you will see a preview here.
Clicking the Add Button will allow us to add additional conditions.
Clicking the add button will add Condition #2 section.
You are allowed up to three conditional formats for each control.
Default Format is used when no conditions are met Format changes when conditions are met.
Sorting and Grouping Data in a Report Access allows you to organize the records in a report by sorting the records using one or more sort keys. Each sort key can also be a grouping field. If you specify a sort key as a grouping field, you can include a Group Header section and a Group Footer section for the group. A Group Header section will typically include the name of the group, and a Group Footer section will typically include a count or subtotal for records in that group.
Sorting and Grouping Data in a Report MUST It is very important to mention here, that Access reports do not use the sorting options in queries if the report is based on a query. Regardless of sorting options set in a query, your Access Report MUST have it’s own sorting options selected from the design view of the report or during the wizard process.
Sorting and Grouping Data in a Report Reference Window Sorting and Grouping Data in a Report In the Design view, click the Sorting & grouping Button. Click the first field/expression list arrow in the Sorting & Grouping Dialog Box and select the field to use as the primary sort key. In the Sort Order Text Box select the sort order. Page AC
Sorting and Grouping Data in a Report Reference Window Sorting and Grouping Data in a Report Repeat the previous step to select secondary sorting keys and their sort orders. To group data, click the field in the Field/Expression text box by which you want to group records. In the Group Properties section, select the grouping option for the field. Page AC 6.29
Sorting and Grouping button The Sorting and Grouping window can be activated by clicking on the Sorting and Grouping button on the Toolbar.
The Sorting and Grouping window can be activated by selecting View / Sorting and Grouping from the menu bar.
The top portion of the Sorting and Grouping window allows you to select the fields to Sort and Group on and the order in which you wish to sort.
The bottom portion allows you to select grouping options for each field.
If you select a field on the Top, such as Billing date, you can tell Access to create a group for this field by setting the Group Header or Group Footer property to Yes
Once a group header and or footer has been created, you can place fields in these sections from the underlying table or query or create calculated fields to calculate totals, averages, etc. for the group. AC 6.30 Page AC 6.30 discusses how to create calculated fields for group totals in these sections. Sorting and Grouping Data in a Report
When you print a report, anything contained in the Report Footer section appears once at the end of the report. This section is often used to display overall totals. Calculating Group and OverAll Totals
Before adding totals to a report, you must first add Report Header and Footer Sections to the report. Calculating Group and OverAll Totals
Reference Window Adding and Removing Report Header and Footer Sections Display the report in the design view Click View on the menu bar then Report Header/Footer To remove a Report Header or Footer Section, drag the bottom edge of that section up until the section area disappears. Page AC 6.31
Calculating Group and OverAll Totals Reference Window Adding and Removing Report Header and Footer Sections Display the report in the design view
Calculating Group and OverAll Totals Reference Window Adding and Removing Report Header and Footer Sections Display the report in the design view Click View on the menu bar then Report Header/Footer
Calculating Group and OverAll Totals Reference Window Adding and Removing Report Header and Footer Sections Display the report in the design view Click View on the menu bar then Report Header/Footer To remove a Report Header or Footer Section, drag the bottom edge of that section up until the section area disappears.
Reference Window Adding and Removing Report Header and Footer Sections When you remove Report Header Footer Sections, you permanently remove any objects that have been placed in the Header / Footer sections. Calculating Group and OverAll Totals
Reference Window Calculating Totals in a Report Display the report in the design view Click the Text Box tool on the Tool Box Click the report section that you would like your total in. (ie: Group Footer for a group total) This will create a textbox In the displayed text box, type =Sum([fieldname]) where fieldname is the name of the field to total. Page AC 6.31
Running Sum of a field Another handy tool that can be of value many times is the ability to accumulate numbers automatically.
Running Sum of a field This can be used for a number count as shown here, or accumulating totals or balances such as in a check register.
Running Sum of a Field Reference Window Running Sum of a Field Display the report in the design view Right click on the field & select Properties Find the Running Sum Property Select from the available options of No Over Group Over All
Running Sum of a field
Hiding Duplicate Values of a field on a Report In a report where the billing date is the same for many or all of the records you might want to display the Billing Date value only in the first record of a group, simplifying the report and making it easier to read.
Hiding Duplicate Values of a field on a Report Billing Dates on this report are all the same date Billing Dates on this report are all the same date
Hiding Duplicate Values in a Report Reference Window Hiding Duplicate Values in a Report Display the report in the design view Right click on the field whose duplicate values you want to hide and select Properties Click the right side of the Hide Duplicates text box, and then click Yes. Click the Close button on the property sheet to close it. Page AC 6.37
Hiding Duplicate Values of a field on a Report
Billing Date Duplicates are now hidden. Billing Date Duplicates are now hidden.
Page AC 6.38 Quick Check Review
Let’s take a few moments to break up into discussion groups. Each group will discuss the quick check questions on Page AC 6.38 in your books. We will then review the answers at the end of the discussion.
Quick Check Review Session 6.2 1) What is a grouping field?
Quick Check Review Session 6.2 2) When do you use the Text Box tool?
Quick Check Review Session 6.2 3) What do you type in a text box to tell Access to print the current date?
Quick Check Review Session 6.2 4) How do you insert a page number in a Page Header section?
Quick Check Review Session 6.2 5) What is the maximum number of conditional formats you can define for a control?
Quick Check Review Session 6.2 6) What is the function of the Sorting and Grouping button?
Quick Check Review Session 6.2 7) How do you calculate group totals and overall totals?
Quick Check Review Session 6.2 8) Why might you want to hide duplicate values in a report that includes groups?
AC 6.19AC 6.38 Your task today is to complete the exercises in Tutorial #6 Page AC 6.19 through Page AC 6.38 The disk is Level 2 Disk 1