Please look at the output below. I use 1 HOLD file to produce it. Can somebody come up with a solution that doesn't need a HOLD file (1 pass on the data)?
This message has been edited. Last edited by: Kerry,
Daniel In Focus since 1982 wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF
April 28, 2009, 09:15 AM
j.gross
TABLE FILE CAR
SUM SALES
OVER RETAIL_COST
OVER DEALER_COST
OVER COMPUTE RATIO/D5.2%=100 * DEALER_COST/RETAIL_COST;
BY COUNTRY
ACROSS SEATS RECOMPUTE
ON TABLE SUMMARIZE
IF COUNTRY EQ E$* OR I$* OR J$*
END
- Jack Gross WF through 8.1.05
April 28, 2009, 10:00 AM
<JG>
Other way is FML using the FORMULTIPLE OPTION gives a bit better print layout I think.
TABLE FILE CAR
SUM
SALES OVER
RETAIL_COST OVER
DEALER_COST OVER
COMPUTE D2R_ratio/D12.2 = ( C3 / C2 ) * 100;
ACROSS SEATS RECOMPUTE
FOR
COUNTRY
'ENGLAND' AS 'ENGLAND' LABEL R1 OVER
'ITALY' AS 'ITALY' LABEL R2 OVER
'JAPAN' AS 'JAPAN' LABEL R3 OVER
'ENGLAND' OR 'ITALY' OR 'JAPAN' AS 'Total' LABEL R4
ON TABLE SET PAGE-NUM OFF
ON TABLE SET FORMULTIPLE ON
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT HTML
END
April 28, 2009, 12:26 PM
Danny-SRL
Thanks.
Jack, I completely forgot that RECOMPUTE can come after ACROSS!!!
Daniel In Focus since 1982 wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF
April 29, 2009, 12:13 PM
j.gross
Dan --
It need not be in the ACROSS phrase: ON {acrossfield} SUMMARIZE or RECOMPUTE has the same effect.
I find the semantics inconsistent:
(a) ACROSS ... RECOMPUTE does not inserts content at sort breaks (for the 3 respective values of SEATS); it just appends a single column of marginals on the right. So it's really an "On Table" level feature.
(b) But the corresponding ON TABLE phrase, ON TABLE SUMMARIZE and RECOMPUTE, doesn't generate a right-hand marginal when the request contains an ACROSS, just the bottom marginal.