Introducing SQL Anywhere Studio
Tutorial: Creating Reports with InfoMaker
Lesson 3: Enhance your report
In this section we'll enhance the report by rearranging controls, adding a title and date, adding page numbers, and adding a total.
To enhance the report
Move the job role to the group header and change its font:
Move the pointer to the gray bar called 1: Header Group Title. The pointer changes to a double-arrow.
Drag the band down about five grid dots.
Drag the title column from the bottom of the preview pane into the bottom of the band for the group header.
With the title column still selected, click B and I on the style bar.
Review the report in the Preview view.
Fix up the headers:
Drag the First Name and Last Name text boxes into the right side of the header band to fill the empty space.
Drag the first_name and last_name columns into the right side of the detail band to fill the empty space.
From the Edit menu, choose Select
This selects all the headers. It may be difficult to see that they are selected, because the band is so narrow.
On the stylebar, click the Left Justification button. If your headers are not already bold, click the Bold button.
Review the report in the Preview pane.
Add a title to the report:
Drag the gray bar marked Header down about 10 grid dots.
From the Edit menu, choose Select
Drag all the headers down close to the gray band.
From the Insert menu, choose Control
Move the point of the pointer above the First Name box and down one grid dot from the top of the page. Click once. This positions the text box for the title.
Type My Contacts
Select size 14 from the dropdown list in the stylebar.
Add a date to the report:
From the Insert menu, choose Control
Move the point of the pointer to the upper left corner of the report and click. This places the date into the report.
Add page numbers to the report:
Drag the gray bar marked Footer down about four grid dots. If necessary, use the scrollbar 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.
From the Insert menu, choose Control
Place the pointer about two grid dots below the center of the footer band. Click.
Select size 10 in the stylebar.
Add a total by counting the number of last names:
Drag the gray bar marked Summary down about six grid dots. This makes space for the total.
From the Insert menu, choose Control
Place the pointer about four grid dots below the center of the summary band. Click.
The Modify Expression dialog appears.
In the Functions box, click Count(#x for all).
In the Columns box, click last_name.
Click Verify.
You receive a message stating that your expression is OK. Click OK.
Click OK to complete the definition of the expression for the computed field.
Format the total:
From the Insert menu, choose Control
Position the pointer to the left of the computed field and click.
Type Total contacts:
Drag the text box to line it up with the computed field.
Lasso the text and computed field by circling them with the pointer while pressing the left mouse button, and then releasing the mouse button.
On the Stylebar, select the font size 10, and click B and I.
To print, save, and close the report
From the File menu, choose Print Report.
In the Windows Print dialog, click OK.
From the File menu, click Close.
If you are prompted to save changes, click Yes.