Focal Point
(Solved) Selective Subtotal

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

May 17, 2018, 09:48 PM
Michael L Meagher
(Solved) Selective Subtotal
I have a requirement to show all the weights in the report, but not show the two-seater's weights in the subtotal or grand total.

TABLE FILE CAR
SUM
     WEIGHT
BY  COUNTRY
BY  CAR
BY  LOWEST SEATS
ON COUNTRY SUB-TOTAL WEIGHT
END


Thanks for your help.

This message has been edited. Last edited by: Michael L Meagher,


WebFOCUS 8.2.03 - Production
WebFOCUS 8.2.04 - Sand Box
Windows 2012 R2 Server
HTML, PDF, Excel
In FOCUS since 1980
May 18, 2018, 05:10 AM
Martin vK
Hi Michael,

You can try this:
DEFINE FILE CAR
WEIGHT_SUBTOT/D6 = IF SEATS GT 2 THEN WEIGHT ELSE 0;
END
 
TABLE FILE CAR
SUM
     WEIGHT
     WEIGHT_SUBTOT NOPRINT
BY  COUNTRY
BY  CAR
BY  LOWEST SEATS
ON COUNTRY SUBFOOT
"*TOTAL COUNTRY <COUNTRY  <ST.WEIGHT_SUBTOT "
END

With spot markers <+0> you can arrange the positioning to align with the weight column

Martin.


WebFocus 8206M, iWay DataMigrator, Windows, DB2 Windows V10.5, MS SQL Server, Azure SQL, Hyperstage, ReportCaster
May 18, 2018, 08:38 AM
MartinY
Or just like this using the SUBTOTAL

DEFINE FILE CAR
WEIGHT/D6 = IF SEATS GT 2 THEN WEIGHT ELSE 0;
END
TABLE FILE CAR
SUM WEIGHT
BY  COUNTRY
BY  CAR
BY  LOWEST SEATS
ON COUNTRY SUBTOTAL WEIGHT
END



WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007
May 18, 2018, 09:18 AM
Martin vK
I think the requirement was to show all the weights in the details of the report, just not in the subtotal. Your solution does not show the weight details of the two-seaters.


WebFocus 8206M, iWay DataMigrator, Windows, DB2 Windows V10.5, MS SQL Server, Azure SQL, Hyperstage, ReportCaster
May 18, 2018, 10:10 AM
MartinY
My misunderdstanding


WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007
May 18, 2018, 10:39 AM
Michael L Meagher
Thanks folks. You have me pointed the right direction.


WebFOCUS 8.2.03 - Production
WebFOCUS 8.2.04 - Sand Box
Windows 2012 R2 Server
HTML, PDF, Excel
In FOCUS since 1980