You can enhance reports in many ways. In this exercise you:
Rearrange controls
Add a title and date
Add page numbers
Add a count of the total number of contacts
To rearrange controls, you:
Put the job role into the group header and change its display font
Move the remaining columns to close the gap left by moving the column
This is what the Design view looks like when you have finished rearranging the controls.
About report bands The design version of the report that you see in the Design view divides the report into bands of information.
The header band contains heading information and is located at the top of each page.
The detail band contains the retrieved data.
The summary band contains summary information that applies to the entire report and is located at the end of the report.
The footer band contains information to be located at the bottom of every page, such as a page number.
For groups, the group header band and group trailer band contain information for the group.
Move the pointer to the gray bar entitled 1: Header group title (where the black dot is) until you see a double-pointed arrow
Drag the band down about 4 to 6 grid dots.
(To drag, press and hold the left mouse button, move the mouse, then release the mouse button.)
Move the pointer to the title column and drag it into the band for the group header.
Put it near the bottom of the band and on the left as shown.
With the title column still selected, select the bold check box and the italic check box on the Font tab of the Properties view.
This makes the job role (title) stand out in the report.
Look at the Preview view.
You see the report and its data.
Notice that the value of the title column appears only once for each group. This is because the title column is now located in the group header band.
The Preview view is helpful for identifying problems. Notice that the header Job Role is still present even though there is no longer a column in the detail band. Next you delete the header.
Click the text Job Role in the header band.
Press the Delete key.
Drag the First Name and Last Name text boxes in the header band to the right to fill the empty space.
Drag the first_name and last_name columns in the detail band to the right to fill the empty space.
You make one final visual improvement now by left-aligning the text in the column headers.
Choose Edit>Select>Select Text from the menu bar.
This selects all the headers. It might be difficult to see that they are selected because the band is so narrow.
Click the left justification button on the StyleBar.
If your headers are not already bold, click the Bold button.
All the headers become left justified (and bold).
Look at the Preview view.
Now you add a title and date to the header band. They will be at the top of each page.
Move the pointer to the gray bar marked Header and drag it down about 10 grid dots.
Choose Edit>Select>Select Text from the menu bar (or use lasso selection).
This selects all the headers.
Drag all the headers down close to the gray band.
This leaves room for the title.
Click the Text button in the Objects drop-down toolbar in the PainterBar (or select Insert>Control>Text from the menu bar).
Move the point of the pointer above the First Name box and down one grid dot from the top of the page.
Click the left mouse button.
This positions the text box for the title.
Type My Contacts.
Select 14 from the Size drop-down list on the Font tab in the Properties view to make the title bigger (enlarge the text box if necessary).
The title is now enlarged.
Select Insert>Control>Today( ) from the menu bar.
Move the point of the pointer to the upper-left corner.
Click.
This places a computed field in the report. The computed field is for today’s date.
Look at the Preview view.
Your report now has a title and today’s date.
Now you put page numbers in the footer band.
Move the pointer to the gray bar marked Footer and drag it down about 4 grid dots.
If necessary, use the scroll bar to make room at the bottom of the Design view. Dragging down the footer bar makes space for the page number in the footer band. The page number is another computed field.
Select Insert>Control>Page n of n from the menu bar.
In the footer band, move the pointer to the center and down 2 grid dots. Click.
Select a different font size (10) in the Properties view, Font page.
This places a computed field for page numbers.
Look at the Preview view.
Click the scroll bar until you move to the bottom of the page.
You now have a page number on your report.
Now you add a count of the total number of contacts you have to the end of the report. You put the information in the Summary band, which means it prints at the end of the report.
Like the date and page number, the count is a computed field, only this time, you create it yourself.
Move the pointer to the gray strip marked Summary for the summary band and drag it down about 6 grid dots.
This makes space for the total number of contacts, which is a computed field.
Select Insert>Control>Computed Field from the menu bar.
In the summary band, move the point of the pointer to the center and down 4 grid dots.
Click.
This sets the position for a computed field that you use for the total number of contacts. The Modify Expression dialog box displays.
In the Functions box, click count(#x for all).
Your dialog box should look like this. The placeholder for what to count is highlighted.
In the Columns box, click last_name.
This selects the last_name column to apply the count function to. You are going to count all the last names to find out how many contacts you have in the report.
Click Verify.
You should get the message box stating that your expression is valid.
Click OK to close the message box.
Click OK to complete the definition of the expression for the computed field.
The computed field is in place.
Select Insert>Control>Text from the menu bar.
Position the pointer to the right of the computed field and click.
Type contacts in all.
Drag the text box to line it up with the computed field.
Select the computed field and the text using lasso selection.
On the Font page of the Properties view, select 10 for the font size and select the Bold check box and the Italic check box.
Look at the Preview view.
Use the scroll bar until you see the end of your report.
The summary band of your report now shows the total number of contacts in the report. The number you see may not be 60. The number depends on the contacts currently in your database.