[SOLVED] how to change the decimal format when it meets a condition
Hi!! There is a numeric field (type float) in a table that we need to include in a report. The field has 2 types. If type 1 it needs to show up as D15 in the report. If type 2, then it needs to show up as D12.1% in the report. Is there a way to do this or implement this in the wbefocus code?This message has been edited. Last edited by: Kerry,
WebFOCUS 7.1.1 Linux and Unix Output: PDF, Excel, HTML and OLAP
November 28, 2008, 04:13 PM
FrankDutch
Yes
DEFINE FILE CAR
FMAT/A8=IF COUNTRY EQ 'ITALY' THEN 'D15S' ELSE
IF COUNTRY EQ 'ENGLAND' THEN 'D12.1%' ELSE 'I9';
END
TABLE FILE CAR
PRINT SALES/FMAT
BY COUNTRY
BY MODEL
END
Frank
prod: WF 7.6.10 platform Windows, databases: msSQL2000, msSQL2005, RMS, Oracle, Sybase,IE7 test: WF 7.6.10 on the same platform and databases,IE7
March 14, 2011, 06:19 PM
CeleryStalker
Thank you so much! This bit of code was a Godsend!
WebFOCUS 7.6.11 Windows Server 2003 Excel, PDF and HTML