Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!iuvax!rutgers!njin!princeton!siemens!demon!fwb From: fwb@demon.siemens.com (Frederic W. Brehm) Newsgroups: comp.sys.mac.hypercard Subject: Re: Print Report for selected cards Message-ID: <14523@siemens.siemens.com> Date: 29 Aug 89 21:49:56 GMT References: <980@urbana.mcd.mot.com> Reply-To: fwb@demon.UUCP (Frederic W. Brehm) Organization: Siemens Corporate Research Lines: 44 willcox@urbana.mcd.mot.com (David A Willcox) writes: >Things are mostly pretty straightforward, but there is one thing that >I haven't figured out how to do. I would like to be able to print a >report for selected cards; for example all cards that contain >"windsurfing" as an interest. Here is an outline of what to do (details are left as an exercise for the reader :-) 1) Generate a file name and put it into a global variable file_name. I have found that it should have a full path name (printing with an application does not seem to work properly otherwise). 2) Execute the command open file file_name 3) Search for your selection criteria. When you have it, do on haveCardToPrint global file_name write return & field "Name and Address" & return to file file_name -- or whatever you want to write end someEvent 4) When you are all done, then on printReport global file_name close file file_name answer "Print " & quote & file_name & quote & "?" \ with "Cancel" or "Edit" or "Print" if it is "Print" then print file_name with "TeachText" else if it is "Edit" then open file_name with "TeachText" end if end printList I hope this helps. Fred -- Frederic W. Brehm Siemens Corporate Research Princeton, NJ fwb@demon.siemens.com -or- princeton!siemens!demon!fwb