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] Recap decimal notation is different in excel????

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED] Recap decimal notation is different in excel????
 Login/Join
 
Platinum Member
posted
Hi,

I tried to reproduce the problem in a car example

here it goes

 

SET CDN=ON
TABLE FILE CAR
PRINT CAR
COMPUTE SALES/D12.2=SALES;
BY COUNTRY 
ON COUNTRY RECAP
   V_SAL/D12.2=SALES;
ON COUNTRY SUBFOOT
" "
"<V_SAL"
ON TABLE SET ONLINE-FMT 'PDF'
ON TABLE SET STYLE *
HEADALIGN=BODY,
GRID=OFF, $
ENDSTYLE
END
 


When i run this piece of code :

the sales totals are noted : 999.999,99

but when i change the online-format to EXL2K

it becomes 999,999.99 but only for the totals

Any idea how i can tackle this??

Thanks,
P.

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


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
Virtuoso
posted Hide Post
quote:
When i run this piece of code :

the sales totals are noted : 999.999,99

but when i change the online-format to EXL2K

it becomes 999,999.99 but only for the totals

Any idea how i can tackle this??


What country are you running data for? I wonder if something about sales says its currency or if excel is the issue?


Leah
 
Posts: 1317 | Location: Council Bluffs, IA | Registered: May 24, 2004Report This Post
Virtuoso
posted Hide Post
Oh as an addendum to my previous post, I put your code through our 5.3.6 version and in excel it doesn't honor the CND=ON even in the detail. PDF does though.


Leah
 
Posts: 1317 | Location: Council Bluffs, IA | Registered: May 24, 2004Report This Post
Virtuoso
posted Hide Post
Mmm.

I have a bit of a weird set up with a mixture of Portuguese/English settings.

When I run this into my English Excel, set up for Portuguese, the Total sales are formatted correctly, 9.999,99 , but the sales are formatted as 9,999,99 .

Which sort of led me to believe that there is a compatability issue between WebFocus and Excel when using CDN. But the same happens without CDN as Leah has pointed out.

I'm beginning to think it's an excel issue, but cannot get the behaviour to change.


Alan.
WF 7.705/8.007
 
Posts: 1451 | Location: Portugal | Registered: February 07, 2007Report This Post
Platinum Member
posted Hide Post
Thanks for looking into this , Alan and Leah

I'm running this with the belgian version of excel , but regardless the version i'm on it should at least be consistent and not showing different behavior for the total lines

Anyway...

I've opened a case for this , the dutch office comfirmed that they could reproduce this problem , and they forwarded it to the states.


P.


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
Pete,

I would hazard a guess that the data file sent to Excel from WF is the problem, in as much that the individual data rows have the CDN format applied but not the total rows.

You might be able to prove this by viewing the Excel data feed in Notepad or another editor and looking through it.

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
Virtuoso
posted Hide Post
Tony is, of course, correct.

The classes in the XHT (for EXL2K) document are associated correctly with a numeric class for the column data, but not for the total data, where a generic class is used.

Not so easy to read the XLS (for EXCEL) data!


Alan.
WF 7.705/8.007
 
Posts: 1451 | Location: Portugal | Registered: February 07, 2007Report This Post
Expert
posted Hide Post
Pete,

Another reason for your CDN not being applied is possibly down to the fact that you are changing the format within the TABLE. Try issuing the reformat in a DEFINE instead and see what that gives you.

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
T.,

I tried to use the define option , as you suggested , but still it gives the same result

P.


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
Virtuoso
posted Hide Post
Setting the SALES in a DEFINE rather than a COMPUTE will make no difference, it is the associated class for fields in a subfoot that is not being set as you would want. Although the field in teh subfoot is described in the code as D12.2, and there being a class for D12.2 fields, it is not applied, within the XHT doc, when a field is in a subfoot (presumably any header or footer).

A recompute, for example will be fine.


Alan.
WF 7.705/8.007
 
Posts: 1451 | Location: Portugal | Registered: February 07, 2007Report This Post
Member
posted Hide Post
Has there been an update to this issue?

I am having a similar problem but issue does not contain a compute or a total. Here is my car file code:

SET CDN = ON

TABLE FILE CAR
SUM
SALES/D12.2S
BY LOWEST COUNTRY
ACROSS LOWEST SEATS
ON TABLE PCHOLD FORMAT EXL2K
-*ON TABLE SET CDN ON
END
-EXIT

When displaying my results to HTML, it works great and displays "25.400,00". When displaying my results to EXL2K, the format displays in this format "25,400.00".

I have tried the "ON TABLE SET CDN ON" statement as well and there is no change. I am using Office Professional Plus 2010. I am thinking Excel is over-riding my format for that field. Any suggestions?

Thank you.


WebFOCUS 8.0.9
Windows 7
All output formats
 
Posts: 3 | Registered: April 15, 2011Report This Post
Expert
posted Hide Post
Hi Julie,

From Dev Studio, Help, Content, Search on CDN(notice the last paragraph):

quote:

CDN
The CDN parameter specifies punctuation used in numerical notation.

Continental Decimal Notation (CDN) is supported for output in TABLE requests. It is not supported in DEFINE or COMPUTE commands.

The syntax is:

SET CDN = option
where:

option
Is one of the following:

ON uses CDN. ON sets the decimal separator as a comma and the thousands separator as a period. For example, the number 3,045,000.76 is represented as 3.045.000,76. ON should be used for Germany, Denmark, Italy, Spain, and Brazil.

OFF turns CDN off. For example, the number 3,045,000.76 is represented as 3,045,000.76. OFF is the default value. OFF should be used for the USA, Canada, Mexico, and the United Kingdom.

SPACE sets the decimal point as a comma, and the thousands separator as a space. For example, the number 3,045,000.76 is represented as 3 045 000,76. SPACE should be used for France, Norway, Sweden, and Finland.

QUOTE sets the decimal point as a comma and the thousands separator as an apostrophe. For example, the number 3,045,000.76 is represented as 3'045'000,76. QUOTE should be used for Switzerland.

QUOTEP sets the decimal point as a period and the thousands separator as an apostrophe. For example, the number 3,045,000.76 is represented as 3'045'000.76.

Note: If the display format of a report is Excel 2000 or later, Continental Decimal Notation is controlled by the settings on the computer. That is, numbers in report output are formatted according to the convention of the locale (location) set in regional or browser language options.

So, you can try this:
  
-SET &ECHO=ALL;
SET CDN=ON
DEFINE FILE CAR
  XSALES/D12.2S = SALES;
END
TABLE FILE CAR
SUM 
  XSALES
BY LOWEST COUNTRY
ACROSS LOWEST SEATS
ON TABLE HOLD AS HOLD1 FORMAT HTML
END
-RUN
SET HTMLFORMTYPE=XLS
-RUN
-HTMLFORM BEGIN
!IBI.FIL.HOLD1;
-HTMLFORM END
-EXIT



Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
 
Posts: 1972 | Location: Centennial, CO | Registered: January 31, 2006Report This Post
Expert
posted Hide Post
Here is the pain-in-the-you-know-where code:
  
-SET &ECHO=ALL;
SET HOLDLIST=PRINTONLY
TABLE FILE CAR
SUM 
  SALES/P18.2C
BY LOWEST COUNTRY
BY LOWEST SEATS
WHERE SALES NE 0;
  ON TABLE HOLD AS HOLD1
END
-RUN
DEFINE FILE HOLD1
 XSALES/A22   = PTOA(SALES, '(P18.2C)', 'A22');
 YSALES/A20   = LJUST(22, XSALES, 'A20');
 SALES_1/A3   = GETTOK(YSALES, 20, 1,  ',', 3, 'A3');
 SALES_2/A3   = GETTOK(YSALES, 20, 2,  ',', 3, 'A3');
 SALES_3/A3   = GETTOK(YSALES, 20, 3,  ',', 3, 'A3');
 SALES_4/A3   = GETTOK(YSALES, 20, 4,  ',', 3, 'A3');
 SALES_X/A2   = GETTOK(XSALES, 22, -1, '.', 2, 'A2');
 NEW_SALES/A20 = IF SALES_4 NE '' THEN SALES_1 || '.' || SALES_2 || '.' || SALES_3 || '.' || SALES_4 || ',' || SALES_X ELSE
                 IF SALES_3 NE '' THEN SALES_1 || '.' || SALES_2 || '.' || SALES_3 || ',' || SALES_X ELSE
                 IF SALES_2 NE '' THEN SALES_1 || '.' || SALES_2 || ',' || SALES_X ELSE
                                       SALES_1 || ',' || SALES_X;
END
TABLE FILE HOLD1
SUM 
-*  XSALES
-*   SALES
-*   SALES_1
-*   SALES_2
-*   SALES_3
-*   SALES_4
-*   SALES_X
  NEW_SALES
BY LOWEST COUNTRY
ACROSS LOWEST SEATS
ON TABLE PCHOLD FORMAT EXL2K
ON TABLE SET GRID ON
ON TABLE SET STYLE *
TYPE=REPORT, COLUMN=NEW_SALES, JUSTIFY=RIGHT,$
ENDSTYLE
END
-EXIT


hth


Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
 
Posts: 1972 | Location: Centennial, CO | Registered: January 31, 2006Report This Post
Member
posted Hide Post
Thank you Tom.

We are allowing our users from different countries to pick their number formats for all of their multi-tabbed Excel reports. This report has around 20 fields that need to be converted for all number format options (ON, OFF, SPACE, QUOTE & QUOTEP). Are there any other options?

Regarding the HTML form, can we create a multiple tabbed Excel report within the form?

Thanks again.


WebFOCUS 8.0.9
Windows 7
All output formats
 
Posts: 3 | Registered: April 15, 2011Report This Post
Expert
posted Hide Post
Hi Julie,

Well, have you had the foreign users test yet? Their machines may convert to the appropriate format, as long as, you have CDN=ON.

If that is not feasible, there are probably a few more variables in trying to get who is running what from which country, as an example.

I'd suggest opening a case w/IBI. They may have come across this...

Good Luck!

Tom

BTW: Talk to you tomorrow... Smiler


Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
 
Posts: 1972 | Location: Centennial, CO | Registered: January 31, 2006Report This Post
Member
posted Hide Post
Thanks again Tom.

I will open a ticket now.

Smiler - Small world....


WebFOCUS 8.0.9
Windows 7
All output formats
 
Posts: 3 | Registered: April 15, 2011Report This Post
Expert
posted Hide Post
Yes Ma'am!!!


Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
 
Posts: 1972 | Location: Centennial, CO | Registered: January 31, 2006Report This Post
Member
posted Hide Post
Hello,

I still have this issue. I've looked in the forum but I didn't find any solution.
Have you any idea to resolve it ?

Thanks,
Marcel

my code

-SET &ECHO=ALL;
-SET CDN=ON;
-DEFAULT &COUNTRY = 'FOC_NONE';
-SET &VCOUNTRY = IF &COUNTRY EQ ' ' THEN 'FOC_NONE' ELSE &COUNTRY;

DEFINE FILE CAR
DEALER_COST2/F10.2 = DEALER_COST;
TOT_DEALER/D10.2 = DEALER_COST + 1
END
TABLE FILE CAR
SUM
DEALER_COST2
RETAIL_COST
BY COUNTRY
BY CAR
WHERE COUNTRY EQ '&VCOUNTRY';

FOOTING
"<TOT_DEALER"
ON TABLE SET ONLINE-FMT EXL2K
END


WebFOCUS 7.6
Windows, All Outputs
 
Posts: 4 | Location: Louvain-La-Neuve, Belgium | Registered: October 17, 2013Report 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] Recap decimal notation is different in excel????

Copyright © 1996-2020 Information Builders