Focal Point
Displaying values in reports.

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

August 03, 2011, 01:09 AM
Shankar
Displaying values in reports.
Hi,
I have a field in my mas file with format D20.2. For the values 0 in database column for the corresponding field the values are getting displayed like .00.I want to display 0 instead of .00 as it is in database column.Is there any way to handle this? I used SET CENT-ZERO=ON but it is displaying value as 0.00 not 0.Please advice.

Thanks in advance.


WF 8.1.04,Windows 7,
DataBase: Oracle 11g,Output :Excel,PDF,HTML
August 03, 2011, 01:51 AM
Waz
You could try dynamic formatting.

DEFINE FILE XYZ
MYFMT/A8 = IF VALUE EQ INT(VALUE) THEN 'D20' ELSE 'D20.2' ;
END
TABLE FILE XYZ
PRINT VALUE/MYFMT
.
.
.
END


The other option is to convert the value to an alpha.


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 03, 2011, 02:03 AM
Shankar
Thanks Waz.It worked.


WF 8.1.04,Windows 7,
DataBase: Oracle 11g,Output :Excel,PDF,HTML
August 03, 2011, 03:17 PM
MathematicalRob
Yes; thanks! That's a new concept for me, but I can use it!


WebFocus 8201m on Windows; App Studio 8201; Procedures: WebFocus with SQL; HTML Parameter Pages & Dashboard; Output: Excel, HTML, & PDF.