Re: ace syntax
Posted in 1997
Richard Thomas wrote: > At 12:46 11/07/97 +0200, you wrote: > }On 11 Jul 97 at 7:49, Pete Harris wrote: > } > }> I believe the more recent ace report writers allow you to read from > > }> an ascii file (as well as database tables). Could somebody remind > me > }> what the syntax is to do that? I would RTFM if I could find TFM. > } > }AFAIK, Ace doens't allow you to do any processing of the contents of > }an ASCII file, it only allows you to print the contents of the file > }using the imaginative PRINT FILE syntax. > } > }HTH. > } > > Just a thought here - if the original question was about READing from > a file > instead of SELECTing from tables, then you can treat the data just > the same. I think (but I haven't actually done this) that the PRINT > FILE > statement is for incorporating eg a text file into the output of the > report. > I write data from various sources to transaction files and then use ace to report on the data. The files are all flat files on a unix system. Just plain vanilla pipe delimited ascii text. I think, please note the use of the word think here, ace creates a temporary file when it runs and populates it with the data from the flat file. I say think because I haven't really cared how it does it. It does it so I don't care. Here is some code to show the syntax. DATABASE ASCII END DEFINE ASCII doc_number int, doc_fname char (15), doc_mname char (1), doc_lname char (20) END OUTPUT {* REPORT TO "docsumst" *} LEFT MARGIN 0 RIGHT MARGIN 132 TOP MARGIN 0 BOTTOM MARGIN 3 PAGE LENGTH 66 TOP OF PAGE "^L" END READ "doc_sum_input" DELIMITER "|" ORDER BY doc_number, tran_date END And of course this goes on to define the various sections of the report and print it. Hope this helps,