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     [NFR?] Surpress Trailing Zeros
Go
New
Search
Notify
Tools
Reply
  
[NFR?] Surpress Trailing Zeros
 Login/Join
 
Expert
posted
I think that I have some brain freeze going on here. So, please help me out with what I think is a simple Q&A.

Wahts' the format to suppress trailing zeros in a D#.# field. That is, how do I get "SUM COMPUTE THIS1/D12.6 = 100 / 16.1;" to show up as "6.21118" instead of "6.211180" while maintaning the alignment of the decimal points? Oh, I need to mention that this is only to be done using the format of the field as in "THIS2/D12.6L" adds leading zeros and the default which supresses leading zeros (THIS2/D12.6S).

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




   In FOCUS Since 1983 ~ from FOCUS to WebFOCUS.
   Current: WebFOCUS Administrator at FIS Worldpay | 8204, 8206
 
Posts: 3118 | Location: Tennessee, Nashville area | Registered: February 23, 2005Reply With QuoteReport This Post
Virtuoso
posted Hide Post
I've never seen such a way of formatting numbers in WebFOCUS. So you want to see results this way?

   6.21118
  12.42
   1.008912
  99.999
 713.6


I went through the documentation and could not find any format modifier that would allow for such a thing Frowner

I sure hope someone will give that magic format option and/or setting as now I am intrigued.

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



Prod/Dev: WF Server 8008/Win 2008 - WF Client 8008/Win 2008 - Dev. Studio: 8008/Windows 7 - DBMS: Oracle 11g Rel 2
Test: Dev. Studio 8008 /Windows 7 (Local) Output:HTML, EXL2K.
 
Posts: 1533 | Registered: August 12, 2005Reply With QuoteReport This Post
Expert
posted Hide Post
Thanks for your reply... this is a good representation of what I want.

I think that trailingf zeros, to the right of a decimal point, are about as useless as leading zeros to the left of a decimal point. Now, we have a format to show / suppress (default) those, so why not the same for the trailing zeros...

I Thought that I did this many years ago... Probably in another language or life...
 
Posts: 3118 | Location: Tennessee, Nashville area | Registered: February 23, 2005Reply With QuoteReport This Post
Expert
posted Hide Post
Its a pity that it has to be a format option, as you can do it other ways.

What is the output format ?


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

 
Posts: 6286 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Reply With QuoteReport This Post
Expert
posted Hide Post
The format is D12.6 is for longitude / latitude (something like 42.701). But, Sorry, I'm not going to the trouble (as little at that might be, it's not in the specs, just matching some Java forms) to reformat / EDIT it. I just thought that there was something like D12.6T, where "T" sill suppress the trailing zeros the way the "S" suppresses the leading zeros. We all know how useless trailing zeros are to the right of the decimal point, right? Hint: Just about as useless as leading zeros to the left of the decimal point, right?
 
Posts: 3118 | Location: Tennessee, Nashville area | Registered: February 23, 2005Reply With QuoteReport This Post
Virtuoso
posted Hide Post
Actually, they're a bit less useless than leading zeroes. Trailing zeroes signify a certain precision in the result.

Of course, the result better actually be that accurate!


WebFOCUS 8.1.03, Windows 7-64/2008-64, IBM DB2/400, Oracle 11g & RDB, MS SQL-Server 2005, SAP, PostgreSQL 11, Output: HTML, PDF, Excel 2010
: Member of User Group Benelux :
 
Posts: 1664 | Location: Enschede, Netherlands | Registered: August 12, 2010Reply With QuoteReport This Post
Expert
posted Hide Post
Yes. But, as displayed in NJSDEN's post of Thu Aug 15 2013 16:06, the lack of trailing zeros does make it much more readable. And, as long as the data is actually accurate, then the zero's are extraneous clutter which obsures the visibility of the the non-zero numbers.

To this point, I'm wondering if anyone else see's this as a valuable NFR...
 
Posts: 3118 | Location: Tennessee, Nashville area | Registered: February 23, 2005Reply With QuoteReport This Post
Master
posted Hide Post
Changes in latitudes? Where is Jimmy Buffett when you need him?
DEFINE FILE GGSALES
 LATITUDE/D12.6 = DECODE SEQ_NO (1   6.21118
                                 2 12.42
                 				 3  5.0000000
                                 4  1.01
								 5  12345.012
                                );
 LATITUDE_A15/A15 = FTOA(LATITUDE, '(D12.6)', 'A15');
 LATITUDE_RJ/A15  = RJUST(15, LATITUDE_A15, 'A15');
 LATITUDE_TRIM/A15 = TRIM('T', LATITUDE_RJ, 15, '0', 1, LATITUDE_TRIM);
END
TABLE FILE GGSALES
PRINT SEQ_NO
      LATITUDE
	  LATITUDE_A15
	  LATITUDE_RJ
	  LATITUDE_TRIM
IF SEQ_NO FROM 1 TO 5
ON TABLE SET ONLINE-FMT STANDARD
END
-EXIT  

1 PAGE     1
  
  
  Sequence#       LATITUDE  LATITUDE_A15     LATITUDE_RJ      LATITUDE_TRIM     
  ---------       --------  ------------     -----------      -------------     
          1       6.211180       6.211180           6.211180         6.21118 
          2      12.420000      12.420000          12.420000        12.42    
          3       5.000000       5.000000           5.000000         5.      
          4       1.010000       1.010000           1.010000         1.01    
          5  12,345.012000  12,345.012000      12,345.012000    12,345.012   
  
 
Posts: 810 | Registered: April 23, 2003Reply With QuoteReport This Post
Expert
posted Hide Post
DEFINE FUNCTION BUFFET ...
Cool




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
 
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003Reply With QuoteReport This Post
Virtuoso
posted Hide Post
Cool
 
Posts: 1903 | Location: San Antonio | Registered: February 28, 2005Reply With QuoteReport This Post
Expert
posted Hide Post
LOL / Love the DEFINE FUNCTION BUFFET...

"LATITUDE_TRI" is nice. But I Want A Format... maybe a NFR? Smiler
 
Posts: 3118 | Location: Tennessee, Nashville area | Registered: February 23, 2005Reply With QuoteReport This Post
  Powered by Social Strata  
 

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [NFR?] Surpress Trailing Zeros

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