Focal Point Banner


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.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] display number format

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] display number format
 Login/Join
 
Silver Member
posted
Hello All,

I am generating a sales report

For instance, if you use below code
TABLE FILE CAR
SUM
SALES
BY COUNTRY
END

the output is like this.
COUNTRY SALES
ENGLAND 12000
FRANCE 0
ITALY 30200
JAPAN 78030
W GERMANY 88190

But I want it to display like
COUNTRY SALES
ENGLAND 12K
FRANCE 0
ITALY 30K
JAPAN 78K
W GERMANY 88K
I could think of only define, dividing the number and changing it to alpha numeric.
Please let me know if anyone has a better solution.
Thanks in advance.
SG.

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


Webfocus 7.6.8
PDF,HTML & EXCEL
 
Posts: 32 | Location: memphis,tn | Registered: January 25, 2007Report This Post
Expert
posted Hide Post
Or: COMPUTE... I don't know of anything that does a "K" like you can do a "%".
 
Posts: 3132 | Location: Tennessee, Nashville area | Registered: February 23, 2005Report This Post
Virtuoso
posted Hide Post
Instead of appending K to each value, your user might be satisfied if you just note "(000 omitted)" in the heading.

TABLE FILE CAR
WRITE SUM.SALES NOPRINT
AND COMPUTE Sales/D6.0=SUM.SALES/1000; AS 'Sales,(000 omitted)'
BY COUNTRY
END


- Jack Gross
WF through 8.1.05
 
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005Report This Post
Expert
posted Hide Post
That's a good one Jack... Or a footnote (SUBFOOT) to that effect: NOTE: Sales shown in Thousands... I've done that one...
 
Posts: 3132 | Location: Tennessee, Nashville area | Registered: February 23, 2005Report This Post
Virtuoso
posted Hide Post
SG,

Define will do the trick for you only if you have a PRINT.
If you do a SUM, then you'll have to revert to doing a COMPUTE, because you want the summed amounts to display correctly.
And, doing it this way you can't do generated (sub)totals, you'll also have to compute (RECAP) those manually.
I'd go for the Doug's suggestion. Much easier and pretty much accepted as a standard way of presenting high numbers.


GamP

- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
 
Posts: 1961 | Location: Netherlands | Registered: September 25, 2007Report This Post
Expert
posted Hide Post
  
DEFINE FILE CAR
  DUMMY/A1 = ' ';
END
TABLE FILE CAR
SUM 
   SALES NOPRINT
    COMPUTE P_SALES/P6  = SALES/1000; NOPRINT
    COMPUTE A_SALES/A10 = PTOA(P_SALES, '(P6)', A_SALES); NOPRINT
    COMPUTE K_SALES/A11 = A_SALES || 'K'; AS 'Sales'
BY DUMMY NOPRINT
BY COUNTRY
ON DUMMY RECAP
    X_SALES/P6  = P_SALES;
    Y_SALES/A10 = PTOA(X_SALES, '(P6)', Y_SALES); 
    Z_SALES/A11 = Y_SALES || 'K';
ON DUMMY SUBFOOT
"Total<Z_SALES"
ON TABLE SET STYLE *
TYPE=DATA, COLUMN=N6, JUSTIFY=RIGHT,$
TYPE=SUBFOOT, HEADALIGN=BODY, STYLE=BOLD, $
TYPE=SUBFOOT, ITEM=2, JUSTIFY=RIGHT,$
END
-EXIT


Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
 
Posts: 1972 | Location: Centennial, CO | Registered: January 31, 2006Report This Post
Virtuoso
posted Hide Post
Thanks Tom for jumping in, I really didn't have the time to code it ... Cool


GamP

- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
 
Posts: 1961 | Location: Netherlands | Registered: September 25, 2007Report This Post
Silver Member
posted Hide Post
Thanks everyone for the input.
I will put a note in the header/footer that the data shown is in thousands.

Thanks again,
SG.


Webfocus 7.6.8
PDF,HTML & EXCEL
 
Posts: 32 | Location: memphis,tn | Registered: January 25, 2007Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] display number format

Copyright © 1996-2020 Information Builders