1. Trang chủ
  2. » Công Nghệ Thông Tin

filemaker pro 11 the missing manual phần 5 docx

91 281 0

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 91
Dung lượng 1,34 MB

Nội dung

340 FM P : T M M Creating Layouts for Printing 6. Click OK. If your printer’s driver software hogs up even more margin space, then you see a warning message, but it doesn’t tell you which margin setting is too narrow. Tweak the margins until the warning no longer appears. The Layout Setup dia- log box disappears, and you’re looking at your layout again. If you have sharp eyes, then you notice the page width has shrunk a bit, as shown in Figure 7-52. Figure 7-52: The page break line (circled) shows where your layout cuts off when printed. You can now fill up your layout any way you choose, confident that it’ll all print properly on anybody’s printer. Tip: If you like working in pixels and don’t want the bother of switching units, take heart. You can prob- ably do the math in your head even faster. Remember, you have 72 pixels per inch: A one-inch margin would be 72 pixels, and a half-inch margin would be 36. (If you like centimeters, then figure 28 pixels per centimeter.) Now that you’ve fixed the usable space on the layout, you can rearrange the fields so that they fit nicely in the available width. Columns Occasionally your printed page needs to spread records across several columns. For example, when you print on address label sheets, the sheets you buy usually have two or three columns of labels on one page. Even when printing a List or Detail layout, if your data’s narrow, then you can save paper by printing two records side by side. FileMaker has a built-in solution to just this problem: Choose Layout➝Layout Setup, switch to the Printing tab, and then turn on the “Print in” checkbox. When you do, you can tell FileMaker how many columns you want by typing a number in the little entry box by the checkbox. When you turn on column printing for a layout, FileMaker shows you what’s going on in Layout mode, as Figure 7-53 shows. 341  :   Creating Layouts for Printing Figure 7-53: Top: FileMaker draws a dashed line through your layout to show you where the columns land. It also covers every column but the first with a dotted pattern. This pattern is its way of saying, “Don’t expect anything you put here to print.” Since every column is identical, you just have to lay out the first. FileMaker repeats it for the rest. Bottom: With the layout set to print in two col- umns, everything comes together in Preview mode or when you print. The column setting has no effect on your layout in Browse or Find modes. But if you print or switch to Preview mode, then you see the effect. Instead of repeating the Body part just vertically, FileMaker tiles the Body part both horizontally and verti- cally so that it fills the page. Every column has to be the same width (this makes sense because every column contains the same kind of information). FileMaker automatically sets the column width so that the columns perfectly divide the page. But it bases its assumptions about the size of the page on the settings in the Print Setup (Windows) or the Page 342 FM P : T M M Creating Layouts for Printing Setup (Mac OS X) dialog box at the time you turn on columns. If you later switch to a different paper size or orientation, then you probably want to resize the columns. To do so, just drag the first (leftmost) dashed line on the layout. When you finish, File- Maker makes every column the same width as the first one, with no space between them. (You can always simulate padding or a gutter between columns by keeping the things you add to your layout away from the column edges.) Lastly, FileMaker gives you two choices for the way it arranges records in the col- umns. Choose “Across first” in the Layout Setup dialog box if you want the second record to be at the top of the second column. Choose “Down first” if it should be the second item in the first column. The flow arrows on the icons in the Layout Setup dialog box show how the data flows onto the printout. Sliding Layout Objects Suppose you want to add the Notes field to the printed report so you can use it on the road. You know enough already to get the job done. Make the Body part a little taller, and then use the Field tool to add the Notes field to the layout. When you’re done, your layout might look like Figure 7-54. Figure 7-54: Here’s how you might add the Notes field to your layout. It lives below a row of data, and it’s italicized to make it visually distinct from the other fields. Of course you can make it look any way you want. If you preview this report, though, then you quickly spot a problem. Figure 7-55 shows the trouble. Normally, a field on the layout takes up a fixed amount of space, no matter how much (or how little) data is inside. You might be tempted to try to fix this with a merge field, but that doesn’t help here because no matter how tiny the text gets, the Body part is still just as tall as ever. You need some way for everything on the layout to slide up if the Notes field isn’t full. Luckily, FileMaker’s Inspector has the answer in the form of the Position tab’s Sliding & Visibility section. 343  :   Creating Layouts for Printing Figure 7-55: When you preview the report, you quickly see that your nice compact printout is now very space-inefficient. The Notes field is often empty, or holds just a line of text, but FileMaker reserves lots of space for it just in case. Also, if you have lots of notes in one record, then the field may not be big enough, so the text is cut off. But if you make the field even bigger, then you just waste more space. Sliding layout objects are the solution. When to use sliding Usually the normal field behavior doesn’t cause a problem. After all, you may want that empty space because you’re printing onto a preprinted form, and everything needs to go in just the right spot on the page, or maybe your report design counts on consistent field sizes so things line up properly. But sometimes you can’t get the effect you want without adjusting the layout based on the amount of data—usually when you’re trying to tighten things up on the printed page to avoid wasted paper or excessive spacing around data. Sliding does three things to help in this situation. First, it lets fields shrink to just the right size for their data. After a field has shrunk, any object on the layout can slide up or to the left to fill the space left behind. Choosing the objects to slide Object sliding in FileMaker is notoriously hard to figure out. It’s a bit like that board game Go. The rules take a minute to learn but a lifetime to master. Here goes. 344 FM P : T M M Creating Layouts for Printing FREQUENTLY ASKED QUESTION Merge Fields vs. Sliding Why should I bother with sliding? Isn’t that what merge fields are for? It’s true that merge fields and sliding objects have some things in common. Both adjust the data shown on a layout, squeezing things together in the process. But they have some major differences: • Merge fields work everywhere, even in Browse mode. Sliding objects, on the other hand, have no effect on Browse mode (or Find mode). Instead, they do their thing only in Preview mode and when printing. • Any object on a layout, including pictures, can slide. You can’t incorporate pictures into merge fields. • Fields that slide act just like normal fields in Browse mode, in that you can edit the data in them. Merge fields are just text objects, and only for display. Bearing all these differences in mind, you can easily figure out which method to use. If you have a few fields that you want to display as a single block of text, then use merge fields. If your needs are more complex (incorporating graphics, for instance), or you need to be able to edit data on the layout, then use sliding objects instead. Also, there’s absolutely nothing wrong with using both on one layout. In fact, the layout you just created could use merge fields for the name and address, along with the sliding to the Notes field. You can even tell a text object containing merge fields to slide if you want. Sliding exists for only one reason: to compensate for changing field data. Therefore, unless you set at least one field to shrink, nothing on the layout moves. Unfortunately, you can’t explicitly set a field to shrink. Instead, you set it to slide—and FileMaker makes sure it shrinks too. This seemingly simple principle is guaranteed to confuse you at least 36 times in the near future. You’ve been warned. Figure 7-56 shows how this field-shrinking business works. Once you’ve figured out which fields should shrink to fit their contents, you need to decide which objects should slide. What does that mean exactly? Normally, when you add an object to a layout, you specify exactly where it goes. But when the object is set to slide, its position is no longer fixed at an exact spot on the layout. Instead, it moves up (or to the left) if other objects above it (or to the left of it) move or shrink. Setting sliding options Once you have a general idea of which elements need to slide (and which fields have to shrink accordingly), you can start telling FileMaker. Here’s how to fix up your Report layout: 1. Select the Notes field, click the Inspector’s Position tab, and then locate the Sliding & Visibility section. 345  :   Creating Layouts for Printing Figure 7-56: Top: The thick black line is set to slide up and close the empty space below the text, but clearly it’s not. Bottom: After the field is also configured to slide up, it shrinks to be just tall enough for its contents and the black line can now slide up. 2. Turn on the “Sliding up based on” checkbox. If you stop here, you don’t quite have your problem solved. Even though the Notes field shrinks as much as possible, the Body part itself doesn’t shrink, and your report still wastes paper. To solve this problem, turn on “Also reduce the size of the enclosing part”. 3. Click OK. If you view your report now, things should look much better. Figure 7-57 agrees. Note: Once you start adding sliding to your layout, you might have trouble keeping track of which objects do what. To ease the pain, choose View➝Show➝Sliding Objects. When you do, FileMaker adds little up-pointing and/or left-pointing arrows to each object that slides. Now you can see at a glance what goes where. 346 FM P : T M M Creating Layouts for Printing Figure 7-57: With the Notes field set to slide up, your lay- out can now show long or short notes without wasting space. (In this picture, the layout arrangement has been improved from the one in Figure 7-55 to make things look more pleasing to the eye. You can do the same with your own layouts.) More Sliding & Visibility options The Inspector’s Sliding & Visibility section has several options to control just how the selected objects slide (and shrink if appropriate). In general, an object can slide left, up, or both. If you want something to just slide left, you’re in luck. Simply turn on the “Sliding left” checkbox, and you’re done. When you print or preview the layout, the objects slide to the left when field data isn’t long enough to fill the full width of the field. Objects that slide up, on the other hand, need a little more thought. To start, turn on the “Sliding up based on” checkbox. When you turn this checkbox on, you make three more options available. The “All above” and “Only directly above” radio but- tons are hard to explain. Figure 7-58, however, is worth a thousand words about sliding up. 347  :   Creating Layouts for Printing Figure 7-58: Top: Everything on this layout is “above” the Do Not Contact checkbox. But for the purposes of sliding, only two count. From FileMaker’s perspective, the Address field is directly above it, while the Phone field is sim- ply above it. If the Address field and the Do Not Contact checkbox are both set to slide up, then the “All above” or “Only directly above” choice becomes important. Middle: If you choose “All above”, then the checkbox never slides because the Phone field doesn’t. Bottom: If you choose “Only directly above”, then it sticks with the Address field, even if that means sliding up alongside the Phone field. Finally, if you turn on “Also reduce the size of the enclosing part”, then the part the object is on shrinks to fit its contents. Be sure to test and retest your layout. If you set a field to slide up and reduce the size of the enclosing part, all the layout objects be- low it have to be set to slide up too. If you don’t, the sliding object will indeed shrink, but the non-sliding objects below will obstinately hold their ground and you’ll sim- ply end up with a gap between them. Be cautious when sliding up based on “All above”. “All above” includes items to the right of the vertical page break. When previewing and printing, FileMaker ignores layout items to the right of the vertical page break, So it’s a handy spot to put on- screen notes or instructions that you don’t need printed. But no matter how far to the 348 FM P : T M M Creating Layouts for Printing right you place an object, it’s still above any objects further down the printable area. In other words, a layout object off to the right that by definition can’t be printed, can still prevent an object from sliding past it. The simplest solution is to slide based on “Only directly above”. One more Sliding & Visibility option is pretty self-explanatory. If you turn on “Do not print the selected objects”, then every object you select before you open the dia- log box disappears in Preview mode and when printing. This option is handy for things like navigation buttons that shouldn’t show up on the printed page, or back- ground graphics that would waste ink. 349   Understanding Calculations W hen you learned about tables, fields, and relationships in the previous chapters, you dabbled in FileMaker’s calculation dialog box. Most people first encounter the Specify Calculation window when they’re creating a calculation field, so it’s easy to think that’s the only place it’s used. True, writing for- mulas for calculation fields is probably the most common use of FileMaker’s calcula- tion engine (that’s the fancy name for the code that handles math for your database), but it’s far from the only use, as you’ll see later in this chapter. No matter where you run into the Specify Calculation window, it works the same way. You use that window’s field list, operators and predefined functions to tell the calculation how to find the value you need. This chapter tells you how the basic concept works. While calculations can make your database total invoices, analyze trends, and cal- culate dates and times, they aren’t limited to number-crunching tasks. You can use them to find out about the computer your database is running on, track who’s logged into the system, monitor their privileges, and then perform logical tests based on what you find. You’ll start by learning how FileMaker handles calculations, and then you’ll see how some common functions can take your database up to a new level of power. Understanding Calculations Way back on page 131, you saw how to create a field that’s defined as a calculation. A calculation is a mathematical formula that manipulates the information in your database to give you the answers you need. For example, for a line item on an In- voice, you need to multiply the price of an item by the quantity to get an extended [...]... tell the calculation engine where to find the values it’ll be working on When the calculation is performed or evaluated, first the field references are replaced with the actual values in those fields, then the operators tell FileMaker what to do to those values, and finally, FileMaker returns a result in your field 354 FileMaker Pro 11: The Missing Manual The Structure of a Calculation Note: FileMaker. .. reference 368 FileMaker Pro 11: The Missing Manual Using a Related Field in a Calculation 6 From the pop-up menu above the field list, choose Line items to view the table occurrence you need, and then, in the list of line item fields, double-click the Extended Price field FileMaker adds this field to the calculation, placing it between the parentheses that surround the parameters to the sum function... (page 655 ) Chapter 15 is where you learn when and how to use these big dogs of the function world Get functions Get functions pull up information about the computer, user, database, or FileMaker Pro itself They make up the largest group ( 95 in all) You can, for example, find out the computer’s screen resolution, the current layout’s name, the computer’s network address, the current user’s name, or the. .. going to be the same for every record, it’s time to call in a constant You simply include that value right in the calculation Number constants Sales tax is one of the most common constants If you need to add sales tax to your order, you can just type the percentage right in the calculation, since it’s the same for everybody: Order Total * 1.06 25 356 FileMaker Pro 11: The Missing Manual The Structure... first, and then addition and subtraction) FileMaker remembers, too, and it uses those same rules to figure out how to evaluate calculations If the rules don’t work for you, then parentheses let you take more control 358 FileMaker Pro 11: The Missing Manual The Structure of a Calculation Note: Two buttons in the Specify Calculation window’s Operators section aren’t really operators at all The ¶ is a... prefer the keyboard, you can use the Tab key to move from the Calculation box to the Field list, then the Operator list, and then the Function list Once you’re in one of these lists, use the up and down arrow keys to select an item (or type the first few letters of the item’s name) Finally, press the space bar to add the selected item to the Calculation box 7 From the “Calculation result is” pop-up... FileMaker lets you pick field names from a list The Table Occurence pop-up menu shows every table occurrence in the graph, with the related tables at the top, and the unrelated tables in a group below The list below the pop-up menu shows the fields in the selected table occurrence A calculation can refer to any related field in the database: FileMaker follows the appropriate relationships to grab the. .. throughout the next chapters: • Field references are just what they sound like They refer FileMaker to the data in the field you specify Since the data inside those fields can change on each record in your database, the values in each record can give a different result • Constants stay the same each time FileMaker does the calculation Turn the page for details • Operators tell FileMaker what to do with the. .. below uses the and operator It evaluates to Yes if the length is more than 3 and the height is more than 5 Length > 3 and Height > 5 • The or operator tells you if either value is Yes The or calculation below evaluates to Yes if the length is more than 3 or the height is more than 5 Length > 3 or Height > 5 • The xor operator’s function is as offbeat as its name It stands for exclusive or The xor operator...Understanding Calculations price To hand that task over to FileMaker, you create a calculation field, and then write a formula that refers to the appropriate fields by name FileMaker takes the information in the invoice fields, and does the math Note: The exercises in this chapter refer to the Jobs database from this book’s Missing CD page at www missingmanuals.com FileMaker calculations can also do more than math . to the appropriate fields by name. FileMaker takes the information in the invoice fields, and does the math. Note: The exercises in this chapter refer to the Jobs database from this book’s Missing. above”, then it sticks with the Address field, even if that means sliding up alongside the Phone field. Finally, if you turn on “Also reduce the size of the enclosing part”, then the part the object. in the first column. The flow arrows on the icons in the Layout Setup dialog box show how the data flows onto the printout. Sliding Layout Objects Suppose you want to add the Notes field to the

Ngày đăng: 14/08/2014, 08:21

TỪ KHÓA LIÊN QUAN