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     [closed]Add Comma's to a Total Field Listed in Heading
Go
New
Search
Notify
Tools
Reply
  
[closed]Add Comma's to a Total Field Listed in Heading
 Login/Join
 
Gold member
posted
Hi All,

I want to have a report heading show the report totals. The issue I'm having is with having it show with commas. For example...

TABLE FILE CAR
SUM
SALES
BY
MODEL
HEADING
"THESE ARE THE SALE TOTALS END

This provides me with the total sales # just fine however there are no commas. I also tried making SALES a /D12...still the report has the commas but the heading does not.

I've looked all over and cannot find a solution to this on the forums.

Thanks for any help!

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


WebFOCUS 8.0.07 and 8.2.01M
UNIX, WINDOWS, ORACLE
PDF, CSV, Excel, TXT, XML, HTML
 
Posts: 65 | Location: Maryland | Registered: January 17, 2012Reply With QuoteReport This Post
Platinum Member
posted Hide Post
DEFINE FILE CAR
SALES1/D12.2=SALES;
END

TABLE FILE CAR
SUM
SALES/D12.2
BY
MODEL
HEADING
"THESE ARE THE SALE TOTALS END


Regards,
Cyril Joy.

WF Production 8008 on Linux.
 
Posts: 143 | Location: Rochester,NY. | Registered: August 20, 2004Reply With QuoteReport This Post
Expert
posted Hide Post
Please post your code between the code tags.


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.06OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Know The Code

 
Posts: 6124 | Location: 33.8688° S, 151.2093° E | Registered: October 31, 2006Reply With QuoteReport This Post
Guru
posted Hide Post
Hi TomS,

Check, it works for you
FILEDEF XYZ DISK BASEAPP/XYZ.TXT (LRECL 12
-RUN
TABLE FILE CAR
SUM
SALES NOPRINT
COMPUTE SALESD/D6 = SALES; NOPRINT
COMPUTE SALESB/A9 = FTOA(SALES, '(D6)', 'A9'); 
ON TABLE SET HOLDLIST PRINTONLY
ON TABLE HOLD AS XYZ
END
-RUN
-READ XYZ &TEST.A9.
-TYPE &TEST
TABLE FILE CAR
SUM SALES
BY MODEL
HEADING
"Total Sales &TEST.EVAL"
END  


-Rifaz

WebFOCUS 7.7.x and 8.x
 
Posts: 405 | Location: India | Registered: June 13, 2013Reply With QuoteReport This Post
Virtuoso
posted Hide Post
A field in a HEADING, SUBHEADING or whatever, will use the original format. Using a format change on a verb object affects only that verb object.
Using a DEFINE is one approach, a COMPUTE is another. However from your code snippet you will NOT get total sales, only the first value for SALES.
You can try:
TABLE FILE CAR
SUM COMPUTE C_SALES/I9C =SALES; NOPRINT
SUM 
SALES
BY 
MODEL
HEADING
"THESE ARE THE SALE TOTALS <C_SALES"
END

or

DEFINE FILE CAR
D_SALES/I10C=SALES;
END

TABLE FILE CAR
SUM 
SALES/I10C
BY 
MODEL
HEADING
"THESE ARE THE SALE TOTALS <TOT.D_SALES"
END


Alan.
WF 7.705/8.007
 
Posts: 1451 | Location: Portugal | Registered: February 07, 2007Reply With QuoteReport This Post
Gold member
posted Hide Post
Doing the define first proved to be the solution.

Thanks all!
Tom

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


WebFOCUS 8.0.07 and 8.2.01M
UNIX, WINDOWS, ORACLE
PDF, CSV, Excel, TXT, XML, HTML
 
Posts: 65 | Location: Maryland | Registered: January 17, 2012Reply With QuoteReport This Post
  Powered by Social Strata  
 

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [closed]Add Comma's to a Total Field Listed in Heading

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