As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.
Join the TIBCO Community TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.
From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
Request access to the private WebFOCUS User Group (login required) to network with fellow members.
Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.
You probably want the FTOA function instead of a straight EDIT to get the commas:
-* File car.fex
DEFINE FILE CAR
COST000=RCOST/1000;
ACOST/A15=EDIT(RCOST);
ACOSTK/A16=ACOST||'K';
FCOST/A15=FTOA(RCOST,'(D12)',FCOST);
FCOSTK/A16=FCOST||'K';
END
TABLE FILE CAR
PRINT CAR ACOSTK FCOSTK
BY COUNTRY
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT PDF
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
UNITS=IN,
SQUEEZE=ON,
ORIENTATION=PORTRAIT,
$
TYPE=REPORT,
GRID=OFF,
FONT='ARIAL',
SIZE=10,
COLOR='BLACK',
BACKCOLOR='NONE',
STYLE=NORMAL,
$
ENDSTYLE
END
Also, unless your data is already stored in thousands, you'll want to divide sales by 1000 and THEN display with the K. That may be stating the obvious, but it's not always obvious to everyone. You can play with the CURRSYM setting, but its default placement is to the left of the number so it looks funny.This message has been edited. Last edited by: Darin Lee,
Regards,
Darin
In FOCUS since 1991 WF Server: 7.7.04 on Linux and Z/OS, ReportCaster, Self-Service, MRE, Java, Flex Data: DB2/UDB, Adabas, SQL Server Output: HTML,PDF,EXL2K/07, PS, AHTML, Flex WF Client: 77 on Linux w/Tomcat
Posts: 2298 | Location: Salt Lake City, Utah | Registered: February 02, 2007
Looks like the only way to go would be to use a filedef and hold the detail report in a file. Caculate the counts separately and append it to the hold file. All just for a 'k'.
WF 7.1.1, WF Developer studio 7.1.1, Windows & Mainframe, HTML
TABLE FILE CAR
PRINT
DCOST/D20:F
BY COUNTRY
ON TABLE HOLD FORMAT HTMTABLE
ON TABLE COLUMN-TOTAL
END
-RUN
-HTMLFORM BEGIN
<HTML>
<HEAD>
<script type="text/javascript">
onload = function()
{
document.body.innerHTML = document.body.innerHTML.replace(/\u20ac/g, ' K');
}
</script>
</HEAD>
<BODY>
!IBI.FIL.HOLD;
</BODY>
</HTML>
-HTMLFORM END
:F or !F on the format displays a trailing Euro symbol.
Raise an NFR so that SET CURRSYMB= is supported for extended currency symbol as well as for M and N formatting options
Why they did not do it like that in the first place I don't know (very short sighted).
(edit)
Never mind the NFR I have asked for one to be raised because rethinking I would like support for unit of measure.
for example
SET CURRSYMB='Kg'
-RUN
TABLE FILE CAR
PRINT
WEIGHT/D20:F
BY COUNTRY SUBTOTAL
ON TABLE COLUMN-TOTAL
END
would display as
COUNTRY WEIGHT
ENGLAND 3,435 Kg
4,200 Kg
4,000 Kg
2,241 Kg
*TOTAL ENGLAND 13,876 Kg
This message has been edited. Last edited by: <JG>,
oh would that be nice, John. in other languages i 'speak', there is an option on display LEAD='$' and/or TRAIL='%' which we could , in webfocus, implement in a style sheet. and the characters could be anything you need, even a word, eg TRAIL='average'
In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003
I did it the long way but now I have another problem How do I make the last row in the report to BOLD ?
FILEDEF HOLD25 DISK HOLD25.FTM (APPEND
-STEP1
TABLE FILE CAR
SUM SALES
BY COUNTRY
BY CAR
ON TABLE HOLD AS HOLD20
END
DEFINE FILE HOLD20
SALESK/A10 = EDIT(SALES)|'K' ;
END
TABLE FILE HOLD20
PRINT COUNTRY CAR SALES SALESK
ON TABLE HOLD AS HOLD25
END
-STEP2
DEFINE FILE HOLD20
MYCOL1/A10 = ' ' ;
MYCOL2/A16 = 'TOTAL' ;
END
TABLE FILE HOLD20
SUM SALES
BY MYCOL1
BY MYCOL2
ON TABLE HOLD AS HOLD21
END
DEFINE FILE HOLD21
SALESK/A10 = EDIT(SALES)|'K' ;
END
-STEP3
TABLE FILE HOLD21
PRINT MYCOL1 AS COUNTRY MYCOL2 AS CAR SALES SALESK
ON TABLE HOLD AS HOLD25
END
TABLE FILE HOLD25
PRINT
MYCOL1 AS COUNTRY
MYCOL2 AS CAR
SALES
SALESK
END
WF 7.1.1, WF Developer studio 7.1.1, Windows & Mainframe, HTML
I think you are taking the really long route. Wouldn't this do the trick:
-* File dev2.fex
TABLE FILE CAR
PRINT
SALES
COMPUTE MYSALES/A7=EDIT(SALES)|'K' ;
BY COUNTRY
ON TABLE RECAP
TMYSALES/A7=EDIT(SALES) | 'K';
ON TABLE SUBFOOT
"TOTAL <TOT.SALES<TMYSALES "
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
TYPE=TABFOOTING, HEADALIGN=BODY, STYLE=BOLD, $
ENDSTYLE
END
Daniel In Focus since 1982 wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF
Posts: 1980 | Location: Tel Aviv, Israel | Registered: March 23, 2006