1. Trang chủ >
  2. Công Nghệ Thông Tin >
  3. Tin học văn phòng >

Chapter 19. Sharing Data with Other Systems

Bạn đang xem bản rút gọn của tài liệu. Xem và tải ngay bản đầy đủ của tài liệu tại đây (1.25 MB, 97 trang )


Sharing Your Data

with Others



Save/Send Records As

If your data is destined for a person (rather than some other computer program),

then you want a format that’s easy to look at and to work with on almost any computer. FileMaker lets you save your data in two ubiquitous formats, an Excel spreadsheet and a PDF document, and the unique Snapshot Link. Choose Excel if you want

to be able to work with the data (perform analysis, combine it with other data, create

graphs, and so forth). If you want the output to look just like it looks in FileMaker,

and you don’t need it to be editable, then a PDF is the perfect choice. Snapshot links

direct other FileMaker users to a particular set of records in your database.

Saving as Microsoft Excel

If people need to work with the data you send them, but they aren’t lucky enough to

have FileMaker, you can create an Excel file for them. (And presumably, if they’re

working with data, they have either Excel or a program that can open Excel spreadsheets.) Just choose File➝Save/Send Records As➝Excel. When you do, FileMaker

shows the window in Figure 19-1.

Figure 19-1: 

The Save Records As Excel

window lets you tell FileMaker

where to save the spreadsheet

file. It also gives you the option

of automatically opening the

file you’re creating, so you don’t

have to go rummaging around

your hard drive looking for it.



The Save pop-up menu lets you choose whether you want to save all the “Records

being browsed” (that is, the found set) or just the “Current record.” Turn on “Automatically open file” if you want to see the spreadsheet as soon as FileMaker finishes

saving it. When you do, FileMaker automatically launches Excel and shows you the

spreadsheet. You also have the option to “Create email with file as attachment,” so



800



FileMaker Pro 11: The Missing Manual



Sharing Your Data

with Others



it’s easy to check your work and create a quick email with the data your boss just

asked you to email her. Once you save, FileMaker creates a new email message in

your email program, attaches the spreadsheet, and opens the message so you can add

recipients, a subject, and any message you want.

If you click Options, you can set up some basic details for your new Excel file. For

example, you can choose whether you want your FileMaker field names to appear in

the first row of the spreadsheet. You can also type a worksheet name and a title, subject, and author (each of which appear in the spreadsheet in the appropriate places).

One option you don’t have is which FileMaker fields are included in the Excel file. All

the fields that appear on the layout you’re currently viewing (including merge fields)

will become columns in the Excel file.

Saving as Portable Document Format (PDF)

Just about anybody with a computer can view PDF files. With PDF, you get to choose

exactly how the data looks, since this format preserves your beautifully crafted layouts. With FileMaker’s layout tools, your keen design sense, and the “Save/Send

Record as PDF” command, you could use email to distribute invoices, product catalogs, sales brochures, or annual reports. You can even send vision-impaired people a

file their software can read aloud. Even if all you need to do is send people data they

can see but can’t change, then a PDF file is just what the software engineer ordered.

Tip: The most common PDF viewer, Adobe Reader, is a free download at www.adobe.com/products/

acrobat/readstep2.html. Mac OS X also comes preloaded with its own PDF viewer, called Preview.



The basic choices are the same as for Excel. You choose between sending just the

current record or the whole found set. And, whether the file opens in a PDF viewer

or attaches to a new, blank email just as soon as FileMaker creates it. But behind the

Options button you find a much richer set of choices. There are three tabs—Document (Figure 19-2), Security (Figure 19-3), and Initial View (Figure 19-4). Starting

with the Document tab, you can set:

• Title. This title isn’t the name you give the file in the dialog box. It’s an additional title that becomes part of the properties of the document. Most, but not

all, PDF viewer programs let you see a file’s properties.

• Subject. This document property helps you tell a series of similar documents

apart from each other.

• Author. This document property is usually your name, but may also be the

name of your company or department. Again, it helps you organize a bunch of

similar files.

• Keywords. Some file management programs can search these keywords to locate documents.



chapter 19: sharing data with other systems



801



Sharing Your Data

with Others



• Compatibility. Choose from Acrobat 5, 6, or 7 and later. If you think your recipient might not have the latest and greatest PDF viewer, pick a lower number.

• Number pages from. You can make a different numbering system than the one

you have in FileMaker. Keep in mind, though, if your layout displays page numbers in FileMaker, this setting won’t change them. You could create a document

where the PDF viewer says you’re on page 5 but the number displayed on the

page is 7.

• Include. You can set a limited page-number range with these options, so that

only a part of the found set is included in the PDF file. You may have to go to

Preview mode in FileMaker first, though, to help you set the page range properly.

Figure 19-2: 

The PDF Options dialog box shows up when

you choose File➝Save/Send Records As➝PDF,

and then click Options. The Document tab lets

you add information to the PDF document.

The first four options become part of the

document’s properties, as described in the

note below.



Tip: You can see the PDF file’s Title, Subject, and Author in Adobe Acrobat’s PDF viewer’s Document

Properties Summary window. In Mac OS X’s Preview program, choose Tools➝Inspector instead.



In the Security tab (Figure 19-3), you can decide how much access you give your

recipients when they receive your file. You can choose:

• Require password to open the file. Click the checkbox to turn this option on,

and then enter a password. This checkbox is useful if you’re selling a catalog

and provide passwords only to people who’ve paid to receive it. Then, of course,

there’s the standard use; you just don’t want every Malcolm, Reese, and Dewey

poking around in your PDF files.

802



FileMaker Pro 11: The Missing Manual



Sharing Your Data

with Others



• Require password to control printing, editing and security. Click the checkbox to turn this option on and enter a password. You might want your PDF

freely distributed, but not so freely used. If so, don’t require a password to open

the file, but lock it down so nobody without a password can use the material

without your permission. With this option checked, a whole raft of new options

becomes available. You can set:

—— Printing. Choose from Not Permitted, Low Resolution (150 dpi), or High

Resolution. These options would protect photographic or other artwork

images that you want to send in a catalog but don’t want people to reprint

freely. You also may want someone to see your document onscreen, but not

print it and risk having it fall into the wrong hands.

—— Editing. Although PDF files are generally considered view-only, with the

right software, they can actually be edited. If you don’t want to allow this

(or want to restrict what can be done), choose options from the Editing

pop-up menu. For example, if you’re sending a contract for review, and you

want to be sure no new clauses are snuck in while it’s away, you can choose

Not permitted.

—— Enable copying of text, images and other content. With this option checked,

recipients can copy and paste material from your PDF file.

—— Allow text to be read by screen reading software. This option lets people with

vision or reading problems have their screen reading programs read your

document out loud. Seems like turning this off would be pretty uncool.

Figure 19-3: 

The Security tab lets you lock down your PDF

file if you need to prevent inappropriate use.

Some older PDF reading programs may not

recognize all these options. If someone’s PDF

reader doesn’t have security features, it can’t

open the PDF file at all, so your data is still

safe.



chapter 19: sharing data with other systems



803



Sharing Your Data

with Others



Note: Looking for absolute, iron-clad control of your information? Handwrite it on paper and store it

in a secret vault. Vast amounts of money and time have been spent trying to secure digital information

from unauthorized access and reuse. Ask the record companies how that worked out for them. The old

chestnut about the lock only keeping the honest man honest applies here, too. PDF security settings are

deterrents to unwanted use of your intellectual property, but they’re all surmountable. When you use

these tools, you’re managing risk, not eliminating it.



The final tab in the PDF Options window is probably the one you’ll use the least. But

if you like to control which PDF viewer options are visible when your recipient first

opens your PDF file, then Initial View (Figure 19-4) is the panel for you:

Figure 19-4: 

You get to decide what the user sees when she

first opens the PDF containing your database

info. Once again, not all these options work

in older versions of PDF software, so consider

your settings here a suggestion.



• Show. Your choices include Page Only (just the FileMaker layout, with no extra

tools or panels), Bookmarks Panel and Page, or Pages Panel and Page to offer

viewers some navigation options.

• Page Layout. Control the way the PDF viewer displays multipage documents.

If you choose Default, your recipients’ preferred view remains in force. But you

can also specify Single Page, Continuous, or Continuous-Facing.

• Magnification. Here you can define an automatic magnification as either a

fixed percentage of the document’s native size or automatically adjusted to fit

the window.

Warning: These Initial View options may or may not actually take effect, depending on what program

and what version of that program the PDF is opened with.



804



FileMaker Pro 11: The Missing Manual



Snapshot Link



Snapshot Link

At times, collaborating with other users of the same database can get complicated.

You may answer a question by saying “go to the monthly report layout, find the

records for last May, and then sort by region,” and be met with a vacant stare. Hey,

not everyone has your FileMaker mojo! But if your colleague knows how to click,

Snapshot Links can help lead the way.

A Snapshot Link is a little package of instructions saved as a small file. Send that

file to your less-savvy colleague, and with a double-click, the database opens to the

layout and found set of records you chose.

Setting up the Snapshot Link is easy. Switch to the layout you want to share, find

and sort the records, and then select File➝Save/Send Records As➝Snapshot Link.

The Snapshot Link dialog box appears Figure 19-5, looking much like a Save dialog

box. Choose where you want to save it, whether to include the current record, or the

whole found set and if you want FileMaker to attach it to a new, outgoing email message for you. With that, FileMaker saves a Snapshot Link file, with a .fpsl filename

extension.

Figure 19-5: 

The Snapshot Link dialog box looks

suspiciously similar to any old Save

dialog box. And it does indeed save

a file, just one without any actual

data.



Snapshot Links are simply XML files that contain eight pieces of information about

your database that FileMaker uses to recreate the state of the database at the time the

Snapshot was taken.

• The paths to the database. Yes, that’s plural. The snapshot records your database’s location on your hard drive, as well as any potential network paths to the

file. So long as the database is available through FileMaker Network sharing,

Snapshot Link users on your network can access it.

chapter 19: sharing data with other systems



805



External SQL Sources



• The found set of records, listed by their internal record IDs.

• The current layout. The Snapshot link records the layout’s internal ID number,

not its name. You can rename that layout all day, but unless you delete it outright, the Snapshot Link is going to find it.

• View state. Whether you’re looking at the layout as a form, a list, or a table, the

link’s recipient will, too.

• Current record. If you want to draw attention to a particular record in the

found set, make sure that record is the active record when you create the link.

That record will be selected when the Snapshot Link is opened.

• Toolbar state. Either showing or not.

• Mode. Create the Snapshot Link in Preview mode and, you guessed it, that’s

what the user will see. Create it while in Browse or Layout mode, and the user

will get Browse mode. You can’t create Snapshot Links in Find mode.

• Sort Order. However you last sorted the current found set is retained.

Snapshot Links are slick, but it’s important to understand what they don’t include.

• Your last find. The Snapshot Link contains a list of record IDs. That list may

be the result of a find for every customer who bought a pogo stick, but it’s only

current at the time the Snapshot was created. If you open that snapshot in six

weeks, new pogo stick customers won’t be on the list and any deleted customers

won’t be magically restored.

• Data. Snapshot Links are instructions for FileMaker, not unlike a script. They

tell FileMaker something like “go this layout, show me records 1, 3, and 5, and

sort them by date”. They don’t possess any record data at all. When using a Snapshot Link, you always see the most current data.

• Privileges. Just because you can see a given layout, doesn’t mean others can. If

the recipient of your Snapshot Link lacks the database permissions to see the

layout or records specified in the link, FileMaker won’t allow it.



External SQL Sources

If you don’t know MySQL from MySpace, and have no interest in taking your humble FileMaker skills to the hard-core level of IT professionals, then feel free to skip

right past this section. But if you have to cross between these worlds or need to bring

the power and capability of industrial-grade database servers into your systems,

FileMaker’s External SQL Sources (or ESS) feature will seem like magic.

In a nutshell, you point your FileMaker database in the general direction of an Oracle,

Microsoft SQL Server, or MySQL (pronounced “my sequel”) database (hereafter

referred to as a SQL database). FileMaker then takes in information about that

database, learning all it needs to know to make those normally complicated systems



806



FileMaker Pro 11: The Missing Manual



External SQL Sources



almost as easy to use as FileMaker. You can create table occurrences in your Relationships graph that are actually references to the tables in the SQL database. You

can draw relationship lines between SQL tables, and even between your FileMaker

tables and the SQL tables. You can create a layout based on a SQL table, drop a few

fields on the layout, and then jump to Find mode, where FileMaker searches the real

honest-to-goodness SQL data and shows you a found set of records.

Power users clinic



Behind the Data

Snapshot Links are simply XML files. XML or eXtensible

Markup Language, is a computer language designed to

give different computer systems and programs a flexible

way to share information among one another. XML can

be very complex, but it’s also fantastically flexible. You can

muck about in a Snapshot Link’s XML code if you wish.

Just use a text editor or XML authoring program to open

a .fpsl file and you see something like this example. Even

if you don’t know XML, you can probably see that you

can change the Snapshot Link’s view by changing
type=”form”> to .

While changing Snapshot Link XML code can’t cause any

harm to your database, it can very easily render the Snapshot Link itself unusable. That’s OK, because you’re working

on a backup copy, right?


















toolbar>



visible=″True″>











table=″Attendance″



tableid=″1065090″



id=″2″ name=″Facility″>

















filemac:/Macintosh HD/Users/Charts.fp7














basetableid=″130″>



With few exceptions, a SQL table works just like any other FileMaker table. But instead of storing the data on your hard drive, the SQL database stores and manages

the data. You don’t need to know a lick of SQL programming to work with it. When

you add a record using the Records➝New Record command, FileMaker sends the

right secret code that adds the record to the SQL database. Just type in a field, and

then press Enter, and FileMaker updates the SQL database. It just doesn’t get more

seamless than this.



chapter 19: sharing data with other systems



807



External SQL Sources



Setting Up ODBC

Before you can take advantage of ESS, you need to set up a few things. This business of

getting things installed and configured is the hardest part—and it’s not FileMaker’s

fault.

The SQL database server

First of all, you need a SQL database. To integrate as seamlessly as it does, FileMaker

needs to know exactly which database you’re using:

• Microsoft SQL Server 2008

• Microsoft SQL Server 2005

• Microsoft SQL Server 2000

• Oracle 11g

• Oracle 10g

• Oracle 9i

• MySQL 5.1 Community Edition

• MySQL 5.0 Community Edition

If your SQL database isn’t in this list, you have to upgrade or migrate to one that is.

Trying to make a different type of database work is futile—just ask someone who’s

tried. Luckily, this list represents recent versions of three very popular database systems. If you don’t have a SQL database, but you want to get one, you need to research

which is best for you. But if you just want to experiment, start with MySQL. For most

purposes (including real commercial use), it’s completely free. To get MySQL for

Mac OS X or Windows, visit www.mysql.com/ and look for the MySQL Community

Server link.

The rest of this section assumes you have a working SQL database server, and that

you have access to at least one database on that server.

Installing the ODBC driver

In order for FileMaker to communicate with the SQL database, you need an ODBC

driver. This software acts as the bridge between programs on your computer and the

SQL database server software. The driver is specific to your database server. If you’re

using Oracle, you need an Oracle ODBC driver, for instance. If you use Microsoft

Windows, this step is usually a breeze. Each of the supported SQL databases has an

ODBC driver provided by the manufacturer. Just visit their website and find out how

to get the driver you need.

Note: If you’re not sure what you need, try searching the Web for microsoft sql server odbc driver

download. The first site listed is probably the download page you need. (Substitute oracle or mysql for

microsoft sql server, as appropriate.)

808



FileMaker Pro 11: The Missing Manual



External SQL Sources



Mac OS X users aren’t so lucky. The big database developers don’t provide free

ODBC drivers for the Mac. Instead, head over to www.actualtechnologies.com/, and

then purchase the right driver (they’re cheap and work beautifully). FileMaker, Inc.

worked directly with Actual to ensure maximum compatibility, and they provide

the drivers of choice. (For MySQL, choose the driver called ODBC Driver for Open

Source Databases.)

Once you’ve acquired the correct driver, install it on your computer. After you’ve

installed the driver, you have to configure it.

Configuring the data source

Your computer’s operating system has the ODBC system built in. You use a special

program on your computer to tell it which SQL databases you want to work with.

The configuration process is entirely different on Mac OS X and Windows, so go

directly to the section that applies to you.

Configuring data sources on Windows. You configure your Windows machine for

ODBC in the Control Panel (Start➝Control Panel). The control panel looks a little

different in various Windows versions:

• On Windows 7, look for “System and Security”. Open this category, and then

click Administrative Tools. If you don’t have “System and Security”, look for

Administrative Tools right in the Control Panel window, and then open it there.

• On Windows Vista, you may see a category called “System and Maintenance.”

Open this category, and then click Administrative Tools at the bottom of the list.

If you don’t see “System and Maintenance”, look for Administrative Tools in the

Control Panel window, and then open it there.

• On Windows XP, you may see a category called “Performance and Maintenance”. Open this category, and then click Administrative Tools. If you don’t

have “Performance and Maintenance”, look for Administrative Tools right in the

Control Panel window, and then open it there.

Assuming you’ve found the Administrative Tools window, look inside it, and then

open Data Sources (ODBC). You should see something on your screen that looks like

Figure 19-6.

In this window, you add a DSN (data source name) for each SQL database you want

FileMaker to work with. A DSN can be one of two flavors: A System DSN is available

to everyone who uses your computer; and a User DSN is available only to the person

who created it. FileMaker works only with the System DSN variety, so to get started,

switch to the System DSN tab. Unfortunately, you may not have permission to define

these computer-wide data sources on your work computer. If Windows doesn’t let

you add a system DSN, contact your system administrator.



chapter 19: sharing data with other systems



809



External SQL Sources



Figure 19-6: 

The ODBC Data Source Administrator on

Windows lets you configure the SQL databases

your computer has access to. The acronym DSN

stands for Data Source Name, since you name

each data source you define here, and then

refer to it by name in FileMaker.



Once you’re on the System DSN tab, click Add. Windows shows you a list of available ODBC drivers. Select the appropriate one, and then click Finish. (Don’t get too

excited by the label on this button; you’re nowhere near finished.)

Note: You may get a little confused by the list of available drivers on Windows. First, you may see many

drivers whose names are apparently in a foreign language. Just scroll right past them. Also, you may

be tempted to select the driver called SQL Server. After all, every database FileMaker works with could

legitimately be called a SQL database server. But this driver is specifically for Microsoft SQL Server. If you

use one of the other database systems, keep looking.



From this point forward, configuration works a lot like Mac OS X. Skip ahead to

“Finishing ODBC data source configuration” below.

Configuring data sources on Mac OS X. On Mac OS X, you configure ODBC data

sources using a program called ODBC Administrator. You can find this program

in your Applications➝Utilities folder. When you launch the program, you see the

window in Figure 19-7.

When you open ODBC Administrator, first click the padlock icon in the bottomleft corner to unlock it. Then click the System DSN tab. (FileMaker works only with

system-wide data sources.) Next, click Add. A sheet slides down showing a list of

ODBC drivers installed on your computer. Select the one you want, and then click

OK.

At this point, the exact configuration will vary based on the driver you’re using.



810



FileMaker Pro 11: The Missing Manual



Xem Thêm
Tải bản đầy đủ (.pdf) (97 trang)

×