Working with Parts

Layouts are made up of parts. Depending on your objectives, your layout may contain header and footer parts, a body part, one or more subsummary parts, and maybe even a leading or trailing grand summary. Every layout must contain at least one part.

Briefly, the purpose and some characteristics of each type of part are as listed here:

  • Title Header Title headers are used when you need a header on the first page of a multipage report that differs from the header on subsequent pages. In Form view, a user can view a title header (while in Browse mode), but not in List or Table view.
  • Header Objects in the header part appear at the top of each page of a multipage report (except the first page when a title header is present). A header part remains fixed onscreen in List and Table views, even when a user scrolls to see additional records. Data in fields placed in a header part can be edited; fields in a header part always display data from the currently active record.
  • Leading Grand Summary Typically used on report layouts, a leading grand summary appears between the header and any subsummary or body parts. Summary fields placed in this part aggregate across the entire found set.

For more information about using summary fields and summary parts to create reports, see "Summarized Reports," p. 287.

  • Body The body part is used to display data from a single record. A data-entry layout often consists of nothing other than a body part. Almost every layout you create will have a body part.
  • Subsummary Subsummary parts are used primarily for displaying subtotals on reports. For a subsummary to display properly, the found set must be sorted by the same field as that on which the subsummary is based, and you must be in Preview mode. Subsummaries can be placed either above or below the body part, depending on whether you want the subtotals displayed before or after the data they summarize.
  • Trailing Grand Summary Similar to a leading grand summary, a trailing grand summary is typically found on report layouts and is used to display aggregate summaries. When printed, the trailing grand summary report appears directly following the body part and any trailing subsummaries.
  • Footer Objects in the footer appear on every page of a multipage printout (except on the first page when a title footer is present). In List view, the footer remains fixed on the layout when a user scrolls through records.
  • Title Footer A title footer part is used when you want to display a different footer on the first page of a multipage printout.

Adding and Ordering Parts

There are two ways of adding parts to a layout. The first is by clicking and dragging the Part button in the Status Area to the point where you want the new part to appear. You are prompted to select a part type when you let up the mouse. Although it is convenient, we discourage this method of adding new parts. New parts, except when added to the very bottom of the layout, always come at the expense of existing parts. That is, if you have a 50pixel header followed by a 200pixel body, and you attempt to add a subsummary between these parts, the body part shrinks by the size of the subsummary part. Moreover, fields that were in the body part may now be part of the subsummary part.

The other option for adding new parts, which we prefer in almost every circumstance, is to use the Part Setup dialog (shown in Figure 4.9), which can be found under the Layouts menu. When parts are added with this tool, it's not at the expense of any existing part; the total height of the layout increases.

Figure 4.9. You can add, edit, delete, and reorder the parts on a layout from the Part Setup dialog.

The Part Setup dialog can also be used to reorder, edit, and delete parts. The only types of parts that can be reordered are the body and subsummary parts. To reorder these, click the arrow in front of the part name and drag it to the desired position. Other part types appear with a lock in front of them, indicating that they are fixed in a certain order by definition.

You can delete a part from a layout either by selecting it from the Part Setup dialog and clicking Delete, or by clicking the part label while in Layout mode and pressing the Backspace or Delete key on your keyboard. Either way, when you delete a part, any objects contained in that part are also deleted.

Formatting a Part

You can configure a few attributes of parts directly from Layout mode itself. First, you can set a background color and/or fill pattern for a part by clicking on the part label, and then selecting a color and/or fill pattern. (Control-clicking) [right+clicking] on the part label similarly pulls up a contextual menu with access to these attributes.

You can achieve much the same effect simply by drawing a large rectangle on the layout, sending it to the back, and locking it. Setting a background color for the part is preferred, though, because the color extends to the right and downward if the user expands the window beyond the boundaries of your rectangle.

Tip

For users with monitors set to higher resolutions than your database was designed for, consider adding a footer with a background color different from your body part so that users can visually see where the layout "ends" and size their windows appropriately.

You can also change a part's size. To do this, simply click on the dividing line between two parts and drag either up or down. When making a part smaller, you can remove whitespace from the part, but you are prevented from dragging through any objects in the part. Any expansion of a part increases the overall size of the part.

Holding down (Option) [Alt] as you resize a part changes the rules slightly. First, any expansion or contraction comes at the benefit or expense of the neighboring part; the overall height of the layout remains the same (except, of course, when enlarging the last part on the layout). Also, you can "run over" objects this way; an object that was in one part may end up belonging to another part after you've resized things. An object that ends up straddling two (or more) parts belongs to the part that contains its upper-left corner.

The Size palette can also be used to see and set a part's length. This is the best way to precisely set part lengths, especially when trying to duplicate complex layouts from one file to another. Click the part label to display that part's data in the Size palette.

For more information about the Size palette, see "Positioning Objects on a Layout," p. 109.

 

Part Definition

Beyond the size and background color of a part, some part attributes can be set only in the Part Definition dialog, shown in Figure 4.10. You can get to this dialog either from the Part Setup dialog (by clicking Create or Change), or by double-clicking on the part label itself.

Figure 4.10. The Part Definition dialog is used to specify a part's type and attributes.

The type of part is indicated by the radio buttons on the left side of this dialog. You can change the type of a part simply by selecting a different radio button. If a type is grayed out, that means you already have a part of that type. The only part type for which you can have multiples is subsummary.

The fields on the right side of the dialog apply only to subsummary parts. When you make a subsummary part, you must specify which field will act as the break field for the summary. The break field doesn't need to actually appear in that part, but the found set must be sorted by the break field for the subsummary part to appear on a report.

For more information on break fields and subsummary reports, see "Summarized Reports," p. 287.

At the bottom of the dialog are some options for configuring page breaks and page numbers. Often in subsummary reports, you'll want each new subsection to start on a new page. To do this, you would edit the part definition of the subsummary part to include the Page Break Before Each Occurrence option. As you would expect, it's actually only each occurrence after the first one that's preceded by a page break.

You can also opt to use the Alternate Background Fill feature. This option is available only on body parts. Any color and/or fill that you specify is used as the background for every other record. It alternates with any background color that has been specified for the part itself. Often, a slight shading of alternate rows on a report makes it easier to read.


Part I: Getting Started with FileMaker 8

FileMaker Overview

Using FileMaker Pro

Defining and Working with Fields

Working with Layouts

Part II: Developing Solutions with FileMaker

Relational Database Design

Working with Multiple Tables

Working with Relationships

Getting Started with Calculations

Getting Started with Scripting

Getting Started with Reporting

Part III: Developer Techniques

Developing for Multiuser Deployment

Implementing Security

Advanced Interface Techniques

Advanced Calculation Techniques

Advanced Scripting Techniques

Advanced Portal Techniques

Debugging and Troubleshooting

Converting Systems from Previous Versions of FileMaker Pro

Part IV: Data Integration and Publishing

Importing Data into FileMaker Pro

Exporting Data from FileMaker

Instant Web Publishing

FileMaker and Web Services

Custom Web Publishing

Part V: Deploying a FileMaker Solution

Deploying and Extending FileMaker

FileMaker Server and Server Advanced

FileMaker Mobile

Documenting Your FileMaker Solutions



Using FileMaker 8
Special Edition Using FileMaker 8
ISBN: 0789735121
EAN: 2147483647
Year: 2007
Pages: 296

Flylib.com © 2008-2020.
If you may any questions please contact us: flylib@qtcs.net