Focal Point
[SOLVED] How do you get a total to print on one line?

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/1401088331

July 18, 2005, 08:50 PM
JohnK
[SOLVED] How do you get a total to print on one line?
I would like to print a simple column-total on one line. I do not have any sort fields. When I attempt to do this, the phrase 'TOTAL' prints on one line, and the total amounts on the second line. Does anyone know how to eliminate this problem? I am directing my output to PDF.

Here is an example that prints on two lines.

TABLE FILE CAR
PRINT MODEL SALES
ON TABLE COLUMN-TOTAL AS 'TOTAL'
ON TABLE PCHOLD FORMAT PDF
END

This message has been edited. Last edited by: FP Mod Chuck,
July 18, 2005, 09:28 PM
k.lane
You could do this:

DEFINE FILE CAR
DUMMY/A1 = ' ';
END

TABLE FILE CAR
SUM SALES
BY DUMMY NOPRINT
BY MODEL
ON DUMMY SUBFOOT
" "
"TOTAL <ST.SALES"
ON TABLE SET STYLE *
TYPE=SUBFOOT, LINE=2, STYLE=BOLD, $
TYPE=SUBFOOT, LINE=2, OBJECT=FIELD, ITEM=1, POSITION=SALES, $
ENDSTYLE
ON TABLE PCHOLD FORMAT PDF
END

I tried it without the dummy sort field with ON TABLE SUBFOOT, but the styling wouldn't work.

The above does the trick though.

Ken
July 18, 2005, 09:30 PM
k.lane
This works as well if you were looking for a straight dump from the table.

TABLE FILE CAR
PRINT MODEL SALES
BY DUMMY NOPRINT

Ken
July 18, 2005, 09:46 PM
reFOCUSing
At summit there was a great presentation by B.J. Stepien called Why Weird Things Happen in Reporting and it covered the problem you are having.

Summit Presentation
July 19, 2005, 01:07 PM
JohnK
Thanks everyone for your help.

I was attempting to do a report with column-totals while not sorting on any field, but I guess if you want to avoid the problem of a two line total, you must either use the SUBFOOT technique, or SORT on at least one of your PRINT columns and use the DUMMY NOPRINT technique.
March 06, 2018, 11:53 PM
Joao
The solution to this issue can be found at link: https://www.informationbuilder...scriptions-same-line