Focal Point
[CLOSED]Double-Precision Format issule

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

August 29, 2010, 10:40 PM
Yangyang
[CLOSED]Double-Precision Format issule
Hi all,

this is my code:

test/P13.2

the reprot display:
123.12
444
12
7642.45


when I code:

test/P13.2CM

the reprot displays:

$123.12
$444.00
$12.00
$7642.45


whe the code test/P13.2 can displays :444.00 and 12.00 ?


Thanks,
James

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


WebFOCUS 7.6.8
WebFOCUS 7.6.10
BI
FLEX
.NET
August 29, 2010, 10:59 PM
Waz
What is the original format of the field ?


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

August 29, 2010, 11:08 PM
Yangyang
Hi Waz,

the test is the original field, in the DB is :

123.12
444
12
7642.45


I want to display below in the report :
 
123.12
444.00
12.00
7642.45


 


Thanks,
James


WebFOCUS 7.6.8
WebFOCUS 7.6.10
BI
FLEX
.NET
August 29, 2010, 11:35 PM
Waz
What is the fieldname, and can you post the master file ?


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

August 30, 2010, 02:07 AM
Yangyang
Hi Waz,

I dont use master file,

I used code:

 
SQL SQLMSS EX .dbo.GETVALUE
TABLE FILE SQLOUT
PRINT *
  ON TABLE HOLD AS XSQLOUT
END


TABLE FILE XSQLOUT
SUM TEST/P13.2
ON TABLE SET PAGE OFF
ON TABLE SET PAGE-NUM OFF
ON TABLE RECOMPUTE AS 'TOTAL'
ON TABLE PCHOLD FORMAT AHTML
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
................
................
.................
.................

-RUN


 

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


WebFOCUS 7.6.8
WebFOCUS 7.6.10
BI
FLEX
.NET
August 30, 2010, 02:21 AM
Waz
Add this after the HOLD AS XSQLOUT
-RUN
? HOLD XSQLOUT


This will show the format of the fields held.


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

August 30, 2010, 03:13 AM
Yangyang
Hi Waz,

I seted... not work...

I set : TEST/P13.3 , I can get 444.000

but I set :TEST/P13.2 , I can get 444 (not 444.00)

it's not make sense ....

Thanks,
James


WebFOCUS 7.6.8
WebFOCUS 7.6.10
BI
FLEX
.NET
August 30, 2010, 05:12 PM
Waz
James, I am trying to find out what the format of the fields are that you are retrieving.

The command I sent you will do that, can you post the results.

-SET &ECHO=ALL;
SQL SQLMSS EX .dbo.GETVALUE
TABLE FILE SQLOUT
PRINT *
  ON TABLE HOLD AS XSQLOUT
END
-RUN
? HOLD XSQLOUT
-EXIT



Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

August 31, 2010, 03:02 AM
Yangyang
Thanks Waz,

you can try to below code:
  

TABLE FILE CAR
SUM
DEALER_COST/P12.2
RETAIL_COST/P12.2
SALES/P12.2
LENGTH/P12.2
WHEELBASE/P12.2 AS 'TEST' 
BY TOTAL HIGHEST WHEELBASE/P12.2
BY CAR 
BY MODEL 
ON TABLE SET PAGE OFF
ON TABLE SET PAGE-NUM OFF
ON TABLE RECOMPUTE AS 'TOTAL'
ON TABLE PCHOLD FORMAT AHTML
ON TABLE SET HTMLCSS ON
END
-EXIT


you can see the 'TEST' column is not format P12.2 , look like P12.1

by the way , I code in Webfocus7610 64bit and windows2008 64bit.

Thanks,
James


WebFOCUS 7.6.8
WebFOCUS 7.6.10
BI
FLEX
.NET
August 31, 2010, 04:26 AM
GamP
James,

I think you should open a case for this with IB tech support. The code on the car file reacts the same in webfocus 7701 on a 32 bit platform.
The code is ok however when run in normal html in stead of active html.
And the code is also ok if you specify BY TOTAL HIGHEST WHEELBASE NOPRINT in stead of BY TOTAL HIGHEST WHEELBASE/P12.2
It seems that things get screwed up if you use the wheelbase field (or any other D or P field) in a BY statement.


GamP

- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
August 31, 2010, 05:47 PM
Waz
What I think is happening is the BY TOTAL is overriding the reformatting of the field, and the SUMmed field takes the same format.

By removing the format from the BY field, the TEST files is OK.

I guess theFormat override does not happen with BY TOTAL.

As GamP suggests, put a case in with IBI.


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

August 31, 2010, 06:01 PM
Darin Lee
Another idea, off the top of my head, it that something may be getting confused in the internal matrix. When you rdefine formats on the fly like this, you actually end up with two fields with the same column name in the internal matrix. Which one gets used with the BY TOTAL, I don't know, but this seems a little indicative of the problem you're seeing. You might try SET HOLDLIST=PRINTONLY, HOLD, and then TABLE the HOLD file. This woul at least eliminate that possibility. If that solves the problem, just DEFINE/COMPUTE fields with different names instead of redefining the format on the fly.


Regards,

Darin



In FOCUS since 1991
WF Server: 7.7.04 on Linux and Z/OS, ReportCaster, Self-Service, MRE, Java, Flex
Data: DB2/UDB, Adabas, SQL Server Output: HTML,PDF,EXL2K/07, PS, AHTML, Flex
WF Client: 77 on Linux w/Tomcat
August 31, 2010, 09:16 PM
Yangyang
Thanks GamP,
Thanks Waz,
Thanks Darin Lee,

I open a case.

Thanks,
James


WebFOCUS 7.6.8
WebFOCUS 7.6.10
BI
FLEX
.NET
August 31, 2010, 09:24 PM
Waz
Can you please post the answer or solution get ?


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!