Focal Point
Hide the value in a subtotal?

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

June 09, 2005, 08:48 AM
Pete
Hide the value in a subtotal?
Hi all,

I've got this problem that i'm doing a subtotal on a by field but i dont want the field's value to show in the sub total line


for example

I dont want the value of car to show in the subtotal recompute line

But dont know how to do it

any ideas?

TABLE FILE CAR
PRINT
MODEL
DEALER_COST
RETAIL_COST

COMPUTE Ratio/D12.2% = (DEALER_COST/ RETAIL_COST)*100;
BY
CAR

ON CAR RECOMPUTE AS ''
ON TABLE SET PAGE-NUM OFF
ON TABLE NOTOTAL
ON TABLE SET ONLINE-FMT HTML
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
UNITS=IN,
PAGESIZE='SCREEN',
LEFTMARGIN=0.000000,
RIGHTMARGIN=0.000000,
TOPMARGIN=0.000000,
BOTTOMMARGIN=0.000000,
SQUEEZE=ON,
ORIENTATION=PORTRAIT,
$
TYPE=REPORT,
GRID=OFF,
FONT='ARIAL',
SIZE=9,
COLOR='BLACK',
BACKCOLOR='NONE',
STYLE=NORMAL,
RIGHTGAP=0.125000,
TOPGAP=0.013889,
BOTTOMGAP=0.027778,
$
TYPE=TITLE,
STYLE=BOLD,
$
TYPE=TABHEADING,
SIZE=12,
STYLE=BOLD,
$
TYPE=TABFOOTING,
SIZE=12,
STYLE=BOLD,
$
TYPE=HEADING,
SIZE=12,
STYLE=BOLD,
$
TYPE=FOOTING,
SIZE=12,
STYLE=BOLD,
$
TYPE=SUBHEAD,
SIZE=10,
STYLE=BOLD,
$
TYPE=SUBFOOT,
SIZE=10,
STYLE=BOLD,
$
TYPE=SUBTOTAL,
BACKCOLOR=RGB(210 210 210),
$
TYPE=ACROSSVALUE,
SIZE=9,
$
TYPE=ACROSSTITLE,
STYLE=BOLD,
$
TYPE=GRANDTOTAL,
BACKCOLOR=RGB(210 210 210),
STYLE=BOLD,
$
ENDSTYLE
END
June 09, 2005, 02:27 PM
k.lane
Pete, you can do the following:

DEFINE FILE CAR
SORTFIELD/A1 = ' ' ;
END

TABLE FILE CAR
PRINT MODEL
DEALER_COST
RETAIL_COST
COMPUTE Ratio/D12.2% = (DEALER_COST/ RETAIL_COST)*100;
BY CAR
BY SORTFIELD NOPRINT

ON SORTFIELD RECOMPUTE AS ''
...
END

CAR will still be the high level sort field but if the RECOMPUTE is done on the SORTFIELD, you'll receive the same type of summary. Give it a try.

Ken
June 09, 2005, 02:34 PM
dwf
Pete,

Here's one possible solution. Kind of goofy, really, but it gives you what you want (more or less). I bolded the changes.

DEFINE FILE CAR
BLANK/A1=' ';
END

TABLE FILE CAR
PRINT
MODEL
DEALER_COST
RETAIL_COST

COMPUTE Ratio/D12.2% = (DEALER_COST/ RETAIL_COST)*100;

BY BLANK AS ''
BY CAR

ON BLANK RECOMPUTE AS ''

ON TABLE SET PAGE-NUM OFF
ON TABLE NOTOTAL
ON TABLE SET ONLINE-FMT HTML
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
UNITS=IN,
PAGESIZE='SCREEN',
LEFTMARGIN=0.000000,
RIGHTMARGIN=0.000000,
TOPMARGIN=0.000000,
BOTTOMMARGIN=0.000000,
SQUEEZE=ON,
ORIENTATION=PORTRAIT,
$
TYPE=REPORT,
GRID=OFF,
FONT='ARIAL',
SIZE=9,
COLOR='BLACK',
BACKCOLOR='NONE',
STYLE=NORMAL,
RIGHTGAP=0.125000,
TOPGAP=0.013889,
BOTTOMGAP=0.027778,
$
TYPE=TITLE,
STYLE=BOLD,
$
TYPE=TABHEADING,
SIZE=12,
STYLE=BOLD,
$
TYPE=TABFOOTING,
SIZE=12,
STYLE=BOLD,
$
TYPE=HEADING,
SIZE=12,
STYLE=BOLD,
$
TYPE=FOOTING,
SIZE=12,
STYLE=BOLD,
$
TYPE=SUBHEAD,
SIZE=10,
STYLE=BOLD,
$
TYPE=SUBFOOT,
SIZE=10,
STYLE=BOLD,
$
TYPE=SUBTOTAL,
BACKCOLOR=RGB(210 210 210),
$
TYPE=ACROSSVALUE,
SIZE=9,
$
TYPE=ACROSSTITLE,
STYLE=BOLD,
$
TYPE=GRANDTOTAL,
BACKCOLOR=RGB(210 210 210),
STYLE=BOLD,
$
ENDSTYLE
END
June 09, 2005, 03:26 PM
<JG>
DWF, Ken had the sort in the correct order.
By having the blank as the primary sort you will get a report total not a subtotal.
June 09, 2005, 08:50 PM
Spence
Try this. I changed the color of the value of car to white so it does not display.

TABLE FILE CAR
PRINT
MODEL
DEALER_COST
RETAIL_COST
COMPUTE Ratio/D12.2 = (DEALER_COST/ RETAIL_COST)*100;
BY
CAR
ON CAR RECOMPUTE DEALER_COST RETAIL_COST Ratio AS ''
ON TABLE SET PAGE-NUM OFF
ON TABLE NOTOTAL
ON TABLE SET ONLINE-FMT HTML
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
UNITS=IN,
PAGESIZE='SCREEN',
LEFTMARGIN=0.000000,
RIGHTMARGIN=0.000000,
TOPMARGIN=0.000000,
BOTTOMMARGIN=0.000000,
SQUEEZE=ON,
ORIENTATION=PORTRAIT,
$
TYPE=REPORT,
GRID=OFF,
FONT='ARIAL',
SIZE=9,
COLOR='BLACK',
BACKCOLOR='NONE',
STYLE=NORMAL,
RIGHTGAP=0.125000,
TOPGAP=0.013889,
BOTTOMGAP=0.027778,
$
TYPE=TITLE,
STYLE=BOLD,
$
TYPE=TABHEADING,
SIZE=12,
STYLE=BOLD,
$
TYPE=TABFOOTING,
SIZE=12,
STYLE=BOLD,
$
TYPE=HEADING,
SIZE=12,
STYLE=BOLD,
$
TYPE=FOOTING,
SIZE=12,
STYLE=BOLD,
$
TYPE=SUBHEAD,
SIZE=10,
STYLE=BOLD,
$
TYPE=SUBFOOT,
SIZE=10,
STYLE=BOLD,
$
TYPE=SUBTOTAL,
-*BACKCOLOR=RGB(210 210 210),
COLOR=WHITE,
$
TYPE=SUBTOTAL, BY=CAR, COLUMN=C2,
COLOR=BLACK,
$
TYPE=SUBTOTAL, BY=CAR, COLUMN=C3,
COLOR=BLACK,
$
TYPE=SUBTOTAL, BY=CAR, COLUMN=C4,
COLOR=BLACK,
$
TYPE=ACROSSVALUE,
SIZE=9,
$
TYPE=ACROSSTITLE,
STYLE=BOLD,
$
TYPE=GRANDTOTAL,
BACKCOLOR=RGB(210 210 210),
STYLE=BOLD,
$
ENDSTYLE
END
June 09, 2005, 09:39 PM
dwf
You're right, of course, JG. Brain blip.