Focal Point
ACROSS-TOTAL not working...

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

July 12, 2007, 01:52 AM
Anatess
ACROSS-TOTAL not working...
Can somebody tell me why the ACROSS-TOTAL on this example doesn't work?
TABLE FILE CAR
SUM
     DEALER_COST AS 'DEALER COST'
     RETAIL_COST AS 'RETAIL COST'
     COMPUTE SUMCOST/D9=DEALER_COST+RETAIL_COST; AS 'SUM COST'
BY SEATS
ACROSS BODYTYPE
ACROSS-TOTAL AS 'COST TOTAL'
WHERE TOTAL SUMCOST NE 0;
ON TABLE SET PAGE-NUM OFF
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT HTML
END


For some reason, the ACROSS-TOTAL value when the last ACROSS data is 0 (nodata) is also nodata even if the first few ACROSS data is greater than 0. If the last ACROSS value is greater than 0 then the ACROSS-TOTAL is okay. What should be the proper way of coding this scenario?


WF 8.1.05 Windows
July 12, 2007, 03:51 AM
FrankDutch
Anatess

Does the command ROW-TOTAL give you the same result?




Frank

prod: WF 7.6.10 platform Windows,
databases: msSQL2000, msSQL2005, RMS, Oracle, Sybase,IE7
test: WF 7.6.10 on the same platform and databases,IE7

July 12, 2007, 04:50 AM
Alan B
Anatess

Frank is correct for what I think you want. ACROSS-TOTAL would work if you wanted to do something like:
TABLE FILE CAR
SUM
     DEALER_COST AS 'DEALER COST'
     RETAIL_COST AS 'RETAIL COST'
     COMPUTE SUMCOST/D9=DEALER_COST+RETAIL_COST; AS 'SUM COST'
BY SEATS
ACROSS BODYTYPE
ACROSS-TOTAL AS 'COST TOTAL' COLUMNS SEDAN AND CONVERTIBLE
WHERE TOTAL SUMCOST NE 0;
ON TABLE SET PAGE-NUM OFF
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT HTML
END

From the docs:
"Row totals for horizontal sort fields, referenced by ACROSS-TOTAL, are different from standard row totals because only horizontal sort field values, referenced by ACROSS, are included in the total."

Just replace ACROSS-TOTAL with ROW-TOTAL in your example.


Alan.
WF 7.705/8.007
July 12, 2007, 07:33 AM
<JG>
WHERE TOTAL SUMCOST NE 0;

Is causing the problem.

Remove that line.
July 12, 2007, 09:09 AM
Anatess
ROW-TOTAL! That's it!
YOU GUYS ARE THE BEST.


WF 8.1.05 Windows