Focal Point
[CLOSED] Displaying dynamic subtotals

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

May 23, 2012, 09:05 AM
SriAravind
[CLOSED] Displaying dynamic subtotals
Below is sample code i used for subtotals
  
ON COUNTRY SUBTOTAL SALES SEATS AS 'SubTotal:'
-***Below line - dynamically getting subtotals***-
-*ON COUNTRY SUBTOTAL &STOTAL.EVAL AS 'Subtotal;'


i.e.&STOTAL.EVAL result will bring my subtotal fields as SALES SEATS

Issue here is, if the subtotal field length is very long, then my columns are getting extended as I am not able to wrap Subtotals...

Is thr any way to wrap subtotals?

Instead of wrapping subtotals, i'm achieving my result thru below code:
  
DEFINE FILE CAR
ST_TEXT1/A50 = 'SubTotal:' || COUNTRY ;
END
.
.


ON COUNTRY SUBFOOT
"<ST_TEXT1"
" <+0><ST.SALES<+0><ST.SEATS<+0> <+0> <+0> <+0> <+0>""
.
.


Question is how to get my dynamic subtotal fields.How to get &STOTAL.EVAL as
<ST.SALES<+0><ST.SEATS
under respective fields?

This message has been edited. Last edited by: Kerry,


WebFocus Version 7.7.05
Windows, HTML/PDF/EXL2K/AHTML
May 23, 2012, 09:13 AM
SriAravind
Posting my sample code also...
SET BYDISPLAY = ON
DEFINE FILE CAR
ST_TEXT1/A50 = '&|nbsp;&|nbsp;SubTotal:' || COUNTRY ;
ST_TEXT2/A100 = '&|nbsp;&|nbsp;&|nbsp;&|nbsp;uhui hkhui j uih uihkhjkh uiuihihhiSubTotal:' || CAR;

SH_TEXT1/A150 = '&|nbsp;&|nbsp;&|nbsp;&|nbsp;Country:hhjkhkj uih uhui hkhui j uih uihkhjkh uiuihihhi ' || COUNTRY;
SH_TEXT2/A150 = '&|nbsp;&|nbsp;&|nbsp;&|nbsp;&|nbsp;&|nbsp;&|nbsp;&|nbsp;&|nbsp;Car:' || CAR;
SH_TEXT3/A250 = '&|nbsp;&|nbsp;&|nbsp;&|nbsp;&|nbsp;&|nbsp;&|nbsp;&|nbsp;&|nbsp;&|nbsp;&|nbsp;&|nbsp;&|nbsp;&|nbsp;Bodytype:' || BODYTYPE;
BLANK/A1 = '';
ST_TEXT4/A30 = 'Total:' ;

END
TABLE FILE CAR
PRINT
MODEL
SALES
SEATS
LENGTH
WIDTH
RETAIL_COST
DEALER_COST
SH_TEXT1 NOPRINT
SH_TEXT2 NOPRINT
SH_TEXT3 NOPRINT

ST_TEXT1 NOPRINT
ST_TEXT2 NOPRINT
ST_TEXT4 NOPRINT
BY BLANK NOPRINT
BY COUNTRY NOPRINT
BY CAR NOPRINT
BY BODYTYPE NOPRINT

ON COUNTRY SUBHEAD
 "<SH_TEXT1"
ON CAR SUBHEAD
 "<SH_TEXT2"
ON BODYTYPE SUBHEAD
 "<SH_TEXT3"

-*ON COUNTRY SUBTOTAL SALES SEATS AS 'SubTotal:'
-*ON CAR SUBTOTAL SALES SEATS AS '&|nbsp;&|nbsp;&|nbsp;&|nbsp;SubTotal:'
-*ON BODYTYPE SUBTOTAL SALES SEATS AS '&|nbsp;&|nbsp;&|nbsp;&|nbsp;&|nbsp;&|nbsp;SubTotal:'
-*ON BLANK SUBTOTAL SALES SEATS AS ''

ON BLANK SUBFOOT
"<ST_TEXT4"
" <+0><TOT.SALES<+0><TOT.SEATS<+0> <+0> <+0> <+0> <+0>""

ON COUNTRY SUBFOOT
"<ST_TEXT1"
" <+0><ST.SALES<+0><ST.SEATS<+0> <+0> <+0> <+0> <+0>""

ON CAR SUBFOOT
"<ST_TEXT2"
" <+0><ST.SALES<+0><ST.SEATS<+0> <+0> <+0> <+0> <+0>""

ON BODYTYPE SUBFOOT
" <+0><ST.SALES<+0><ST.SEATS<+0> <+0> <+0> <+0> <+0>"
ON TABLE SET HTMLCSS OFF
ON TABLE SET PAGE NOLEAD
ON TABLE SET PAGE-NUM OFF
ON TABLE SET HTMLCSS ON
-*ON TABLE COLUMN-TOTAL AS 'Total'
ON TABLE SET PAGE NOLEAD
ON TABLE SET STYLE *

     UNITS=IN,
     LEFTMARGIN=0,
     RIGHTMARGIN=0,
     TOPMARGIN=0,
     BOTTOMMARGIN=0,
    SQUEEZE=ON,
  TITLETEXT=Report,
$
TYPE=REPORT,
   GRID=OFF,
     ORIENTATION=LANDSCAPE,
     FONT='ARIAL',
     SIZE=8,
     COLOR='BLACK',
     BACKCOLOR='NONE',
     STYLE=NORMAL,
  LEFTGAP=.04,
  RIGHTGAP=.04,
  BOTTOMGAP=.04,
  TOPGAP=.04,
  BORDER=LIGHT,
  BORDER-COLOR=RGB(204 204 204),
  SCROLLHEIGHT=3.4,

$
TYPE=REPORT,HFREEZE=ON,$

TYPE = TITLE,STYLE=-UNDERLINE+BOLD,WRAP = OFF,BACKCOLOR = RGB(247 247 247),FONT='ARIAL',SIZE=10,
BORDER-TOP-COLOR=RGB(204 204 204),BORDER-LEFT-COLOR=RGB(204 204 204),BORDER-RIGHT-COLOR=RGB(204 204 204),BORDER-BOTTOM-COLOR=RGB(0 0 0),
$
-*TYPE=FOOTING,BORDER = OFF, WRAP = ON, $
TYPE = DATA,WRAP = ON, $

TYPE=SUBHEAD,WRAP = ON,  BOTTOMGAP=.02,TOPGAP=.02,HEADALIGN=BODY, $
TYPE=SUBHEAD,BY =1,LINE = 1,SIZE=9, STYLE = BOLD,BACKCOLOR=RGB(236 241 247),COLSPAN=7, $
TYPE=SUBHEAD,BY =2,LINE = 1,SIZE=9, STYLE = BOLD,BACKCOLOR=RGB(236 241 247),COLSPAN=7, $
TYPE=SUBHEAD,BY =3,LINE = 1,SIZE=9, STYLE = BOLD,BACKCOLOR=RGB(236 241 247),COLSPAN=7, $
TYPE=SUBHEAD,BY =4,LINE = 1,SIZE=9, STYLE = BOLD,BACKCOLOR=RGB(236 241 247),COLSPAN=7, $

TYPE=SUBFOOT,WRAP = ON,  BOTTOMGAP=.02,TOPGAP=.02,BORDER=LIGHT,HEADALIGN=BODY, $
TYPE=SUBFOOT,BY =1,LINE = 1,SIZE=9, STYLE = NORMAL,COLSPAN=7,JUSTIFY = LEFT, $
TYPE=SUBFOOT,BY =1,LINE = 2,ITEM=1,SIZE=9, STYLE = BOLD,POSITION = SALES,COLSPAN=1, $
TYPE=SUBFOOT,BY =1,LINE = 2,ITEM=2,SIZE=9, STYLE = BOLD,COLSPAN=1,JUSTIFY=RIGHT, $
TYPE=SUBFOOT,BY =1,LINE = 2,ITEM=3,SIZE=9, STYLE = BOLD,POSITION = SEATS,COLSPAN=1, $

TYPE=SUBFOOT,BY =2,LINE = 1,SIZE=9, STYLE = NORMAL,COLSPAN=7, $
TYPE=SUBFOOT,BY =2,LINE = 2,ITEM=1,SIZE=9, STYLE = BOLD,POSITION = SALES,COLSPAN=1, $
TYPE=SUBFOOT,BY =2,LINE = 2,ITEM=2,SIZE=9, STYLE = BOLD,COLSPAN=1,JUSTIFY=RIGHT, $
TYPE=SUBFOOT,BY =2,LINE = 2,ITEM=3,SIZE=9, STYLE = BOLD,POSITION = SEATS,COLSPAN=1, $

TYPE=SUBFOOT,BY =3,LINE = 1,SIZE=9, STYLE = NORMAL,COLSPAN=7, $
TYPE=SUBFOOT,BY =3,LINE = 2,ITEM=1,SIZE=9, STYLE = BOLD,POSITION = SALES,COLSPAN=1, $
TYPE=SUBFOOT,BY =3,LINE = 2,ITEM=2,SIZE=9, STYLE = BOLD,COLSPAN=1,JUSTIFY=RIGHT, $
TYPE=SUBFOOT,BY =3,LINE = 2,ITEM=3,SIZE=9, STYLE = BOLD,POSITION = SEATS,COLSPAN=1, $

TYPE=SUBFOOT,BY =4,LINE = 1,ITEM=1,SIZE=9, STYLE = NORMAL,COLSPAN=1, $
TYPE=SUBFOOT,BY =4,LINE = 1,ITEM=2,SIZE=9, STYLE = BOLD,JUSTIFY=RIGHT,POSITION = SALES,COLSPAN=1, $
TYPE=SUBFOOT,BY =4,LINE = 1,ITEM=3,SIZE=9, STYLE = BOLD,POSITION = SEATS, $

TYPE=GRANDTOTAL,SIZE=9,     STYLE=BOLD,$

ENDSTYLE
END
-RUN



WebFocus Version 7.7.05
Windows, HTML/PDF/EXL2K/AHTML
June 01, 2012, 12:05 PM
Kerry
Hi SriAravind,

I checked with our technicals and here is the suggestion: if you are using WebFOCUS 7611 or higher, you may be able to using HEADALIGN=BODY in the inline style section of the report and then use COLSPAN. Colspan is dependent on the format of the report. If you cannot figure it out, please open a case with Customer Support Services so that we can work with you. The phone number is 1-800-736-6130, or access online at InfoResponse.

Cheers,

Kerry


Kerry Zhan
Focal Point Moderator
Information Builders, Inc.