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
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.