Focal Point
[SOLVED] i need one field that have 2 formats D12.2 and D12.2%

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

April 22, 2013, 11:35 AM
expertomad
[SOLVED] i need one field that have 2 formats D12.2 and D12.2%
Hello
I need one field that 2 formats D12.2 and D12.2%

Example:
TABLE FILE SALES
SUM
COMPUTE FIELD3_C/D12.2 = IF NAME EQ 'Ratio' THEN FIELD3/D12.2% ELSE FIELD3/D12.2 ;
BY COUNTRY
END
Thanks for all.

This message has been edited. Last edited by: <Kathryn Henning>,
April 22, 2013, 11:59 AM
Francis Mariani
Look at "Creating Reports With WebFOCUS Language > Creating Temporary Fields > Defining a Virtual Field > Applying Dynamically Formatted Virtual Fields to Report Columns" (not easy to find!)

DEFINE FILE CAR
SALES_FMT/A8 = IF COUNTRY EQ 'ITALY' THEN 'D10.2%' ELSE 'D12';
END

TABLE FILE CAR
SUM
SALES/SALES_FMT
BY COUNTRY
END



Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
April 22, 2013, 12:07 PM
expertomad
Francis you are the best.

Than you for all.

Good day.