[CLOSED] total are not using the display format instead the source data format
Hello,
I am having an issue trying to sum the sales. The source format of the data is D12.2 (float) and the display format on the report is D12C. I have column total at the bottom of sales column. My issue is that the total is calculated with the data source format not with the display format. I have tried creating DEFINE and COMPUTE and I can not get it to total.
Can someone please give me some insight on how to fix this?
Here is the code and the output: DEFINE FILE SALES REV_COM/D12.0=REVENUE; END DEFINE FILE SALES REV/D12=REVENUE; END TABLE FILE SALES SUM COMPUTE REV_INT/I11 = REVENUE; COMPUTE REV_COM/D12 = REVENUE; REVENUE REV BY YEAR BY ITEM ON TABLE SET PAGE-NUM NOLEAD ON TABLE SET ASNAMES ON ON TABLE COLUMN-TOTAL ON TABLE PCHOLD FORMAT HTML ON TABLE SET HTMLEMBEDIMG ON ON TABLE SET HTMLCSS ON END
output
YEAR ITEM REV_INT REV_COMPUTE REVENUE REV_DEFINE
2019 A 1500 1500 1500 1500
B 411 412 411.5 412
C 26033 26034 26033.5 26034
D 15535 15535 15535 15535
43479 [COLOR:RED]43480[/COLOR] [COLOR:RED]43480[/COLOR] 43480
As you can see the column REV_COMPUTE and REVENUE total should ne 43481 not 43480.
thanks,
VeraThis message has been edited. Last edited by: FP Mod Chuck,
WebFOCUS 8.2.0.7, Application Studio, Webfocus Info-Assist iWay Service Manager, iWay Data Migrator Windows, All Outputs IBM DB2/400, MS SQL-Server 2014
June 26, 2019, 12:17 PM
FP Mod Chuck
vnf
I tried to replicate this with the wf_retail data and it all worked as expected...
DEFINE FILE WF_RETAIL REV_COM/D12.0=REVENUE_US; REV/D12=REVENUE_US; END TABLE FILE WF_RETAIL SUM COMPUTE REV_INT/I11 = REVENUE_US; COMPUTE REV_COM/D12 = REVENUE_US; REVENUE_US/D12 REV BY TIME_YEAR BY PRODUCT_CATEGORY ON TABLE SET PAGE-NUM NOLEAD ON TABLE SET ASNAMES ON ON TABLE COLUMN-TOTAL ON TABLE PCHOLD FORMAT HTML ON TABLE SET HTMLEMBEDIMG ON ON TABLE SET HTMLCSS ON END
Sale Year Product Category REV_INT REV_COM Revenue REV 2009 Accessories 499551 499,551 499,551 499,551 Camcorder 667254 667,254 667,254 667,254 Computers 179761 179,761 179,761 179,761 Media Player 1009790 1,009,791 1,009,791 1,009,791 Stereo Systems 1216393 1,216,394 1,216,394 1,216,394 Televisions 286160 286,161 286,161 286,161 Video Production 259179 259,180 259,180 259,180 TOTAL 4118088 4,118,092 4,118,092 4,118,092
Thank you for using Focal Point!
Chuck Wolff - Focal Point Moderator WebFOCUS 7x and 8x, Windows, Linux All output Formats