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     [SOLVED] Display of numbers
Go
New
Search
Notify
Tools
Reply
  
[SOLVED] Display of numbers
 Login/Join
 
Platinum Member
posted
Hi,

If an Oracle table is returning 0.5, webfocus is displaying the data as .5 . How can I make the display as 0.5?

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


Regards,
Cyril Joy.

WF Production 8008 on Linux.
 
Posts: 143 | Location: Rochester,NY. | Registered: August 20, 2004Reply With QuoteReport This Post
Platinum Member
posted Hide Post
Hi C.,

try SET CENT-ZERO=ON


Hope it helps


D: WF 7.6.2 P. : WF 7.6.2 on W2003
------------------------------------------------------------------
I see myself as an intelligent, sensitive human, with the soul of a clown which forces me to blow it at the most important moments.

-Jim Morrison-

 
Posts: 206 | Registered: February 25, 2005Reply With QuoteReport This Post
Expert
posted Hide Post
Cyril,

Try -

SET LEADZERO = {ON|OFF} where:

ON - Allows the display of leading zeros if present.

OFF - Truncates leading zeros if present.
OFF is the default value.

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.06 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
 
Posts: 5617 | Location: United Kingdom | Registered: April 08, 2004Reply With QuoteReport This Post
Platinum Member
posted Hide Post
quote:
SET LEADZERO = {ON|OFF}

Hi,

The following command is working fine with my code.
CENT-ZERO=ON

But the following is not working
SET LEADZERO = ON.

Thanks Tony and Pete for your comments.


Regards,
Cyril Joy.

WF Production 8008 on Linux.
 
Posts: 143 | Location: Rochester,NY. | Registered: August 20, 2004Reply With QuoteReport This Post
<Jagan>
posted
Hi ,

I am displaying data in exl97.

In heading portion I am displaying a field in a cell which has the format A3.

when it is displaying, the leading zero is removing...Could you tell me how to retain the leading zero.

Ex:
empno: 012

if i consider empno as my field it is displaying as 12 but not 012.

This message has been edited. Last edited by: <Jagan>,
 
Reply With QuoteReport This Post
Expert
posted Hide Post
If EMPNO was originally an integer, you could put an 'L' on the format before converting it to alpha. If not, I'd recommend using one of the substitution functions like STRREP or OVRLAY or something like that.


Ginny
---------------------------------
Prod: WF 7.7.01 Dev: WF 7.6.9-11
Admin, MRE,self-service; adapters: Teradata, DB2, Oracle, SQL Server, Essbase, ESRI, FlexEnable, Google
 
Posts: 2723 | Location: Ann Arbor, MI | Registered: April 05, 2006Reply With QuoteReport This Post
Master
posted Hide Post
The problem is with EXL97. Even if you changed this to an A3 (which it may be already), it will delete the leading zeros. The only thing I can suggest is to concatenate a character to the front. This will put a single quote. With anything else, you don't need the CTRAN. A space will not work with EXL97 but will work with EXL2K.

 
DEFINE FILE CAR
RFIELD/A50 = COUNTRY||CAR||MODEL;
Q/A1='"';
Q2/A1=CTRAN(1,Q,34,39,'A1'); 
SEATS1/A4=Q2 | EDIT(SEATS);
END

TABLE FILE CAR
PRINT 
      COUNTRY
      CAR
      MODEL
      BODYTYPE
      SEATS1
      DEALER_COST
      RETAIL_COST 

ON TABLE PCHOLD FORMAT EXL97
END
 


Pat
WF 7.6.8, AIX, AS400, NT
AS400 FOCUS, AIX FOCUS,
Oracle, DB2, JDE, Lotus Notes
 
Posts: 755 | Location: TX | Registered: September 25, 2007Reply With QuoteReport This Post
Member
posted Hide Post
quote:
SET CENT-ZERO=ON

Perfect timing! I was asked today to modify a report to have this leading zero, and the answer was in the first few postings when I arrived here.

thank you

Richard


MTO
WebFOCUS Dev Studio 5.3.2 (trying to upgrade to 7.x !)
Unix with Win XP front ends
output usually PDF (and some HTML and XLS at times)
 
Posts: 23 | Location: Toronto, Ontario, Canada | Registered: January 09, 2007Reply With QuoteReport This Post
Expert
posted Hide Post
I know that this is an old post. However, I thoughht I reply to it seeing that it comes up when searching for "leading zeros".

Keep in mind that this prevents "SEATS1" from being used in calculations.


   In FOCUS Since 1983 ~ from FOCUS to WebFOCUS.
   Most recent: 8204 Gen 48 in Test and Production.
 
Posts: 3045 | Location: Middle Tennessee [8204M Gen48 in Test&Prod] | Registered: February 23, 2005Reply With QuoteReport This Post
Master
posted Hide Post
Doug,
The original problem was trying to get an employee number to print with leading zeros. I used the seats example because I needed a numeric field. The only way I know of to have Excel retain the leading zeros on a true numeric field is to go into Excel and set the format to custom. The only way to do that in WebFocus (that I can think of) is to create a template which isn't an option with EXL97.


Pat
WF 7.6.8, AIX, AS400, NT
AS400 FOCUS, AIX FOCUS,
Oracle, DB2, JDE, Lotus Notes
 
Posts: 755 | Location: TX | Registered: September 25, 2007Reply With QuoteReport This Post
Member
posted Hide Post
The 'Seats' example works in EXLK2, but displays the quotes also, unless you prepend an equal sign:
E/A1='=';
Q/A1='"';
SEATS/A6=E||Q||EDIT(SEATS)||Q;
 
Posts: 2 | Registered: August 02, 2006Reply With QuoteReport This Post
Expert
posted Hide Post
Thanks Patricia,

The custom formatting of the cell, with the prepend works fine...

-Doug
 
Posts: 3045 | Location: Middle Tennessee [8204M Gen48 in Test&Prod] | 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     [SOLVED] Display of numbers

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