Focal Point Banner
Community Center Education Summit Technical Support User Groups
Let's Get Social!

Facebook Twitter LinkedIn YouTube
Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     How to align Subtotals in Subfoot with the column
Go
New
Search
Notify
Tools
Reply
  
How to align Subtotals in Subfoot with the column
 Login/Join
 
<Vipul>
posted
All, Please help me.

I need to align the subtotals displayed in subfoot of the report. I am doing this because I also need to display count of the counter in the same row. My code is as given below:
-* File cartotal.fex
-SET ECHO=ALL;
-RUN
-*TO DISPLAY THE SQLS GENERATED
SET MSG=ON
SET EMPTYREPORT = ON
SET ASNAMES = ON
SET AUTOINDEX = ON
SET CARTESIAN = OFF
SET CENT-ZERO = OFF
SET DEFINES = COMPILED
SET LINES=999999
SET PRINTPLUS = ON
-*SET ORIENTATION=LANDSCAPE
SET NODATA=0
-SET MISSING = OFF;
-*SET OFFLINE-FMT = STYLED
SET PAGE-NUM = NOLEAD
-********************************
DEFINE FILE CAR
SP/A1 = HEXBYT(160, 'A1');
SP02/A2 = SP|SP;
SP05/A05 = SP|SP|SP|SP|SP;
SP10/A10 = SP05|SP05;
SP15/A15 = SP10|SP05;
SP20/A20 = SP10|SP10;
SP35/A35 = SP10|SP10|SP10|SP05;
CNT/I6 = 1;
PAIDCOST/P17.2CM = RETAIL_COST ;
END
TABLE FILE CAR
PRINT CNT NOPRINT
COUNTRY AS 'Country'
MODEL AS 'Model'
PAIDCOST AS 'Retail Cost'
BY COUNTRY NOPRINT
BY HIGHEST PAIDCOST NOPRINT
ON COUNTRY SUBFOOT
"Totals: .lt.SP35 .lt.ST.CNT .lt.SP35 .lt.ST.PAIDCOST "
HEADING
"Account .lt.COUNTRY "
ON TABLE SET STYLE *
TYPE=REPORT, GRID=OFF, $
ENDSTYLE
END
-RUN

Any Solutions, ideas. Thanks in advance.

Vipul
 
Reply With QuoteReport This Post
<ron>
posted
Looks like all you need are some spot markers. You will still have to count bytes to know where to embed them. For example:

"Totals: <20 .lt.SP35 <30 .lt.ST.CNT <40 .lt.SP35 <50 .lt.ST.PAIDCOST "
 
Reply With QuoteReport This Post
<Vipul>
posted
That does not work to align the amount field as the field position changes with its value.

for example
Country-------Amount
England--------10.00
England-------100.00
Total--------110.00

France---------10.00
France--------100.00
France--------900.00
Total--------1000.00

Spot markers do not align the Totals exactly.

Vipul
 
Reply With QuoteReport This Post
<Grzegorz>
posted
Vipul,

Try:

-* ...
ON COUNTRY SUBFOOT
"Totals:-* ...
ON TABLE SET STYLE *
-* ...
TYPE=REPORT, GRID=ON,$
TYPE=SUBFOOT, HEADALIGN=BODY,$
-* ...
ENDSTYLE
In order to test the HEADALIGN options, it is more convenient to use GRID=ON in stylesheets - after the testing is finished you can switch to GRID=OFF.

Hope this helps
Grzegorz

This message has been edited. Last edited by: <Mabel>,
 
Reply With QuoteReport This Post
<Vipul>
posted
Thanks for the help BUT I still do not get what I want...I am posting the snippet and will explain what I am getting:
TABLE FILE PD_INFO
PRINT CNT NOPRINT
WHERE BNKACCTKY = &BNKACCTKY
IF RECORDLIMIT EQ 1
END
-IF &LINES EQ 0 THEN GOTO ERRCREDIT;

TABLE FILE PD_INFO
PRINT
CNT NOPRINT
PAIDDATE AS 'Date Paid'
CUSTREF AS 'Check Number'
PAIDAMOUNT AS 'Check Amount'
FITRNREF AS 'Sequence Number'
BNKACCTKY NOPRINT
BY BNKACCTKY NOPRINT
BY HIGHEST AMOUNT NOPRINT
WHERE BNKACCTKY = &BNKACCTKY
ON BNKACCTKY SUBFOOT
"Totals: .lt.ST.CNT .lt.PAIDAMOUNT "
HEADING
"Account .lt.BNKACCTKY "
ON TABLE NOTOTAL
-********REPORT FORMAT*******************
ON TABLE HOLD AS PYDYCBO2 FORMAT HTMTABLE
-*ON TABLE PCHOLD FORMAT &FORMAT
-*****************************************
ON TABLE SET STYLE *
TYPE=REPORT, GRID=ON, STYLE=NORMAL, FONT='&RFONT', SIZE=&RSIZE,
BACKCOLOR=NONE,$
TYPE=SUBFOOT, HEADALIGN = BODY, SQUEEZE=ON, $
TYPE=SUBFOOT, LINE=1, CLASS=bborder, $
TYPE=SUBFOOT, LINE=1, ITEM=3, JUSTIFY=LEFT, CLASS=bborder, $
TYPE=HEADING, LINE=1, SIZE=9, STYLE=BOLD, BACKCOLOR=RGB(&STYLE2), $
TYPE=TITLE,STYLE=-UNDERLINE, $
TYPE=TITLE,
COLUMN=N6,
JUSTIFY=LEFT,
FOCEXEC=pdchks(\
SORTFLD='CUSTREF' \
SORTDIR='&SORTDIR' \
),
$
TYPE=TITLE,
COLUMN=N7,
JUSTIFY=RIGHT,
FOCEXEC=pdchks(\
SORTFLD='PAIDAMOUNT' \
SORTDIR='&SORTDIR' \
),
$
ENDSTYLE
END
-RUN
-GOTO HTMLFORM

In the following stmt
Totals: .lt.ST.CNT .lt.PAIDAMOUNT

the paidamount is aligning with the last field sequence number.

Can anyone please help me find the elusive bug.

Thanks,

Vipul
 
Reply With QuoteReport This Post
<Vipul>
posted
or try this one with car file. Please help.

DEFINE FILE CAR
CNT/I6 = 1;
PAIDCOST/P17.2CM = RETAIL_COST ;
END
TABLE FILE CAR
PRINT CNT NOPRINT
COUNTRY AS 'Country'
MODEL AS 'Model'
PAIDCOST AS 'Retail Cost'
BY COUNTRY NOPRINT
BY HIGHEST PAIDCOST NOPRINT
BY CNT NOPRINT
ON COUNTRY SUBFOOT
"Totals: .lt.ST.CNT .lt.ST.PAIDCOST "
ON TABLE SET STYLE *
TYPE=REPORT, GRID=ON, STYLE=NORMAL, FONT=ARIAL, SIZE=8,
BACKCOLOR=NONE,$
TYPE=SUBFOOT, HEADALIGN = BODY, SQUEEZE=ON, $
TYPE=SUBFOOT, LINE=1, CLASS=bborder, $
TYPE=SUBFOOT, LINE=1, ITEM=3, JUSTIFY=LEFT, $
TYPE=HEADING, LINE=1, SIZE=9, STYLE=BOLD, BACKCOLOR=RGB(192 192 192), $
TYPE=TITLE,STYLE=-UNDERLINE, $
ENDSTYLE
END
-RUN

Run this and let me know how to fix this:

Vipul
 
Reply With QuoteReport This Post
<Vipul>
posted
This is great...Figured it out. If I remove the space between the two .lt.st.cnt and .lt.st.paidamount it works. Was this by design or was this an undocumented feature?

Vipul
 
Reply With QuoteReport This Post
Virtuoso
posted Hide Post
This is by design. The space in between 2 fields in a SUBFOOT or any other HEADING or FOOTING is interpreted as a separate entity and therefore focus creates a column (cell) for that blank space. As you noticed, when you remove the spaces between field references, everything works as expected.
 
Posts: 995 | Location: Gaithersburg, MD, USA | Registered: May 07, 2003Reply With QuoteReport This Post
<Vipul>
posted
Thanks Mickey, I learnt something today. I was banging my head yesterday on this and wondering where I went wrong.

Vipul
 
Reply With QuoteReport This Post
  Powered by Social Strata  
 

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     How to align Subtotals in Subfoot with the column

Copyright © 1996-2018 Information Builders, leaders in enterprise business intelligence.