Previous | Table of Contents | Next

Page 491

FIG. 18.19
Margin window of
Layout Editor.


Changing the Positioning of Fields

To change the positioning of a field, click and drag the field to where you want it. However, remember that any database, formula, or summary columns that belong to a group in the query must remain inside the repeating frame for that group. The only way to reference a column outside its group is if you are doing a summary or another function using the Summary Column tool in the Data Model. To help keep objects in their correct placements, make sure you keep Confine turned on.

Formatting Fields and Resizing Fields

Formatting fields means giving number fields format masks. Open their property sheets and select the mask you want. You can justify the fields differently by using the Format menu, Alignment option. You can also align the fields by selecting the fields you want to align then selecting the Arrange menu Align Objects option. You can resize objects by using the Size Objects option from the Arrange menu.

Add Header or Trailer Pages

You can design header or trailer pages for your report by selecting the Header or Trailer icons from the toolbar. You can then design the pages however you want. They work exactly the same as the body of the report; you can put the same objects as in the body in the header and trailer.

Page 492

There are other things that you can do to make a report look better. You can add graphics, or images, or use the drawing objects to illustrate a part of the report. To do any of these things, you should either first create a frame to hold the objects, or place the drawing objects in an exisitng frame depending on how or when you want the new object to print. Then use the tool palette to select the tool you want and then use the mouse to place the object on the layout.

After doing some or all of these things you should have a pretty decent looking report.

Creating a Report Layout from Scratch

You always need to have a query defined in the Data Model editor before you start this process. I also suggest that you create a default layout as a starting point, as mentioned in the section prior to this one. This is important until you really understand frames and how they work. I am going to describe how to create a layout from scratch, although I highly suggest that you don't do it. The reason I will describe it is in hopes that it helps you to understand how the objects relate to each other.

  1. Open the Layout Editor and select the frame tool from the Tool Palette (the broken box).

  2. Click and drag the mouse so that it creates a large box.

  3. Right-click inside the frame, and from the menu select the Properties option. On the General Layout tab select a Sizing of Vertical Variable. Then click OK to close the dialog box. Figure 18.20 shows this step.

FIG. 18.20
What the frame looks like in the layout.


Page 493

Adding a Repeating Frame

  1. Select the repeating frame tool from the Tool Palette (the broken box with the arrow).

  2. Click and drag inside the frame created in Step one.

  3. Right-click inside the new repeating frame. On the Object tab, name the frame and select a source for the frame. On the General Layout tab give the frame a Sizing of Vertical Variable. Then click OK to close the dialog box. Figure 18.21 shows this step.

FIG. 18.21
The layout with a frame
and a repeating frame
with vertical variable
sizing, shown by the
diamonds on the
frames.


Repeat Steps 1 and 2 for all groups in the query. Make sure that the frames and repeating frames of subsequent groups are added inside the repeating frame of the group above it in the data model. In other words, as you build you should be working down the data model and inside of previous repeating frames.

Adding Fields to the Layout

  1. Select the Field tool from the tool palette (the abc button).

  2. Click and drag the mouse to create a box with an appropriate length and width. Make sure that the field is inside the repeating frame that corresponds to its group in the query. If you put the field in the wrong repeating frame, you will get an error.

    Hint: If you need to move a field from one frame to another a trick is to cut(Ctrl+X) the field then paste(Ctrl+V) the field back in the layout. It will paste the field in the middle of the screen, click on it and place it inside the new frame.

Page 494

  1. Right-click the field and on the Object tab give the field a source and a format mask if the field is of type number. If the field needs to have a Sizing specified, go to the General Layout tab and select it, and then click OK and close the dialog box. Figure 18.22 shows fields added to the layout.

FIG. 18.22
Notice that the field for
department is in the
department repeating
frame and the employee
fields are in the
employee repeating
frame.


    Repeat Step 3 for all database columns that are to be displayed as well as any formula columns or summary columns.

Adding Boilerplate Text to a Layout

  1. Select the Text tool from the tool palette (the big T). In the frame that surrounds the first repeating frame, click and drag the mouse to create a box. When you release the mouse button, the cursor appears in the box. Type the text that you want to appear. Click outside the box to close it.

  2. To edit the text later, click the Text tool and then click inside the boilerplate object on the layout. Figure 18.23 shows the boilerplate text labels added to the report.

    Use Step 1 to create any boilerplate text anywhere on the report. Other places you may want boilerplate text are in the report Header, Footer, or in the Margin.

    You also can add any OLE2 links or images to the report by selecting the appropriate tool from the tool palette, click-dragging the mouse on the layout to create a box, and

Previous | Table of Contents | Next