I am generating a sales report
For instance, if you use below code
TABLE FILE CAR
the output is like this.
W GERMANY 88190
But I want it to display like
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,
PDF,HTML & EXCEL
Or: COMPUTE... I don't know of anything that does a "K" like you can do a "%".
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
That's a good one Jack... Or a footnote (SUBFOOT) to that effect: NOTE: Sales shown in Thousands... I've done that one...
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.
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
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
Thanks Tom for jumping in, I really didn't have the time to code it ...
Thanks everyone for the input.
I will put a note in the header/footer that the data shown is in thousands.
PDF,HTML & EXCEL
|Powered by Social Strata|