Focal Point
[SOLVED] New Column desc based on SUBTOTAL value .

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

July 22, 2013, 02:21 PM
SAMM
[SOLVED] New Column desc based on SUBTOTAL value .
Hi,
I need to display the description next to SUBTOTAL and I have more than one SUBTOTAL.
Example:
For CAR subtotal I want in the desc as CAR and for COUNTRY subtotal I want as COUNTRY in the column DESC. Can this be implemented using DEFINE ?

 SET BYDISPLAY=ON
DEFINE FILE CAR
DESC/A20V= 'DATA';
END

TABLE FILE CAR
SUM
DEALER_COST
RETAIL_COST
DESC
BY COUNTRY
BY CAR
ON COUNTRY SUBTOTAL AS 'Total For:'
ON CAR SUBTOTAL AS 'Total For :'
ON TABLE COLUMN-TOTAL AS 'TOTAL'
ON TABLE SET PAGE-NUM NOLEAD
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
TYPE=SUBTOTAL,JUSTIFY=RIGHT,$
TYPE=REPORT,GRID=OFF,$
END
-EXIT 

This message has been edited. Last edited by: <Kathryn Henning>,


WF 8.2.0.1, MRE, BI Dashboard, Self Service, Dev Studio, MS Windows XP SP1, Apache Tomcat/6.0.20, Oracle 11 g, I.E. 9 Output formats: HTML, Excel 2000 and PDF,Active Reports
July 23, 2013, 02:52 AM
GamP
Your DESC field is a alpha field, so it will not be included in the subtotal.
Your only chance (as far as I can think of) is to do your subtotals as a subheading and aligning it with the data columns. That way you can include the desired text with your subheading.


GamP

- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
July 23, 2013, 07:26 AM
JRLewis
How about this?

SET BYDISPLAY=ON
DEFINE FILE CAR
DESC/A20V= 'DATA';
END

TABLE FILE CAR
SUM
DEALER_COST
RETAIL_COST
DESC
BY COUNTRY
BY CAR
ON COUNTRY RECOMPUTE * AS 'Total For:'
ON CAR RECOMPUTE * AS 'Total For :'
ON TABLE RECOMPUTE * AS 'TOTAL'
ON TABLE SET PAGE-NUM NOLEAD
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
TYPE=SUBTOTAL,JUSTIFY=RIGHT,$
TYPE=REPORT,GRID=OFF,$
END
-EXIT 



WebFOCUS 8
July 23, 2013, 08:00 AM
Danny-SRL
I'd go with GamP's suggestion:
  
DEFINE FILE CAR
DESC/A20= 'DATA';
COUNTRYDESC/A12='COUNTRY';
CARDESC/A12='CAR';
END

TABLE FILE CAR
PRINT
DEALER_COST
RETAIL_COST
DESC 
BY COUNTRY
BY CAR
ON CAR SUBFOOT
"Total<CAR<ST.DEALER_COST<ST.RETAIL_COST CAR"
ON COUNTRY SUBFOOT
"Total<COUNTRY<ST.DEALER_COST<ST.RETAIL_COST COUNTRY"
ON TABLE SET PAGE-NUM NOLEAD
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
TYPE=SUBTOTAL,JUSTIFY=RIGHT,$
TYPE=REPORT,GRID=ON,$
TYPE=SUBFOOT, HEADALIGN=BODY, $
TYPE=SUBFOOT, ITEM=3, JUSTIFY=RIGHT, $
TYPE=SUBFOOT, ITEM=4, JUSTIFY=RIGHT, $
END



Daniel
In Focus since 1982
wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF

July 24, 2013, 09:19 AM
Doug
I like it. But, do these two lines do anything for you?
COUNTRYDESC/A12='COUNTRY';
CARDESC/A12='CAR';
Or, just left-overs?
July 24, 2013, 09:55 AM
SAMM
Hi Danny,
Your solution works for me. Thanks for the help.

Regards,
SAMM


WF 8.2.0.1, MRE, BI Dashboard, Self Service, Dev Studio, MS Windows XP SP1, Apache Tomcat/6.0.20, Oracle 11 g, I.E. 9 Output formats: HTML, Excel 2000 and PDF,Active Reports
July 24, 2013, 08:30 PM
Danny-SRL
Doug,
You are right: left-overs from trying to use SUBTOTAL/RECOMPUTE.
Oh well...

SAMM,
Happy to help.


Daniel
In Focus since 1982
wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF