Focal Point
[SOLVED] How to only print column total line

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

January 29, 2018, 11:51 AM
Jveselka
[SOLVED] How to only print column total line
How do I code this so that only the Grand Total Line prints? I don't want to see the headings or data, only Grand Total line.
 
TABLE FILE CAR
SUM  DCOST    RCOST
BY COUNTRY 
ON TABLE SET PAGE-NUM NOLEAD
ON TABLE COLUMN-TOTAL AS 'GRAND TOTAL'
ON TABLE PCHOLD FORMAT EXL07
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
     INCLUDE = endeflt,
$
TYPE=SUBTOTAL,
     BY=3,
     COLOR='RED',
	 JUSTIFY=RIGHT,
$
ENDSTYLE
END 


I have a compound report
Report 1 is Total of LOB1
Report 2 is Total of LOB2
Report 3 I need to be the one line Grand total which is the total of LOB1 and LOB2

This seems like is should be easy, maybe I am just going crazy...Smiler
Thanks
JV

This message has been edited. Last edited by: FP Mod Chuck,


WebFOCUS 8105m
Windows, All Outputs
January 29, 2018, 12:58 PM
Doug
Try this:
TABLE FILE CAR
SUM  DCOST AS '' RCOST AS ''
-*BY COUNTRY 
ON TABLE SET PAGE-NUM NOLEAD
ON TABLE COLUMN-TOTAL AS 'GRAND TOTAL'
ON TABLE PCHOLD FORMAT EXL07
ON TABLE NOTOTAL
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
INCLUDE=IBFS:/FILE/IBI_HTML_DIR/ibi_themes/Warm.sty,$
-*     INCLUDE = endeflt,$
TYPE=SUBTOTAL,
-*     BY=3,
     COLOR='RED',
	 JUSTIFY=RIGHT,
$
ENDSTYLE
END 
-EXIT





   In FOCUS Since 1983 ~ from FOCUS to WebFOCUS.
   Current: WebFOCUS Administrator at FIS Worldpay | 8204, 8206
January 29, 2018, 01:04 PM
Tom Flynn
Don't really know how you would align the Grand Totals with reports 1/2, but, here's a shot at it...
  
DEFINE FILE CAR
  XDUMMY/A10 = '';
  DUMMY/A12  = 'GRAND TOTAL';
END
TABLE FILE CAR
SUM  
     XDUMMY AS ''
     XDUMMY AS ''
     DUMMY  AS ''
     DCOST  AS ''    
     RCOST  AS ''
     XDUMMY AS ''
     XDUMMY AS ''
     XDUMMY AS ''

BY DUMMY NOPRINT
ON TABLE PCHOLD FORMAT EXL07
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
     INCLUDE = endeflt,
$
TYPE=REPORT,
     SQUEEZE=1,
     STYLE=BOLD,
     COLOR='RED',
     JUSTIFY=RIGHT,
$
ENDSTYLE
END 
-EXIT



Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
January 29, 2018, 03:19 PM
vaayu
If its just a couple of fields in each request, I would do Dialogue Manager commands to HOLD/READ values and PRINT the final report.


-********************
Sandbox: 8206.10
Dev: 8201M
Prod:8009
-********************
January 30, 2018, 09:32 AM
Jveselka
Ok, again thanks for the help. This was pretty easy, just needed a push in the right direction.
Here is what I came up with. All your code worked by the way, I just needed to tweak it to get what they wanted.

DEFINE FILE CAR
CTRY/A15 WITH COUNTRY = '';
END
TABLE FILE CAR
PRINT 
COUNTRY	        NOPRINT
CAR	MODEL	    NOPRINT
BODYTYPE	    NOPRINT
SEATS	        NOPRINT
DEALER_COST	
RETAIL_COST
BY COUNTRY NOPRINT SUBTOTAL AS ''
BY COUNTRY
BY CAR 
BY MODEL
BY BODYTYPE
BY SEATS
WHERE COUNTRY EQ 'ENGLAND';
ON TABLE SUBTOTAL DEALER_COST RETAIL_COST AS 'CONTRACT TOTAL: ENGLAND'
ON TABLE PCHOLD FORMAT EXL07 OPEN
ON TABLE SET STYLE *
     INCLUDE = endeflt,
	 TITLETEXT='ENGLAN',
$
TYPE=DATA
     FONT='Verdana',
     JUSTIFY=CENTER,
	 backcolor=rgb(66 70 73),
	 color=rgb(255 255 255),
$
TYPE=SUBTOTAL,
     BY=1,
	 JUSTIFY=RIGHT,
	 BORDER=OFF,
$
ENDSTYLE
END

DEFINE FILE CAR
CTRY/A15 WITH COUNTRY = '';
END
TABLE FILE CAR
PRINT 
COUNTRY	        NOPRINT
CAR	MODEL	    NOPRINT
BODYTYPE	    NOPRINT
SEATS	        NOPRINT
DEALER_COST	
RETAIL_COST
BY COUNTRY NOPRINT SUBTOTAL AS ''
BY COUNTRY
BY CAR 
BY MODEL
BY BODYTYPE
BY SEATS
WHERE COUNTRY EQ 'W GERMANY';
ON TABLE SUBTOTAL DEALER_COST RETAIL_COST AS 'CONTRACT TOTAL: W GERMANY'
ON TABLE PCHOLD FORMAT EXL07 NOBREAK
ON TABLE SET STYLE *
     INCLUDE = endeflt,
	 TITLETEXT='W GERMANY',
$
TYPE=DATA
     FONT='Verdana',
     JUSTIFY=CENTER,
	 backcolor=rgb(66 70 73),
	 color=rgb(255 255 255),
$
TYPE=SUBTOTAL,
     BY=1,
	 JUSTIFY=RIGHT,
	 BORDER=OFF,
$
ENDSTYLE
END

DEFINE FILE CAR
DUMMY/A12='GRAND TOTAL';
DUMMY1/A1='';
END
TABLE FILE CAR
SUM
DUMMY1        AS ''
DUMMY1        AS ''
DUMMY1        AS ''
DUMMY1        AS ''
DUMMY1        AS ''
DEALER_COST	  AS ''
RETAIL_COST   AS ''
BY DUMMY      AS ''
WHERE COUNTRY EQ 'W GERMANY' OR 'ENGLAND';
ON TABLE PCHOLD FORMAT EXL07 CLOSE
ON TABLE SET STYLE *
     INCLUDE = endeflt,
-*	 TITLETEXT='&YR',
$
TYPE=DATA
     FONT='Verdana',
     JUSTIFY=CENTER,
	 BACKCOLOR=RGB(66 70 73),
	 COLOR=RGB(255 255 255),
	 STYLE=BOLD,
	 
$
TYPE=SUBTOTAL,
     BY=1,
	 JUSTIFY=RIGHT,
	 BORDER=OFF,
$
ENDSTYLE
END
  


Thanks again You guys Rock!

JV


WebFOCUS 8105m
Windows, All Outputs