Focal Point
[SOLVED] Display of numbers

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/2401089761

May 15, 2006, 08:00 AM
Cyril Joy
[SOLVED] Display of numbers
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.
May 15, 2006, 08:04 AM
Pete
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-

May 15, 2006, 09:01 AM
Tony A
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.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
May 16, 2006, 01:30 AM
Cyril Joy
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.
August 18, 2008, 12:31 PM
<Jagan>
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>,
August 18, 2008, 01:10 PM
GinnyJakes
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
August 19, 2008, 09:11 AM
PBrightwell
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
August 19, 2008, 12:01 PM
MTO-Solutions-Engineering
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)
August 20, 2008, 10:21 AM
Doug
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.
   Current: WebFOCUS Administrator at FIS Worldpay | 8204, 8206
August 22, 2008, 09:36 AM
PBrightwell
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
September 18, 2008, 04:23 PM
utexex79
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;
September 18, 2008, 11:07 PM
Doug
Thanks Patricia,

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

-Doug