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     [CLOSED] excel report in webfocusv8.2.02

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED] excel report in webfocusv8.2.02
 Login/Join
 
Gold member
posted
Hi All ,

i have a problem in excel report report output in
webfocusv8.2.02

i have a 2 column and cal ROW-TOTAL
the ROW-TOTAL column is cal and decimal is showing as ".01000001" it should show as ".01"

COL1 COL2 TOT
-846.50 247.49 -599.01000001

Need help in resolving this
Thank you

This message has been edited. Last edited by: FP Mod Chuck,


WebFOCUS 8202
 
Posts: 61 | Location: India | Registered: March 24, 2014Report This Post
Virtuoso
posted Hide Post
Hi,

First when posting sample code or result, please use the code tag.
It's the last icon on the ribbon :
</>

Secondly, what is the COL1 & COL2 format ? That can make the whole difference.
Thirdly, are you 100% sure that COL1 & COL2 have the sample value you shown us ?
Fourth, always a good idea trying to reproduce with IB file such as CAR
Fifthly, always a good idea to share your code


WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007
 
Posts: 2409 | Location: Montreal Area, Qc, CA | Registered: September 25, 2013Report This Post
Gold member
posted Hide Post
the format column is "D20S"


WebFOCUS 8202
 
Posts: 61 | Location: India | Registered: March 24, 2014Report This Post
Master
posted Hide Post
Is D20S the ACTUAL or USAGE format? D20S as a USAGE format should only print the integer portion of the value. The one thing to keep in mind with F and D formats is that internally (memory and FOCUS file) they store every significant digit. So if COL1 is a computed field or a field in a FOCUS/XFOCUS file, -846.50 is really -846.50000001, which is why you are getting the result your are getting. Try the following:
 DEFINE FILE CAR
   VAL1/D20S WITH COUNTRY=-846.50000001;
 END
 TABLE FILE CAR
 PRINT VAL1 VAL1/D20.8S
       COMPUTE VAL2=VAL1;
       COMPUTE VAL3/D20.2S=VAL1;
       COMPUTE VAL4/D20.8S=VAL1;
       COMPUTE VAL5/D20.8S=VAL2;
 IF COUNTRY EQ 'ENGLAND'
 END


In this example, you can see how VAL1 with a D20 format (no decimal) really stores all the significant digits and what is printed is based on the USAGE format. Notice VAL2. If a variable is given no format, the default field format is D and the default USAGE is D12.2. When doing computations with D fields, what is used in the internal value not the "USAGE" value.


In FOCUS since 1985. Prod WF 8.0.08 (z90/Suse Linux) DB (Oracle 11g), Self Serv, Report Caster, WebServer Intel/Linux.
 
Posts: 975 | Location: Oklahoma City | Registered: October 27, 2006Report This Post
Gold member
posted Hide Post
Conver the field to Packed Decimal instead of Decimal.
That will round the values and hold it.
I have just changed the format of Define Field from D to P

  DEFINE FILE CAR
   VAL1/P20S WITH COUNTRY=-846.50000001;
 END
 TABLE FILE CAR
 PRINT VAL1 VAL1/D20.8S
       COMPUTE VAL2=VAL1;
       COMPUTE VAL3/D20.2S=VAL1;
       COMPUTE VAL4/D20.8S=VAL1;
       COMPUTE VAL5/D20.8S=VAL2;
 IF COUNTRY EQ 'ENGLAND'
 END


WF 8.2.04
Windows/Unix
All Formats
In Focus since 2006
 
Posts: 74 | Location: UK | Registered: September 17, 2018Report This Post
Expert
posted Hide Post
Simplify further by adding "D12.2" to the fields be ROW-TOTALed, like this:
TABLE FILE CAR
PRINT DCOST/D12.2 RCOST/D12.2
BY COUNT
ON TABLE ROW-TOTAL
END




   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
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED] excel report in webfocusv8.2.02

Copyright © 1996-2020 Information Builders