Focal Point
[SOLVED] RPCT - Decimal precision

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

February 27, 2015, 10:26 AM
Egon
[SOLVED] RPCT - Decimal precision
I'm trying to use RPCT on a across that only has two columns. When I run the report some of the rows add up to only 99% and not 100%.

When I add a decimal point they are all just zero. Below is the code I'm using and the output. My question is, how do I get either the decimal points, or get WebFocus to round and not truncate.

TABLE FILE GRADECOUNTS
SUM 
     RPCT.GRADECOUNTS.GRADECOU.BID/D8.2% AS ''
BY  LOWEST GRADECOUNTS.GRADECOU.CRS_TITLE
ACROSS LOWEST GRADECOUNTS.GRADECOU.Category
ON TABLE SET PAGE-NUM NOLEAD
ON TABLE NOTOTAL
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
     INCLUDE = IBFS:/EDA/EDASERVE/_EDAHOME/ETC/endeflt.sty,
$
ENDSTYLE
END  


 
                              Category 
                              A-B-C     D-F-W-I 
CRS_TITLE   
--------------------------------------------------------------------------------
ACCELERATED COMPOSITION      90.00%    10.00% 
ACCELERATED COMPOSITION - H  95.00%    4.00% 
 


Row two adds up to 99%.

This message has been edited. Last edited by: Egon,


WebFocus App Studio 8.1.0.5, Windows 7 64bit.
February 27, 2015, 10:40 AM
Wep5622
What is the actual type of GRADECOUNTS.GRADECOU.BID?

I suspect that it doesn't have a decimal point and so the RPCT calculation is rounding to whole numbers.

That you display that result with two decimals doesn't change that.

You'll probably need to COMPUTE the result in the correct format or DEFINE the base field in a way that it has sufficient precision.


WebFOCUS 8.1.03, Windows 7-64/2008-64, IBM DB2/400, Oracle 11g & RDB, MS SQL-Server 2005, SAP, PostgreSQL 11, Output: HTML, PDF, Excel 2010
: Member of User Group Benelux :
February 27, 2015, 10:49 AM
Egon
GRADECOUNTS.GRADECOU.BID is actually a count of an alphanumeric field earlier on in the process. I'll see if I can use a COMPUTE or DEFINE for the count field.

 TABLE FILE BASELIST
SUM 
     CNT.DST.BASELIST.BASELIST.BID AS 'COUNT,DISTINCT,BASELIST.BASELIST.BID'
BY  BASELIST.BASELIST.CRS_TITLE
BY TOTAL LOWEST COMPUTE GRADE/A20 = IF J3.BASELIST.S_GRADE EQ MISSING THEN 'W' ELSE J3.BASELIST.S_GRADE;
BY  LOWEST J3.BASELIST.S_GRADE
ON TABLE SET PAGE-NUM NOLEAD
ON TABLE NOTOTAL
ON TABLE HOLD AS GRADECOUNTS
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
     INCLUDE = IBFS:/EDA/EDASERVE/_EDAHOME/ETC/endeflt.sty,
$
ENDSTYLE
END
 



WebFocus App Studio 8.1.0.5, Windows 7 64bit.
February 27, 2015, 10:55 AM
Egon
It worked, I computed it instead in the process before.

Thank you!


WebFocus App Studio 8.1.0.5, Windows 7 64bit.