Focal Point Banner


As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.

Join the TIBCO Community
TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.

  • From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
  • Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
  • Request access to the private WebFOCUS User Group (login required) to network with fellow members.

Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] Display of numbers

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[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, 2004Report 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, 2005Report 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.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
 
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004Report 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, 2004Report 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>,
 
Report 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, 2006Report 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, 2007Report 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, 2007Report 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.
   Current: WebFOCUS Administrator at FIS Worldpay | 8204, 8206
 
Posts: 3132 | Location: Tennessee, Nashville area | Registered: February 23, 2005Report 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, 2007Report 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, 2006Report This Post
Expert
posted Hide Post
Thanks Patricia,

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

-Doug
 
Posts: 3132 | Location: Tennessee, Nashville area | Registered: February 23, 2005Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] Display of numbers

Copyright © 1996-2020 Information Builders