Focal Point
[SOLVED] Multiple number formats in same column

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

November 05, 2014, 09:37 AM
Deej
[SOLVED] Multiple number formats in same column
I need to format numbers differently in the same column. I'd like the numbers at the top of the report to be integer and the numbers at the bottom, in grey, to be % with one decimal.

Is there any way to format them differently?

We're using version 7703.

Thanks.

This message has been edited. Last edited by: <Kathryn Henning>,



WebFOCUS 8.1.05
Windows, All Outputs
November 05, 2014, 09:50 AM
Francis Mariani
Look for "Applying Dynamically Formatted Virtual Fields to Report Columns" in the documentation, described in the GUI section of the docs, or here:

Creating Reports With WebFOCUS Language > Creating Temporary Fields > Defining a Virtual Field > Applying Dynamically Formatted Virtual Fields to Report Columns


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
November 05, 2014, 08:45 PM
HarryLo
Hi Deej, You can do it in at least one of two ways. Use a Subfoot or use FML with Recaps. There may be other ways also.


WebFOCUS 7.6
Windows, All Outputs
November 07, 2014, 11:21 AM
Deej
Thanks for the suggestions, I'll take a look.

Sorry for the late reply, my computer went down shortly after I posted this and I'm just now getting back up and running.

Thanks,

DJ



WebFOCUS 8.1.05
Windows, All Outputs
November 10, 2014, 11:40 AM
jimbo
 
DEFINE FILE CAR
NEWFMT/A8              = IF COUNTRY EQ 'ENGLAND' THEN 'D15M'  ELSE 'D15.2'  ;
END
TABLE FILE CAR
LIST COUNTRY DEALER_COST/NEWFMT 
END 



7.7.04
Win2K3, Unix
Oracle 10G,SQL2K,XFOCUS,ESRI,BID,MRE,SELF-SERVICCE
November 10, 2014, 12:15 PM
susannah
what jimbo says.




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
November 11, 2014, 09:44 AM
Deej
jimbo, I tried applying your suggestion to my report and I'm almost there, just need a tweak but I'm not sure how to tweak it.

My original report code shows this:

-SET &RANDOM = RDUNIF(D5) * RDUNIF(D5) * 10000;
TABLE FILE FLOORING_WARRANTY_MONTHLY_SCORECARD_TBL

SUM
METRIC NOPRINT
ACTUAL/P6.1BCS AS 'Actual'

BY METRIC_SEQUENCE NOPRINT
BY METRIC AS ''
ACROSS HIGHEST YEARMONTH AS ''



And when I tried to apply your code to my report:

DEFINE FILE FLOORING_WARRANTY_MONTHLY_SCORECARD_TBL
ACTUAL/A8 = IF METRIC EQ '% Opened New Construction' THEN 'P2.1BCS%' ELSE IF METRIC EQ '% Opened Retail' THEN 'P2.1BCS%' ELSE IF METRIC EQ '% Opened Commercial' THEN 'P2.1BCS%' ELSE IF METRIC EQ '% Opened Other' THEN 'P2.1BCS%' ELSE 'P6C' ;
END

-SET &RANDOM = RDUNIF(D5) * RDUNIF(D5) * 10000;
TABLE FILE FLOORING_WARRANTY_MONTHLY_SCORECARD_TBL

SUM
METRIC NOPRINT
ACTUAL

BY METRIC_SEQUENCE NOPRINT
BY METRIC AS ''
ACROSS HIGHEST YEARMONTH AS ''




I know I'm close, but what do I need to change/add?



WebFOCUS 8.1.05
Windows, All Outputs
November 11, 2014, 09:46 AM
Deej
Not sure why my pictures aren't showing up. FRUSTRATING!



WebFOCUS 8.1.05
Windows, All Outputs
November 11, 2014, 09:55 AM
Deej
Got it!!

DEFINE FILE FLOORING_WARRANTY_MONTHLY_SCORECARD_TBL
NEWFMT/A8 = IF METRIC EQ '% Opened New Construction' THEN 'P6.1BCS%' ELSE IF METRIC EQ '% Opened Retail' THEN 'P6.1BCS%' ELSE IF METRIC EQ '% Opened Commercial' THEN 'P6.1BCS%' ELSE IF METRIC EQ '% Opened Other' THEN 'P6.1BCS%' ELSE 'P6C' ;
END

-SET &RANDOM = RDUNIF(D5) * RDUNIF(D5) * 10000;
TABLE FILE FLOORING_WARRANTY_MONTHLY_SCORECARD_TBL
SUM

METRIC NOPRINT


ACTUAL/NEWFMT AS 'Actual'

BY METRIC_SEQUENCE NOPRINT
BY METRIC AS ''
ACROSS HIGHEST YEARMONTH AS ''



WebFOCUS 8.1.05
Windows, All Outputs
November 11, 2014, 10:37 AM
Francis Mariani
Quite often tinypic is blocked by the server. In my company it's blocked as a "Adult/Mature Content;Intimate Apparel/Swimsuit" site.


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
November 11, 2014, 10:46 AM
Deej
So I take it they are showing up in my post for everyone else?

Thanks again for all of the responses.



WebFOCUS 8.1.05
Windows, All Outputs
November 12, 2014, 08:16 AM
George Patton
Nope - no pictures here - and I allow ALL content.


WebFOCUS 7.7.05 Windows, Linux, DB2, IBM Lotus Notes, Firebird, Lotus Symphony/OpenOffice. Outputs PDF, Excel 2007 (for OpenOffice integration), WP