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

filemaker pro 7 bible

937 507 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 937
Dung lượng 21,98 MB

Nội dung

Unlike many computer products that are periodically redefined by having drasticchanges made to the program’s focus changing a simple text editor into a desktoppublishing program, for exa

Trang 2

FileMaker ®

Pro 7 Bible

Steven A Schwartz Dennis R Cohen

Trang 4

Pro 7 Bible

Trang 6

FileMaker ®

Pro 7 Bible

Steven A Schwartz Dennis R Cohen

Trang 7

FileMaker ® Pro 7 Bible

Copyright © 2004 by Wiley Publishing, Inc., Indianapolis, Indiana

Published by Wiley Publishing, Inc., Indianapolis, Indiana

Published simultaneously in Canada

brandreview@wiley.com.

LIMIT OF LIABILITY/DISCLAIMER OF WARRANTY: THE PUBLISHER AND THE AUTHOR MAKE NO REPRESENTATIONS

OR WARRANTIES WITH RESPECT TO THE ACCURACY OR COMPLETENESS OF THE CONTENTS OF THIS WORK AND SPECIFICALLY DISCLAIM ALL WARRANTIES, INCLUDING WITHOUT LIMITATION WARRANTIES OF FITNESS FOR A PARTICULAR PURPOSE NO WARRANTY MAY BE CREATED OR EXTENDED BY SALES OR PROMOTIONAL MATERIALS THE ADVICE AND STRATEGIES CONTAINED HEREIN MAY NOT BE SUITABLE FOR EVERY SITUATION THIS WORK IS SOLD WITH THE UNDERSTANDING THAT THE PUBLISHER IS NOT ENGAGED IN RENDERING LEGAL, ACCOUNTING,

OR OTHER PROFESSIONAL SERVICES IF PROFESSIONAL ASSISTANCE IS REQUIRED, THE SERVICES OF A COMPETENT PROFESSIONAL PERSON SHOULD BE SOUGHT NEITHER THE PUBLISHER NOR THE AUTHOR SHALL

BE LIABLE FOR DAMAGES ARISING HEREFROM THE FACT THAT AN ORGANIZATION OR WEB SITE IS REFERRED

TO IN THIS WORK AS A CITATION AND/OR A POTENTIAL SOURCE OF FURTHER INFORMATION DOES NOT MEAN THAT THE AUTHOR OR THE PUBLISHER ENDORSES THE INFORMATION THE ORGANIZATION OF WEB SITE MAY PROVIDE OR RECOMMENDATIONS IT MAY MAKE FURTHER, READERS SHOULD BE AWARE THAT INTERNET WEB SITES LISTED IN THIS WORK MAY HAVE CHANGED OR DISAPPEARED BETWEEN WHEN THIS WORK WAS WRITTEN AND WHEN IT IS READ.

For general information on our other products and services or to obtain technical support, please contact our

Customer Care Department within the U.S at (800) 762-2974, outside the U.S at (317) 572-3993 or fax (317) 572-4002 Wiley also publishes its books in a variety of electronic formats Some content that appears in print may not be

available in electronic books.

Library of Congress Control No.: 2004110585

Trademarks: Wiley and the Wiley and the Wiley logo are trademarks or registered trademarks of John Wiley and

Sons, Inc and/or its affiliates FileMaker is a registered trademark of Claris Corporation All other trademarks are the property of their respective owners Wiley Publishing, Inc is not associated with any product or vendor mentioned

in this book.

is a trademark of Wiley Publishing, Inc.

Trang 8

About the Authors

Dennis R Cohen has been developing software and writing about it since the late

1970s Starting in the Jet Propulsion Laboratory’s Deep Space Network (DSN),through stints at Ashton-Tate, Claris, and Aladdin Systems, he was involved in creat-ing and maintaining such packages as the DSN Station Scheduling System, dBASE III,dBASE Mac, FileMaker, ClarisWorks, Claris Resolve, and many others

During this time, Dennis wrote numerous articles appearing in a variety of

differ-ent publications, including Personal Computing, Macintosh Today, Macworld, and

MacTutor The author (or co-author) of over a dozen books, including AppleWorks 6 Bible, AppleWorks 6 For Dummies, Mac OS X Bible, iLife Bible, Teach Yourself Visually iLife ’04 (all Wiley), and Mac Digital Photography (Sybex), Dennis has also been the

technical editor for over 100 titles, including all previous editions of FileMaker Pro

Bible.

Dennis resides in Sunnyvale, California, with his best friend — a Boston terriernamed Spenser You can find out more about him at his Web site at http://

homepage.mac.com/drcohen

In 1978, Dr Steven Schwartz bought his first microcomputer, a new Apple II+.

Determined to find a way to make money with it, he began writing software reviews,

BASIC programs, and user tips for Nibble magazine Shortly thereafter, he was made

a contributing editor

Over the past 20 years, Steve has written hundreds of articles for more than a dozen

computer magazines He currently writes for Macworld magazine He was also a founding editor of Software Digest as well as a business editor for MACazine From

1985 to 1990, he was the director of technical services for Funk Software

Steve is the author of more than 40 books, including all editions of Macworld

ClarisWorks/AppleWorks Bible and the FileMaker Pro Bible (Wiley); Running Microsoft Office 2001 (Microsoft Press); Visual QuickStart Guide for Internet Explorer 5 for Windows, Internet Explorer 5 for Macintosh, Entourage 2001 for Macintosh, CorelDraw

10 for Windows, and Office v.X for Macintosh (Peachpit Press); and dozens of

popu-lar game strategy guides

Steve has a Ph.D in psychology and presently lives in the fictional town of LizardSpit, Arizona, where he writes books and complains about the heat His official Website is www.siliconwasteland.com

Trang 9

Quality Control Technician

Charles SpencerBrian H Walls

Proofreading and Indexing

TECHBOOKS Production Services

Trang 10

To my friends and family: in particular, Spenser —DRC

To my family —SAS

Trang 12

FileMaker Pro is a mature database product We’re not talking about some

com-pany’s latest brainchild that is being foisted bug-laden onto an unsuspectingpublic In its various incarnations and from its various publishers, this product hasbeen known as FileMaker, FileMaker 2, FileMaker IV, FileMaker Pro, FileMaker Pro 2,

3, 4, 5, 5.5, 6 and now, FileMaker Pro 7 FileMaker Pro has been around the block — and we’ve been in lock step with it

Unlike many computer products that are periodically redefined by having drasticchanges made to the program’s focus (changing a simple text editor into a desktoppublishing program, for example), FileMaker Pro’s versions have all shown steadyprogression This means that if you’ve used any version of FileMaker Pro — evenone that is several years old — the information and experience that you’ve gainedhaven’t been a waste of your time Much of your knowledge can be applied directly

to the current version of the program

Although we’ve reviewed computer programs for more than 20 years for magazines

such as Macworld and PC World, only a surprisingly few products have impressed

either of us enough to stick with them over the years FileMaker Pro is such a gram Apparently, much of the computer community agrees with this assessmentbecause FileMaker Pro currently owns the vast majority of the Mac database mar-ket, and it’s making steady inroads into the world of Windows Because we assumethat you own or use a copy of FileMaker Pro, you’re in excellent company

pro-About This Book

FileMaker Pro 7 Bible is a different kind of computer book First, it’s not a manual.

Many people don’t like computer manuals — perhaps because they feel obligated

to read a manual from cover to cover, or perhaps because manuals are designed

to explain how features work rather than how to make a program work for you

FileMaker Pro 7 Bible is not a book you must read Rather, it’s a book we hope you’ll want to read and reference because it provides easy-to-find and easy-to-understand

explanations of the common tasks for which you bought or use FileMaker Pro in thefirst place When you want to know how to use a particular program feature, youcan use the extensive table of contents or the index to identify the section of thebook you need to read

Trang 13

Second, like previous incarnations of FileMaker Pro Bible, this is a cross-platform

book Whether you use a Macintosh or a Windows PC, the material in this book isapplicable to you Windows- and Mac-specific material are clearly delineated so younever have to guess whether a particular procedure or explanation is relevant to you

When commands, dialog titles, or other program elements are different between

the two platforms, they are shown as Macintosh item/Windows item (such as Ô+L/

Ctrl+L)

Third, although we hope you’ll find some of the material in this book entertaining, the

primary mission of FileMaker Pro 7 Bible is to inform We really want you to

under-stand how FileMaker Pro works and to make it do what you want it to do No matterwhere you turn in this book, if you find yourself with a puzzled look on your faceafter reading a section, we haven’t done our job

Finally, the philosophy of this book — as well as the other books in the Bible series

from Wiley — is that you don’t want or need a handful of books to learn all about

a computer program: One book should suffice FileMaker Pro 7 Bible is an

all-in-one book that gives you a well-rounded knowledge of FileMaker Pro and FileMaker

Developer You don’t just learn how to perform an action; you also learn when and

why you would perform that action You can find almost anything you want to know

about FileMaker Pro in this book

Whom This Book Is For

FileMaker Pro 7 Bible is for anyone who uses version 7 of FileMaker Pro or FileMaker

Developer:

✦ If you’re a beginning FileMaker Pro user, step-by-step instructions help you get up to speed quickly with explanations of how to use common (and not-so-common) FileMaker Pro features and procedures

✦ If you’re an intermediate or advanced FileMaker Pro user — someone whodoesn’t need much handholding — tips and insights in each chapter will helpyou get the most from FileMaker Pro And you’ll find the information provided

in the sidebars to be handy additions for your FileMaker Pro toolbox

How This Book Is Organized

Each chapter is self-contained When you must perform a particular FileMaker Protask, scan the table of contents to locate the chapter that addresses your needs Youcan also flip through the pages of the book to find the chapter you need quickly

FileMaker Pro 7 Bible is divided into seven parts.

Note

Trang 14

Part I: The Fundamentals

This part is a gentle introduction to database concepts, essential FileMaker Pro cepts and procedures, and what’s new in FileMaker Pro 7

con-Part II: Database Design Basics

This part instructs you in using the various design tools to construct databases anddesign different types of layouts

Part III: Working with Databases

Here you will learn about working with databases: entering and editing data, ing for particular records, sorting, designing reports, and printing

search-Part IV: Putting FileMaker Pro to Work

This part covers material that helps you make more productive use of FileMaker Pro

It isn’t essential to learn about these features immediately, but you will want totackle them after you’re comfortable with the FileMaker Pro basics

Part V: Mastering FileMaker Pro

Material in this part will interest more experienced FileMaker Pro users and would-bedevelopers, including information on using relations and lookups to link databases;

using FileMaker Pro in a network workgroup and setting security options; publishingdatabases on the Internet or a company intranet; sharing data via ODBC, JDBC, andXML; and enhancing FileMaker’s capabilities with plug-ins

Part VI: Developing Databases for Others to Use

This is where we tie together the pieces, advising you how to put together databasesthat others can use, either as custom solutions or commercial (including shareware)products We discuss FileMaker Developer 7’s additional features and capabilities

as well as how they augment your development efforts

Part VII: Appendixes

The appendixes present all keyboard shortcuts for the Macintosh and Windows sions of FileMaker Pro 7; explain all the FileMaker Pro built-in functions; list additionalresources to which you can turn to learn more about FileMaker Pro; and explain com-mon computer, system software, database, and FileMaker Pro terms that you mightnot know

Trang 15

ver-Conventions Used in This Book

The book contains the following icons:

The New Feature icon identifies new features found in FileMaker Pro 7 All other tures are available to FileMaker Pro 6 users

fea-The Note icon highlights a special point of interest about the topic being discussed —information that is not necessarily vital to performing a task Look here if you’reinterested in achieving a more well-rounded knowledge of FileMaker Pro

The Tip icon marks a timesaving shortcut or technique that will help you worksmarter

The Caution icon alerts you that the action or operation being described can causeproblems if you aren’t careful

Mac icons make it easy to identify material that is specific to the Mac computer

platform All other material is relevant to all supported platforms.

Ditto for Windows, 2000 or XP

This icon informs you that something discussed here can be found on the CD-ROMthat accompanies the book

We use the Cross Reference icon to point you to a discussion elsewhere in thebook where you can find additional information relevant to the current topic ortask

How to Use This Book

We won’t tell you how to read this book Reading and learning styles are all verypersonal When Steve gets a new computer program, he frequently reads the man-ual from cover to cover before even installing the software Of course, he’ll be flat-

tered if you read FileMaker Pro 7 Bible the same way — but we’ll be surprised.

Cross-Reference

On the CD-ROM

Caution Tip Note New

Feature

Trang 16

Dennis, on the other hand, generally looks through any Read Me file that nies the software and does a quick scan of the manual while the software is installing.

accompa-He expects that you will probably fall somewhere between his style and Steve’s

This book is written as a reference to all things FileMaker Pro When you want tolearn about defining fields, there’s a specific chapter to which you can turn If youjust need to know how to use the spelling checker, you can flip to the table of con-tents or the index and find the pages where this feature is discussed Most proce-dures are explained in step-by-step fashion so you can quickly accomplish even themost complex tasks Thus, you can read this book like you would a novel, read justthe chapters that interest you, or just use it as a quick reference to learn about aparticular feature or procedure

For those who prefer a little more direction than whatever works for you, some

gen-eral guidelines are suggested in the following paragraphs — arranged according toyour level of computer expertise and FileMaker Pro experience

However, we do make one general suggestion: If at all possible, read this book with

FileMaker Pro onscreen Sure, you can read about editing a user dictionary for the

spelling checker while relaxing in the tub, but unless you have exceptional recall,what you read will be more meaningful if you’re sitting in front of the computer

Additionally, many tasks involve multiple interface elements (dialogs, tools, andcontrols), and following along is a lot easier if you actually see the items being referenced

For the beginner

Like the manuals of most computer programs, this book assumes you have a generalgrasp of the procedures necessary to use your computer, such as using the mouse,choosing commands from menus, using the Finder/Windows Explorer, and printingdocuments If FileMaker Pro is your first program and you have not yet taken the time

to work through the manuals that came with your computer, stop reading now It’stime to drag out the manuals for your computer, printer, and system software Afteryou fill in the gaps in your computer education, you’ll feel more confident and com-fortable tackling FileMaker Pro and any other programs you eventually use

If you’re relatively new to computers and FileMaker Pro, start by reading all of Part

I This part will acquaint you with database concepts and the FileMaker Pro basics

Next, work through the tutorial presented in Chapter 4 This chapter gently leadsyou through the process of creating your first database, which is a relatively full-featured address book in which you can record your business and personal con-tacts Finish by reading the remaining chapters of Part II (Chapters 5–7) and at leastthe next three chapters of Part III (Chapters 8–10) This material will provide youwith a sufficient grounding in FileMaker Pro concepts and features to enable you totackle basic database projects Then, as you find it necessary to explore additionalprogram features, such as printing or creating calculations, you can simply jump tothe appropriate chapter

Trang 17

The more advanced stuff is saved for Parts IV and V Although you’ll eventuallywant to check out the material in those parts, too, we’ve purposely separated theadvanced matters from the basics in order to keep new users from being over-whelmed Finally, if you’re planning to create databases for others to use, checkout Part VI In fact, much of the material in Part VI can be useful to you for per-sonal database projects, assuming that the projects are fairly complex.

For the more experienced computer user

If you’re familiar with databases, you can safely skip Chapter 1 The material in thischapter is very basic and is probably second-nature to you If FileMaker Pro is your

first database program, however, you should at least skim through the material in

For an owner of a previous version of FileMaker Pro

As mentioned earlier, FileMaker (in its various incarnations) has always workedbasically the same Through the years, however, new features and capabilities havebeen added If you are familiar with an older version of FileMaker, you should payparticular attention to material in the following chapters:

✦ Chapter 3 provides a brief description of all changes and new features duced in FileMaker Pro 7

intro-✦ Chapter 14 explains how to create calculations For a complete reference to allFileMaker Pro built-in functions, you should review Appendix C as well

✦ Chapter 15 discusses ScriptMaker and explains how to automate many mon tasks

com-✦ Chapter 16 explains the procedures for moving data between FileMaker Proand other programs

✦ Chapter 18 discusses FileMaker Pro’s relational and lookup capabilities,enabling you to use data in the current database from another table, either

in the same database file or in an external database file

Trang 18

✦ Chapter 19 explains how FileMaker Pro works on a network, and shows how

to create accounts and privilege sets to control accessibility for different users

✦ Chapter 20 tells how to use Instant Web Publishing to host databases on theWorld Wide Web or a corporate intranet

✦ Chapter 21 delves into more advanced database connectivity and import/

export issues, explaining how to use ODBC, JDBC, XML, and XSLT to sharedata with non-FileMaker data sources

✦ Chapter 22 shows you how to use plug-ins to expand FileMaker’s capabilities

✦ Chapter 23 introduces the things you should consider when creating a databasefor others to use

✦ Chapters 24, 25, and 26 cover the additional capabilities present in the Maker Developer 7 version of FileMaker This includes the Script Debugger,Database Design Reports, custom functions, file maintenance, and theDeveloper Utilities

File-Example Files

We’ve included the critical files for this book as well as other examples fromFileMaker, Inc on the CD accompanying this book

Trang 20

There are many other people who should get some credit and are too numerous tomention by name, but especially deserving of thanks are Michael Cohen for a fastid-ious technical review, Paul Levesque for coordinating the project so smoothly, andTeresa Artman for her careful copy edit As a group, Dennis would like to thank allthe folks at FileMaker, Inc (especially his friends on the development and testingteams) for producing such a landmark version of the product The incredible newfeatures and continued high reliability make this, at least in his opinion, the biggestsingle advance in FileMaker’s power since the initial release — and you made iteven easier to use

Trang 21

Contents at a Glance

Preface ix

Acknowledgments xvii

Part I: The Fundamentals 1

Chapter 1: What Is a Database? 3

Chapter 2: FileMaker Pro Basic Operations 21

Chapter 3: What’s New in FileMaker Pro 7? 49

Part II: Database Design Basics 61

Chapter 4: Creating Your First Database 63

Chapter 5: Defining Fields 125

Chapter 6: Layouts 179

Chapter 7: Setting Preferences 247

Part III: Working with Databases 261

Chapter 8: Working with Records 263

Chapter 9: Searching for and Selecting Records 301

Chapter 10: Sorting Records 329

Chapter 11: Reports 349

Chapter 12: Using the Spelling Checker 361

Chapter 13: Printing 381

Part IV: Putting FileMaker Pro to Work 403

Chapter 14: Calculations and Computations 405

Chapter 15: Automating FileMaker Pro 425

Chapter 16: Exchanging Data 513

Chapter 17: Creating and Using Templates 551

Trang 22

Part V: Mastering FileMaker Pro 561

Chapter 18: Linking Tables: Relationships and Lookups 563Chapter 19: Using FileMaker Pro in Workgroups 599Chapter 20: Web Publishing with FileMaker Pro 625Chapter 21: Advanced Database Connectivity with XML and ODBC/JDBC 641Chapter 22: Expanding FileMaker’s Capabilities Using Plug-Ins 663

Part VI: Developing Databases for Others to Use 673

Chapter 23: Designing Databases for Others 675Chapter 24: Debugging Scripts 703Chapter 25: Generating Database Reports 707Chapter 26: Creating Custom Database Solutions 715

Part VII: Appendixes 731

Appendix A: Macintosh Keyboard Shortcuts 733Appendix B: Windows Keyboard Shortcuts 745Appendix C: FileMaker Pro Function Reference 755Appendix D: Glossary 831Appendix E: Resources 851Appendix F: About the CD 857Index 861End-User License Agreement 903

Trang 24

Preface ix Acknowledgments xvii

Chapter 1: What Is a Database? 3

Paper Databases versus Computer Databases 5Limitations of paper databases 5Advantages of computer databases 6When should you use a database program? 8Flat-File and Relational Databases 8Introducing FileMaker Pro 10FileMaker concepts 10Getting “The Big Picture” 16Business uses for FileMaker Pro 17Home uses for FileMaker Pro 18Summary 18

Chapter 2: FileMaker Pro Basic Operations 21

Starting Up 21Quitting 26File-Handling Procedures 27Opening, creating, and closing databases 27Saving files 30Making a backup copy of a file 32Automatic backups 35Issuing Commands 38Using Tools and Palettes 40Using Toolbars 44Getting Help 45Help for Windows users 45Help for Macintosh users 47Summary 48

Trang 25

Chapter 3: What’s New in FileMaker Pro 7? 49

The FileMaker Pro 7 Product Family 49Changes Introduced in FileMaker Pro 7 50Operating system requirements 50File format changed 51Multiple tables per file 51New relational model 51New Database Definition dialog and Field options 51New Accounts methodology eliminates groups 53New calculation features 53ScriptMaker enhancements 54Enhanced Instant Web Publishing (IWP) 54Unicode support 54New and updated templates 54Changes Introduced in FileMaker Pro 6 55Global changes 55Browsing features 57Find features 57Layout/design features 57ScriptMaker features 58Importing and exporting features 59

Chapter 4: Creating Your First Database 63

Step 1: Create a New Database 65Step 2: Define Fields 66Step 3: Set Field Options 70Step 4: Design the Work Layout 72Creating a new layout 73Setting field attributes 76Text attributes 76Placing the fields 78Adding the finishing touches 88Step 5: Design the Home Layout 94Editing the Home Layout 95Step 6: Create the Data Entry Buttons and Scripts 106The script definition process 107The Work and Home layout scripts 108

Go to Layout scripts 108Step 7: Design a Report Layout 113Resizing the fields 117Formatting the header 118

Trang 26

Formatting the footer 119Modifying the Business Phone Directory script 120Generating a report 121Step 8: Set Startup Actions 121Tips for Using the Database 123Summary 124

Chapter 5: Defining Fields 125

Setting Field Definitions 125All about field types 128Setting Field Options 148Auto-enter options 150Data validation options 158Repeating fields 162Value lists 164Indexing and storage options 169Modifying Field Definitions, Names, and Options 172Changing field names 172Deleting a field and its data 173Duplicating fields 174Setting options for existing fields 175Changing a field’s type 176Changing or deleting options for a field 177Summary 178

Chapter 6: Layouts 179

Layout Basics 180Creating New Layouts 182Standard form layouts 185Columnar list/report layouts 187Creating a complex columnar report 191Table View layouts 195Label layouts 196Vertical Label layouts 202Envelope layouts 203Blank layouts 204Designing Your Own Layouts 205Understanding layout parts 205Adding a layout part 208Modifying layout parts 210Adding items to a layout part 213Formatting Fields and Other Objects 225Using the measurement and alignment tools 225Moving and resizing fields and objects 227Setting field formatting 228

Trang 27

Adding and modifying text 237Duplicating formats 238Applying the finishing touches 238Duplicating, Renaming, Reordering, and Deleting Layouts 242Duplicating a layout 242Reordering layouts 243Renaming a layout 244Deleting a layout 244Summary 245

Chapter 7: Setting Preferences 247

Setting FileMaker Pro 7 Preferences 248Setting General preferences 249Setting Layout preferences 251Setting Memory preferences 252Setting Plug-Ins preferences 253Setting Fonts preferences 254Setting Document-Specific Options 255Open/Close file options 255Spelling file options 257Text file options 258Graphics file options (Mac only) 260Summary 260

Chapter 8: Working with Records 263

Browse Mode Basics 263Switching to Browse mode 264Using Browse mode controls 264Working in different views 272Data Entry and Editing 274Creating new records 274Entering data 275Editing records 295Deleting records 298Using the spell checker 298Summary 299

Chapter 9: Searching for and Selecting Records 301

Find Mode Basics 301Switching to Find mode 302Using Find mode tools and functions 302

Trang 28

Finding Records 303Matching all criteria: AND searches 305Using symbols in search criteria 305Matching one criterion or another: OR searches 307Matching different kinds of text 307More about Find Requests 310Creating additional Find requests 311Repeating and editing Find requests 311Deleting Find requests 312Matching Special Items 312Matching values in a range 313Matching the current date 313Searching for empty fields 314Searching for values greater or less than a given value 314Searching for duplicate records 315Searching for invalid information 316Finding records that don’t match the criteria 316Working with Found Records 317Omitting records from a found set 317Swapping found sets with omitted records 319Extending and constraining the found set 319Copying found sets 320Deleting found sets 320Replacing values in a found set 321Working with all records again 326Summary 326

Chapter 10: Sorting Records 329

About Sorting 329Creating a Sort Order 333Sorting on one field 336Sorting on multiple fields 338Modifying Sort Specifications 340Sorting Data in Portals 340Additional Sort Options 343Using a value list to set a sort order 343Setting an international sort order 344Sorting by Summary fields 344Unsort: Restoring the original record order 348Summary 348

Chapter 11: Reports 349

Report Design Essentials 349Designing a report layout 350Selecting records to include in the report 351

Trang 29

Sorting the found set 352Printing or previewing the report 352Modifying and Reusing Layouts 354Working with layout parts 355Duplicating a report layout 356Transferring layouts between databases 357Summary 359

Chapter 12: Using the Spelling Checker 361

Setting Spell-Checking Options 362Specifying Your Dictionaries 363Checking Your Spelling 365Spell-checking on request 365On-the-fly spell-checking 369Working with User Dictionaries 370Creating a User Dictionary 370Adding words to a User Dictionary 371Merging user dictionaries 374Spelling Tips and Tricks 375Creating a spelling list from an existing database 375Restricting spelling checks to a subset of fields 378Summary 379

Chapter 13: Printing 381

The Steps in Printing 381Step 1: Decide What to Print 382Step 2: Specify a printer and print settings 387Step 3: Print 393Step 4: Troubleshooting 397Effective Printing Tips 399Laser printers 399Ink-jet printers 400Dot-matrix printers 400Summary 400

Chapter 14: Calculations and Computations 405

About Calculation Fields 405Arithmetic operators 407Logical operators 407Comparison operators 408Text operators 409Creating an expression 410Creating a Calculation Field 411

Trang 30

Using FileMaker Pro’s Built-In Functions 413Validation by Calculation 422Calculation Logic 423Summary 423

Chapter 15: Automating FileMaker Pro 425

Using ScriptMaker 426Listing scripts in the Scripts menu 429Running a script 430Modifying a script 431Printing scripts 433Importing scripts from other databases 433Script Step Reference 434Script step options 436Script step definitions 437Attaching a Script to a Button 503Advanced Scripting Procedures 505Decision-making in scripts 505Using loops in scripts 506Environment considerations 506Executing other scripts from within a script 506Using AppleEvents 508Using AppleScript 509Summary 511

Chapter 16: Exchanging Data 513

Moving Data between Programs 513About importing and exporting 514Understanding file formats 515Importing Data from Other Sources 518Format selection 518Data clean-up prior to importing 519Opening a foreign data file to create a new database 529Importing data from a digital camera (Mac only) 532Importing data from a folder 536Exporting Data 538Format selection 538Data clean-up 539Exporting records 539Moving Data Using Drag and Drop 541Exchanging Data between Macs and PCs 542Moving data to and from FileMaker Pro for Windows 542Understanding the compatibility issues 543Exchanging Data with Microsoft Office 546Using Excel Data in FileMaker Pro 546Summary 549

Trang 31

Chapter 17: Creating and Using Templates 551

The FileMaker Pro 7 Templates 551Installing a Template 553Reinstalling a Fresh Copy of a Template 555Saving a Database as a Template 555Working with a New Template 558Summary 559

Chapter 18: Linking Tables: Relationships and Lookups 563

Lookups versus Relationships 564Going Relational with FileMaker Pro 578Defining a relationship 579Placing related fields in a layout 581Self-joins 584Working with Lookups 588Defining lookup fields 590Performing a relookup 593Additional Relationship/Lookup Options and Requirements 595Summary 596

Chapter 19: Using FileMaker Pro in Workgroups 599

Running FileMaker Pro on a Network 599Hosts and clients 602Notes on cross-platform database sharing 606Protecting Databases and Setting Privileges 607Creating accounts 608Record-level access privileges 612Passing out accounts 613Modifying accounts 614Creating and deleting privilege sets 614Working with a protected file 618Summary 622

Chapter 20: Web Publishing with FileMaker Pro 625

Publishing Methods and Views 625Instant Web Publishing 628Publishing a database with Instant Web Publishing 628Testing your published database 632Instant Web Publishing limitations 634Interacting with a database published with Instant

Web Publishing 635Publishing Static Pages on the Web 637Summary 639

Trang 32

Chapter 21: Advanced Database Connectivity with XML and ODBC/JDBC 641

Exporting and Importing XML 642Exporting XML data for use in other applications 643Importing XML data into FileMaker Pro 647FileMaker and ODBC 651Configuring a simple ODBC driver (Mac) 652Configuring a simple ODBC driver (Windows) 654Importing data via ODBC 656Using FileMaker Pro as an ODBC/JDBC data source

(Windows only) 658Moral of the Chapter 660Summary 660

Chapter 22: Expanding FileMaker’s Capabilities Using Plug-Ins 663

Plug-in Licensing and Use 664Installing the Troi Plug-Ins 665Plug-In Examples 666Troi Dialog plug-in 667Troi File plug-in 669More Plug-Ins 672Summary 672

Chapter 23: Designing Databases for Others 675

Simplify the Interface by Using Menus 677Creating a Navigation Menu 680Providing Instant Access via Buttons and Scripts 682Consider Screen Real Estate 682Protecting a Template 683Creating Help Systems for Your Databases 685Suggested Help topics 685Different approaches to providing help 687More help with Help 698Using FileMaker Developer 700Summary 701

Chapter 24: Debugging Scripts 703

Introducing the Script Debugger 703Using the Script Debugger 704Summary 706

Trang 33

Chapter 25: Generating Database Reports 707

Specifying a Database Design Report 707Summary 713

Chapter 26: Creating Custom Database Solutions 715

Working with Custom Functions 716Defining a custom function 718Invoking custom functions 719Using the File Maintenance Command 720Using the Developer Utilities 721Planning for a runtime solution 725Branding your layout themes 728Summary 730

Appendix A: Macintosh Keyboard Shortcuts 733 Appendix B: Windows Keyboard Shortcuts 745 Appendix C: FileMaker Pro Function Reference 755 Appendix D: Glossary 831 Appendix E: Resources 851 Appendix F: About the CD 857

Index 861 End-User License Agreement 903

Trang 34

In This Part Chapter 1

I

Trang 36

What Is a Database?

Before exploring FileMaker Pro 7, you must understand

what a database is A database is an organized

collec-tion of informacollec-tion, usually with one central topic In a puter database (as opposed to a paper database), the program

com-that you use to enter and manipulate the data is a database

program or a database management system (DBMS).

The word organized is a key part of this definition Otherwise,

a shoebox stuffed with business receipts might be considered

a database In general, if you must look at every scrap of datauntil you find the one for which you’re searching, you don’thave a database You just have a shoebox full of stuff

Even if you’ve never used a computer database managementsystem, you’re already familiar with many examples of paper(and probably computer) databases:

✦ Address books and business card files

A record contains information that has been collected on one individual or entity in the database A table holds the records

that you create, and the database encompasses the tables

For example, in the Employee Records database examplelisted in the preceding list, you might have one table contain-ing the employees’ ID numbers, names, addresses, dates ofbirth, and dates of hire Another table might include salaryinformation, and another might include personnel actions(such as review dates and performance history)

Understandingimportant FileMakerPro concepts andterms

Discovering uses for FileMaker Pro

Trang 37

In the previously listed examples, a record would hold all the address data on onefriend or business associate (the address book or business card file example); theemployment information on one employee (the employee records example); theingredients and cooking instructions for one recipe (the recipe card file example);the name, street address, and phone number for one person or business in the area(the telephone book example); and the name of one person or family from whomyou previously received a card or want to send a card to (the holiday greeting cardlist example).

A database containing more than one table of related information is a relational

database Each related table contains a field in common with the table(s) to which

it is related, such as the Employee ID number FileMaker Pro is a relational base management system (RDBMS)

data-Records are divided into fields A field contains a single piece of information about

the subject of the record In an address database, for example, the fields mightinclude first name, last name, street address, city, state, ZIP code, and phone num-ber Figure 1-1 shows the relationship among the components of a database

Figure 1-1: Every database comprises records that contain fields.

What distinguishes a database from any old hodgepodge of information is that the

data within each record is organized Fields are responsible for this organization The

fields appear in the same place on every record and are reserved for a particular type

of information In the example in Figure 1-1, the field for the last name is always in theupper-left corner of the address card, and it always contains a person’s last name No

Trang 38

Of course, in some paper databases, maintaining this level of organization can bedifficult When you are writing or typing an address card, for example, you mightoccasionally reverse the order of the last and first names or enter a company name

in that spot Organization in informal paper databases comes exclusively from yourown consistency — or lack of it

When consistency is critical, such as when you’re recording information on ees or filling out a customer invoice, records are often designed as forms Spaces onthe form have labels so that you always know which piece of information belongs

employ-where You can still type a phone number in the space labeled Social Security number,

but at least the labels make catching and correcting mistakes easier Forms helporganize the data in much the same way that a computer-based database does Infact, this type of paper database is frequently the basis for a computer database

Paper Databases versus Computer Databases

What’s wrong with paper databases? After all, many homes and businesses rely onthem In the following sections, we discuss some shortcomings of paper databasesand explain how computer databases can help avoid these limitations

Limitations of paper databases

First, consider some of the shortcomings of paper databases:

✦ Making data-entry errors is easy to do Even when you’re using a typeset form,

nothing prevents you from entering the wrong data in a field or forgetting tofill in a critical field, such as the hire date or medical history

✦ Maintenance can be difficult For records to be easy to locate, they must be in

some rational order Whenever you return or add a record to a folder or thefiling cabinet, you must place it in the correct spot If you put the vendor filefor Alpha Corporation in the Q folder, you might never find it again!

✦ Updating records can be time-consuming Because of changes in information

(such as addresses, phone numbers, and salaries), few databases are static

Updating a paper record could require several steps, including finding therecord, erasing the old information, writing in the new information (or typing

a whole new record), and returning the form to the filing cabinet Making anacross-the-board change — such as granting an incremental salary increase toall employees — can take a long time

✦ Sorting records, selecting subgroups of records, and creating reports are

cumber-some tasks Suppose the boss walks into your office and says, “We’re thinking

about putting in a day-care center How many of our 149 employees have kidsunder the age of five?” Or you might be thinking of sending a direct mail piece

to your local customers To determine printing and postage costs, you mustknow how many customers are in the target ZIP code or are within a particu-

Trang 39

In either case, you’ll probably have to examine every record in the paper base Whenever a task requires sorting, organizing, or summarizing the data in

data-a different wdata-ay, you cdata-an look forwdata-ard to data-a nightmdata-are of pdata-aper shuffling — hopingthat you didn’t overlook something important And when you’re through, you’llhave to restore all the records to their original order

✦ Sharing records is difficult When a supervisor borrows some employee records,

for example, the office manager no longer has easy access to those recordsunless you decide to kill some trees by photocopying the paperwork (They’re

no longer in the file drawer.)

✦ Information is hard to reuse If you want to use the information in a paper

data-base for any purpose other than just reading it (addressing envelopes, forexample), someone has to drag out the typewriter Photocopying an addressand then taping it onto a letter is considered bad form (unless you’re creating

a ransom note)

Advantages of computer databases

Computer databases, on the other hand, offer the following benefits:

✦ Entering error-free information is easier Most database programs have features

that speed data entry Setting default values for some fields can save an ble amount of typing time and ensure that information is entered consistently.(Using CAas the default entry for a State field, for example, ensures that youdon’t end up with records that variously contain CA, Calif., and California in thesame field.) Other useful data-entry features include

incredi-• Auto-incrementing fields (which automatically assign invoice or recordnumbers to new records)

• Field types (which, for example, can prevent you from entering alphabeticinformation in a field that was designed to record salary data)

• Range checking (which accepts only numbers within a particular range)

• Required fields (which warn you if you don’t fill in a critical field)

✦ You can easily add, delete, or change data Making a change to a record merely

involves bringing the record up onscreen, editing it, and then closing the file

or moving to another record Because you make all changes on a computer,you don’t need to search through file drawers or hunt for an eraser And if youneed additional copies of records, you can quickly print them The ease withwhich you can manage data is one of the key reasons for buying and using adatabase program such as FileMaker Pro

✦ Finding records is simple A Find feature enables you to quickly locate the

record or records of interest

✦ You can specify criteria for sorting data Arranging records in a different order

is as simple as issuing a Sort command You can rearrange records in order of

Trang 40

salary, record creation date, or any other field that’s in the database Mostdatabase programs also enable you to sort by multiple fields simultaneously.

For example, you can sort a client database by state and by city within eachstate

✦ You can work with discrete groups of records Using the database program’s

record selection tools, you can select a subgroup of records that’s based onany criteria you want You might, for example, want to see only recipes thathave chicken as the main ingredient or perhaps group employee recordsaccording to salary ranges or by department

✦ Database programs can perform calculations, frequently offering many of the

same calculation capabilities that spreadsheet programs offer Instead of using a

hand calculator to compute the sales tax and total for an invoice, you can haveyour database program automatically make the computations In addition toperforming computations within individual records, database programs canalso generate summary statistics across all records or for selected groups ofrecords For example, you can easily summarize the efforts of different salesteams by calculating sales totals and averages by region

✦ Many people can simultaneously access the database If several people in a

com-pany need to view or modify the information in a database, you can use a base program on a network Some database programs — including FileMakerPro — also enable you to publish and share your data over the Web or a com-pany intranet

data-✦ You can readily use information for multiple purposes For example, you can use

the address information in records to print mailing labels, envelopes, a sized address book, or personalized form letters

pocket-✦ You can create custom reports Only you are in a position to decide which

reports are essential to running your business, department, class, bowlingleague, or home In most database programs, you can create your own reportsand lay them out in any format that meets your information needs Becauseyou can save report formats on disk, you can reuse a format whenever youwant to generate a current report

✦ You can use data from one program in another program Most database programs

can import and export data

• Importing enables you to bring information into the database from other

programs For example, you might already have an address book program

in which you’ve recorded the addresses of friends and business ates Rather than retyping those addresses in your database program,you can export them from the original program (creating a file that yourdatabase program can read) and then import them into a database

associ-• Exporting, on the other hand, enables you to use fields and records in a

database to create a file that other programs can understand For ple, you can easily export numeric data so that you can graph it with aspreadsheet program, such as Microsoft Excel

Ngày đăng: 05/05/2014, 11:24

TỪ KHÓA LIÊN QUAN

w