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.
I'm almost sorry to ask this cause I'm sure its somewhere in the great wide web... but I can't find it.
I am displaying some numbers in a report (a TABLE). I would like to show numbers like 9234.4 as 9,234 (thousands separator was added and the decimal was dropped) and 123456789 as 123M.
I have found several example how to do this using a chart (a GRAPH request), but I can't seem to use the same syntax in a TABLE request. Can anyone help me out here?
The data is D12.1 format. I've tried I12 but then the thousands separator is dropped.
Like I said, I'm sure this sort of thing has been asked before, and I'm cool if you just direct me to those threads, but I've spent about 90 minutes on this, and that seems just too long for formatting.
Thank you...This message has been edited. Last edited by: FP Mod Chuck,
D12.1C or I9C where C stands for comma separated 1000's.
Additionally, in 8205, https://techsupport.informatio...tech/wbf/8205snf.pdf IB has added a feature called COMPACTFORMAT. See page 134 for details to find out how you can reformat long numbers with Thousands, Millions, Billions and Trillions.This message has been edited. Last edited by: BabakNYC,
WebFOCUS 8206, Unix, Windows
Posts: 1853 | Location: New York City | Registered: December 30, 2015
By the time we get updated to 8205, you can play around using something such as this. This is only one way to do it. I remember that someone has shared a DEFINED FUNCTION for number display, but can't find it. I have intentionally keep value below 10K as is and above as ##K. So, I'm just dividing by 1000 those values.
TABLE FILE CAR
SUM RETAIL_COST
COMPUTE NDEC /P10C = IF RETAIL_COST LT 10000 THEN RETAIL_COST
ELSE IF RETAIL_COST GE 10000 AND RETAIL_COST LT 1000000 THEN RETAIL_COST / 1000
ELSE RETAIL_COST / 1000000; NOPRINT
COMPUTE NFMT /A15V = IF RETAIL_COST LT 10000 THEN FPRINT(NDEC, 'P10C', 'A14')
ELSE IF RETAIL_COST GE 10000 AND RETAIL_COST LT 1000000 THEN FPRINT(NDEC, 'P10C', 'A14') || 'K'
ELSE FPRINT(NDEC, 'P10C', 'A14') || 'M'; AS 'New Fmt'
BY COUNTRY
BY CAR
BY MODEL
END
WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF In Focus since 2007
Posts: 2409 | Location: Montreal Area, Qc, CA | Registered: September 25, 2013
We are also pre 8205 and dont have that function available. So, we use the FTOA function like below:
TABLE FILE CAR
SUM
COMPUTE MONEY/D20 = IF LST.MONEY EQ 0 THEN 1 ELSE LST.MONEY * 10;
COMPUTE COMPACT/A11V =
IF MONEY GE 1000000000000 THEN FTOA(MONEY/1000000000000, '(D7.1M)',COMPACT)||'T' ELSE
IF MONEY GE 1000000000 THEN FTOA(MONEY/1000000000, '(D7.1M)',COMPACT)||'B' ELSE
IF MONEY GE 1000000 THEN FTOA(MONEY/1000000, '(D7.1M)',COMPACT)||'M' ELSE
IF MONEY GE 1000 THEN FTOA(MONEY/1000, '(D7.1M)',COMPACT)||'K' ELSE
FTOA(MONEY, '(D7M)',COMPACT);
BY MODEL NOPRINT
WHERE RECORDLIMIT EQ 15
ON TABLE SET PAGE-NUM NOPAGE
ON TABLE SET CENT-ZERO ON
ON TABLE SET STYLE *
INCLUDE=IBFS:/FILE/IBI_HTML_DIR/ibi_themes/warm.sty,$
TYPE=DATA, COLUMN=COMPACT, JUSTIFY=RIGHT, $
ENDSTYLE
END
This message has been edited. Last edited by: Hallway,
Hallway
Prod: 8202M1
Test: 8202M4
Repository:
OS:
Outputs:
Posts: 608 | Location: Salt Lake City, UT, USA | Registered: November 18, 2015