Three-Column Printer, Version 1.01 Public-Domain Software by Bruce Mah Introduction As too many users are painfully aware, the Appleworks database suffers from an unfortunate lack of reporting functions. True, the appearance of Appleworks 2.0 and some additional third-party programs such as Autoworks and Infomerge provide some additional capabilities. However, one basic need is still unfulfilled. Suppose you have a name-and-address list in Appleworks which you want to have printed. Appleworks gives you two options. You can use a tables format, which gives you a hard-to-read and unattractive listing. Or you can use a label-style format, which wastes an incredible amount of paper. What to do? Enter the Three-Column Printer. This program will read an Appleworks database file and, using label-style report formats created while in Appleworks, will give you a two-, three-, or five-column listing on either standard or wide paper. Interested? Read on... Note: To save space and time, I'll be using the abbreviations "TCP" to stand for Three-Column Printer and "ADB" to stand for Appleworks Database. Thank you--my fingers appreciate it! Getting Started All you need do is to 1) place the file "TC.SYSTEM" as the first ".SYSTEM" file on a startup disk, as per standard ProDOS conventions or 2) copy "TC.SYSTEM" to a directory on your hard, floppy, or 3.5" disk. TCP is fully compatible with program selectors such as Prosel and SQUIRT. To run TCP, all you need is one disk drive (or hard disk, etc.), an Apple //e, //c, or IIgs with 80-column capability, and, of course, Appleworks. Running and Using TCP Start up TCP as you would any standard ProDOS system program. You will see the title page; press RETURN. Next, all your disk drives will be "polled" as TCP looks for ProDOS disks. They will be listed on the screen; select a volume holding an ADB file you wish to print. After you select a disk, TCP will show you its "root directory". ONLY ADB files and sub-directories will be shown, so don't panic when your 100-page thesis doesn't show up on this list. If you wish to access the files in a subdirectory, simply select the entry for the "DIR" file. To "back up" out of a subdirectory, select the menu entry called "Parent Directory". Selecting Parent Directory at the root directory returns you to the "Select Volume" screen. If you're not sure how this works, play around with it; you'll get the hang of it. Select the ADB file you wish to print. If 1) there are no report formats for the file or 2) there are no label-style formats, you will get an appropriate error message and be told to select another file. However, barring any problems, you will be shown the "Single-Record" format of the file--what you see in Appleworks when you are zoomed into one record--to be sure this is the file you want. Press RETURN to go on, or ESCAPE to select another file. You will then be shown a menu with the label-style report formats for this ADB file. Select the format you wish to use and press RETURN. You will then be shown the report format you selected, to confirm that this is the format you wish to use. Press RETURN or ESCAPE as appropriate. Next, you will be shown a number of page layout options. Some explanation is due. TCP can print in either two, three, or five columns down a page (reason to follow). "Standard" refers to the standard page-width (80 characters). "Wide" refers to the paper used by wide-carriage printers (132 or 136 columns--note that standard-width printers can usually access "Wide" in their "compressed print" modes; see "Notes" below). "By column" means that records will be printed vertically in a column. At the bottom, the next record will be at the top of the next column. "By row" means that the records will be printed across the page. At the right side of the page, the next record will appear at the left on the next line. Select the page layout you wish to use. Finally (we're almost there), you will get a screen with various parameters on it. Those that you will be most concerned with are at the top of the menu: "Printer slot" (should hold the slot number of your printer card--//c and IIgs printer ports use slot 1), "Number of copies" (somewhat obvious), "Title" (will be printed centered at the top of the first page ONLY), "page header" (will be printed on the top left of the page on the second and all succeeding pages; the page number goes on top right of the page). Page length should be 66, unless you're using 8 lines per inch, or legal size paper, or some such thing as that. Page margins are set at 6 lines, top and bottom. You might want to decrease these if you feel you need more room on the page. Note that if there is insufficient room in the top margin (less than 3 lines), the title and page header will not be printed. You may not set the page length greater than 127; each page margin must be less than 12. You probably will not need to change the options on the bottom of the page. If you are using single-sheet paper, you will want "Pause between pages" set to "Yes". "Send line feeds" should be set to "No" unless your printer requires line feeds sent after carriage returns. "Send forms feeds" should be "Yes" unless your printer isn't capable of handling them. Finally, you probably will not need to "Send special codes"; however, this option, when set to "Yes," sends any printer codes defined in the report format, such as those to set spacing or type style. When you have the options set the way you want, select "Begin printing". TCP will read records off your disk and print them a page at a time. The status display will keep you posted as to what is going on, and how far along the printing job is. While printing, you may press the space bar to pause printing or ESCAPE to cancel printing. Notes and Miscellany If your reports seem to be spaced incorrectly, go back to Appleworks and delete all blank lines on the top and bottom of the report with Open-Apple-D. Then add ONE blank line at the bottom of the report. Save your file and print it again. This spaces the records for best readability and best use of space. To set the left margin of the report, set the "LM" parameter from within Appleworks. NOTE: TCP will actually skip (the value of the LM parameter * 10) spaces on the report, as it assumes 10 cpi. So if you have special printer codes set up to use a different cpi value, the LM parameter will not necessarily reflect the left margin on the paper; it may need to be adjusted. If you are tired of all your disk drives being checked at the "Select Volume" screen, TCP has a feature to make life easier. In your program selector, set the "Startup Path" to the name of the disk or directory you wish to use. When TC.SYSTEM is run, you will be taken directly to the "Select File" screen, looking at that directory. For example, if all your ADB files are stored in the directory "/HARD1/FILES/", set that up as the startup path. The ESCAPE key will ALWAYS "back up" one level in the program. Pressing ESCAPE at the "Select Volume" screen will return you to ProDOS or your program selector. If you have a standard width (8 inch) printer, you can still use the "wide" formats. Set up the control codes to put your printer in condensed mode using "Send Special Codes to Printer" in the "Printer Options" screen in Appleworks, and set "Send Special Codes" in TCP to "Yes". TCP does not support the record selection rules of Appleworks, so to print a subset of a database, you will need to select the records in Appleworks and copy or move them to an empty database file, and then print the new file. I realize that this is an unfortunate shortcoming, but the truth is that I have no idea how to write the code to implement this feature. You may be wondering why TCP is called "Three-Column Printer" when it clearly supports two and five column page layouts as well. The reason is that it is one of a long line of programs with this name dating back to 1982, under DOS 3.3. While writing this version, I added the two- and five-column capability. This program should actually be numbered 4.xx, but since only a few people have seen versions 1, 2, or 3, I decided not to confuse the issue. Acknowledgments Thanks to Glen Bredon for writing Merlin Pro, the assembler I used to write TCP, and Prosel, the program selector and utility package which holds my system together. Thanks to Tom Weishaar for his article in the March 1987 Open-Apple on reading ADB files; it served as much of the inspiration for this project. Finally, thanks to Rupert Lissner, who made available to the public the formats of Appleworks files via the Apple Tech Notes. Feedback Please address any comments, complaints, bug reports, suggestions, and so on to Bruce Mah (Compuserve 72406,350).