Re: ACE report problem
Posted in 1994
tonydev@cmhcsys.com (Tony - Development) writes: >I'm using the ACE report generator to create a fixed-format file. >I used the 'Generate' option then added an output setion to create the file. >The first table I did this on worked just fine, I got a nice, flat, >fixed-length file (it did have headers at the top of each page but that's fine). >Then on the next table I got a different type of output. The records, 'rows' >are in columns with the column name on the left and the data on the right. > > Name Tony Barnecut > Job None > . . > . . > . . >Does anyone know why the files didn't come out the same way? >The code for the reports is identical except for the table names and >column names. The "FORMAT EVERY ROW" syntax of the default ace report prints one row on each line of the report if the combined string lengths + spaces in between = 80 characters or less. Otherwise, it reports them one column per line, with column names to the left. The 2nd table had wider columns for something. Of course, you can modify the report to: FORMAT ON EVERY ROW PRINT ... and control this sort of thing yourself, including eliminating the headers you don't like. Other considerations: If you have a column name that is wider than the data the column contains (eg: yes_or_no CHAR(1)), the width used is that of the column name, so you could use an alias in the SELECT (... table.yes_or_no y, ...) to shorten. SMALLINT, INTEGER, and the like might seem a lot wider than than need to be (for instance an INTEGER column will take up 11 spaces I believe, so "-2000000000" could be printed is need be. If you know your data well enough, you can shorten that via the "ON EVERY ROW" customization. ======================================================================= Dennis J. Pimple dennisp@informix.com Opinions expressed Senior Consultant -------------------- are mine, and do not Informix Software Inc Voice: 303-850-0210 necessarily reflect Denver Colorado USA Fax: 303-779-4025 those of my employer.