Focal Point
Field in Subtotal but not Grand Total

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

November 09, 2006, 05:17 PM
.eric
Field in Subtotal but not Grand Total
Is there a way to show a field in the subtotal line but not the grand total line?

Basically I have a purchase report that is broken down into categories. The field is a percent to total field, so every subtotal would be a percent to total of the grand total. So say category A B and C are all 33.33% the grand total should always be 100%, basically the users don't want to see the 100%. I tried specifiying the fields in the ON TABLE SUBTOTAL line and excluding them from the ON TABLE TOTAL line but it shows on the grand total line anyway.

Eric


dev: WF 7.6.5 w/IIS + Tomcat

prod: WF 7.6.5 w/IIS + Tomcat
November 09, 2006, 05:25 PM
.eric
Here is an example using the car file:

TABLE FILE CAR
SUM DEALER_COST
COMPUTE PCT_COST/D12.2% = DEALER_COST / TOT.DEALER_COST * 100;
BY CAR
BY MODEL
ON TABLE HOLD
END

TABLE FILE HOLD
PRINT DEALER_COST PCT_COST
BY CAR
BY MODEL
ON CAR SUB-TOTAL DEALER_COST PCT_COST
ON TABLE COLUMN-TOTAL DEALER_COST
END

So basically I want PCT_COST in the sub-total line and not in the column-total line.

Eric


dev: WF 7.6.5 w/IIS + Tomcat

prod: WF 7.6.5 w/IIS + Tomcat
November 10, 2006, 12:01 AM
OPALTOSH
TABLE FILE CAR
SUM DEALER_COST
COMPUTE PCT_COST/D12.2% = DEALER_COST / TOT.DEALER_COST * 100;
BY CAR
BY MODEL
ON TABLE HOLD
END
DEFINE FILE HOLD
DUMMY/A1=' ';
END
TABLE FILE HOLD
PRINT DEALER_COST PCT_COST
BY DUMMY NOPRINT
BY CAR
BY MODEL
ON CAR SUBFOOT
"ON DUMMY SUBFOOT
"ON TABLE NOTOTAL
END

You can then format the Subfoots using a style sheet so that they look like sub totals. You also have more flexibility about what else you might want to display in the subfoot.
November 10, 2006, 09:13 AM
.eric
I still need column totals though, the subtotal line isn't the problem, it's the very last total line (grand totals) where I need to exclude the PCT_COST field.


dev: WF 7.6.5 w/IIS + Tomcat

prod: WF 7.6.5 w/IIS + Tomcat
November 10, 2006, 09:20 AM
KevinG
Eric,

Maybe not the ultimate solution, but you could set the "Color" of that item in the StyleSheet to be the same color as the background of your Grand Total line. This will effectively not display that field (although it is really still there.)

Kevin


WF 7.6.10 / WIN-AIX
November 10, 2006, 09:23 AM
Tom Flynn
Eric,

Have you tried:

ON TABLE SUMMARIZE DEALER_COST AS 'Total '
ON TABLE NOTOTAL

Opal had :

"ON DUMMY SUBFOOT
"ON TABLE NOTOTAL

incorrectly...

OR

U could try:

See where Opal did a DEFINE for DUMMY


ON DUMMY SUBFOOT
"Summary <TOT.DEALER_COST"


then a stylesheet:

TYPE=SUBFOOT, LINE=1, ITEM=1, JUSTIFY=LEFT , STYLE=BOLD, $
TYPE=SUBFOOT, LINE=1, ITEM=2, STYLE=BOLD, POSITION = DEALER_COST, $

Tom

This message has been edited. Last edited by: Tom Flynn,


Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
November 10, 2006, 10:23 AM
.eric
Tom-
I already tried

ON TABLE SUMMARIZE DEALER_COST AS 'Total '
ON TABLE NOTOTAL

If you look at my code I had the same thing but with RECOMPUTE instead of SUMMARIZE. And it still adds that field into the grand totals line. Also If I add the ON TABLE NOTOTAL it removes the grand total line...

I'm also trying to avoid using subfoots because this particular report has about 15 or so fields and it might get a little messy.

I guess I can use Kevin's idea if there is nothing else.

Eric


dev: WF 7.6.5 w/IIS + Tomcat

prod: WF 7.6.5 w/IIS + Tomcat
November 10, 2006, 10:30 AM
Tom Flynn
Eric,

I did look at your code. Still don't see a

RECOMPUTE

but, maybe that's just me...


Tom


Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
November 10, 2006, 10:39 AM
.eric
Sorry, I had to look it over myself, I have a column-total there instead.

Eric


dev: WF 7.6.5 w/IIS + Tomcat

prod: WF 7.6.5 w/IIS + Tomcat
November 12, 2006, 05:48 AM
OPALTOSH
Eric,
My original code was the same as Tom's but it did not copy into the post correctly.

I don't think ypu can do whatyou want to do without a subfoot.