[Date Prev][Date Next]
[Thread Prev][Thread Next]
[Date Index]
[Thread Index]
[New search]
To: Jay Smith <jay@xxxxxxxxxxxx>, Frame List <Framers@xxxxxxxxx>
Subject: Re: Using FM as a Formatting Engine (Win95-PC, FM 556)
From: Dan Emory <danemory@xxxxxxxxxxxx>
Date: Mon, 31 May 1999 19:46:03 -0700 (MST)
Sender: owner-framers@xxxxxxxxx
UniMerge, from Refined Reports, can do everything you're trying to do. The price for a Wintel license is less than $700.00 US. I have been using UniMerge to produce high-quality, print-ready output from FrameMaker for about 6 years. It is very fast, and very versatile. Here's the scenario for implementating the project you describe: 1. The database is capable of ouputtting ASCII data extract files having a record structure similar to that shown under A. DATA RECORD STRUCTURE below. 2. A FrameMaker report template (TABRPT.MIF) shown under B. THE FRAMEMAKER REPORT TEMPLATE below is created and saved in MIF format. 3. An MS-DOS batch file (REPORT.BAT) shown under C. THE MS-DOS BATCH FILE below is created and saved. 4. The database software produces a data extract file that is saved in directory INDIR (the watched folder). The data extract file has a name of the form: stemname.dat 5. The data extract save action also triggers a script (using any Win-compatible scripting language) that executes the MS-DOS batch file. 6. Execution of the MS-DOS batch file causes UniMerge to merge the data extract file (stemname.dat) with the FrameMaker report template (TABRPT.MIF) to produce FrameMaker MIF output, which is saved in file OUTDIR with filename stemname.mif. An example of the fully formatted table output is shown under D. THE RESULTING OUTPUT PRODUCED BY UNIMERGE below. 7. The content of the output file depends upon which form of the MS-DOS batch file (in C. below) is used, as follows: a. If the first form of the MS-DOS batch file is used, UniMerge produces a separate MIF output (e.g., stemname01.mif, stemname02.mif, etc) for each record. b. If the second form of the MS-DOS batch file is used, Unimerge produces a single MIF output file (stemname.mif) containing a separate table for each of the records in the data extract. 8. Upon completion of UniMerge execution, the script described in step 5 above deletes the data extract file, to complete its execution. A. DATA RECORD STRUCTURE The data record structure could have many possible variations, but all would be similar to the one shown below. Let's suppose the record structure for line item type 1 defines a 5-column table. The example record shown below contains three line items in the table that will be produced: line_item_type:1 #BEGINRG LineItems #BEGINRG Row column1:A column2:B column3:C column4:D column5:E #END #BEGINRG Row column1:F column2:G column3:H column4:1 column5:J #END #BEGINRG Row column1:K column2:L column3:M column4:N column5:O #END #END Where: 1. Each field has the form: fieldname:value (if there is nothing after the colon, then the value is empty) 2. Field line_item_type denotes the start of a new record, and indicates the table type to be used (including number of columns, column headings, plus any straddles, custom ruling and shading, table cell paragraph formats, etc. 3. #BEGINRG name denotes the beginning of a repeating group of subrecords (formed by relational JOINS) within the record. 4. #END denotes the end of a repeating group. 5. Each record produces one complete table. It contains one LineItems repeating group, and any number of Row repeating groups. 6. Each Row repeating group produces one complete row within a table. These repeating groups appear in the row order desired in the output. 7. Any number of records can appear in the data extract, sorted in the order in which the resulting tables should appear in the output. 8. Each record could include an optional TableTitle field (not shown in the sample record). If the TableTitle field is not empty, the table is created with a table title, and the content of the TableTitle field would be inserted in the table title paragraph. In response to a query of the appropriate form, most database software products can easilty output records having the above structure. B. THE FRAMEMAKER REPORT TEMPLATE (TABRPT.MIF) The FrameMaker report template required to merge the above record structure with UniMerge is shown below: IF (line_item_type = "1") Heading1 Heading2 Heading3 Heading4 Heading5 ======================================================== BEGINRG LineItems BEGINRG Row ^column1 ^column2 ^column3 ^column4 ^column5 END END ELSE IF (line_item_type = "2") CREATE A DIFFERENT TABLE STRUCTURE ELSE IF........ Etc. etc. END Where: 1. The IF, ELSE IF, BEGINRG, and END lines are commands which are executed by UniMerge at merge time. 2. ^column1, ^column2, ^column3, ^column4, and ^column5 are fieldnames, which are replated by their field values for each row at merge time. C. THE MS-DOS BATCH FILE (REPORT.BAT): UM TABRPT INDIR\%1 OUTDIR\%1 or UM -SINGLE TABRPT INDIR\%1 OUTDIR\%1 Where: 1. The first form of the batch file commands UniMerge to produce a separate output file for each table record. 2. The second form of the batch file commands UniMerge to place all of the resulting tables in a single output file. 3. TABRPT is the stemname of the FrameMaker report template. 4. %1 is replaced by the stemname of the ASCII data extract file containing the table record(s) to be merged. 5. INDIR is the name of the directory (watched folder) where the data extract file is located. 6. OUTDIR is the name of the directory where the resulting UniMerge output is placed. D. THE RESULTING OUPUT PRODUCED BY UNIMERGE This is the resulting FrameMaker table that is output by UniMerge for the record shown under DATA RECORD STRUCTURE above: Heading1 Heading2 Heading3 Heading4 Heading5 ======================================================= A B C D E F G H 1 J K L M N O +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ At 11:20 AM 5/31/99 -0400, Jay Smith wrote: >Greetings, > >I am seeking advice and experiences from those that have used or attempted to >use FM as a formatting engine to format database output IN WATCHED FOLDERS. > >Using FrameScript, I believe that it ought to be possible to watch folders and >process text files (which, in the text, contain tagging and command >information), turning them into highly formatted FM docs, including tables. > >I did not say that it would be a pretty FrameScript, but I think it should be >possible. > >We have done some parts of the functions. Especially, we do a lot of work a >text document containing "tagged text" into Frame-tagged text. In the >process, the tag statements are deleted from the source text. We have also >done scripts that do a variety of straddling, custom ruling, custom shading, >etc., based on the textual content of table cells. > >Has anybody done..... > >1) Using FrameScript on PC-Win95 to watch folders at timed intervals -- >remember we are not running on Unix or Mac. > >2) Building TABLES from tagged text and instructions. > > >To head off a few questions/reactions.... > >A) We are considering this method because the available database output format >engines don't seem to be able to VARY THE STRUCTURE/COLUMNS PER LINE ITEM >BASED ON VALUES IN THE LINE ITEM. The available reporting systems are great >at outputting line items as long as you don't want their columnar structure to >vary depending upon the type of line item, etc. Writing a report to generate >tagged text is "easy". Getting that report to format it highly into tables, >etc. is something else again. > >B) We are trying not to get into a potential 5-figure cost of a database-to-FM >"solution". I do not have any experience with those "solutions", however, I >suspect that given the variability of row/column structure (and even custom >ruling) per table row, some of the "solutions" would not be easy. (I >anticipate that I am going to get an earful about this, but I just don't see >spending that much money for this function.) > >Jay > >-- >Jay Smith > >e-mail: jay@jaysmith.com > >Jay Smith & Associates >P.O. Box 650 >Snow Camp, NC 27349 USA > >Phone: Int+US+336-376-9991 >Toll-Free Phone in US & Canada: > 1-800-447-8267 >Fax: Int+US+336-376-6750 > >** To unsubscribe, send a message to majordomo@omsys.com ** >** with "unsubscribe framers" (no quotes) in the body. ** > > ==================== | Nullius in Verba | ==================== Dan Emory, Dan Emory & Associates FrameMaker/FrameMaker+SGML Document Design & Database Publishing Voice/Fax: 949-722-8971 E-Mail: danemory@primenet.com 10044 Adams Ave. #208, Huntington Beach, CA 92646 ---Subscribe to the "Free Framers" list by sending a message to majordomo@omsys.com with "subscribe framers" (no quotes) in the body. ** To unsubscribe, send a message to majordomo@omsys.com ** ** with "unsubscribe framers" (no quotes) in the body. **