|
Go
![]() |
New
![]() |
Search
![]() |
Notify
![]() |
Tools
![]() |
Reply
![]() |
|
|
Member |
Is there any way to get RPCT. columns to subtotal correctly? I've tried SUMMARIZE and RECOMPUTE and all I get are the sums of the percentages. What I want, of course, are the percentages for the subtotal rows.
TABLE FILE CAR SUM SEATS RPCT.SEATS/D8.2% BY COUNTRY SUMMARIZE ACROSS BODYTYPE END SET SUMMARYLINES has no effect. Is there some option or command I'm missing? I'll appreciate any and all help. Test: Win XP SP2, Dev Studio 7.6.1, SQL Server 2K, PDF, EXL2K Prod: Win 2K3, WF 5.3.6, SQL Server 2K, PDF, EXL2K |
||
|
|
Expert |
Unfortunately, I don't think you're missing an option or command - rather, it is WebFOCUS that is missing something!
Here's one way - calculate the percentage: TABLE FILE CAR SUM SEATS NOPRINT BY COUNTRY SUM SEATS COMPUTE SEATSPCT/D8.2% = SEATS / C1 * 100; AS '%' BY COUNTRY SUMMARIZE ACROSS BODYTYPE END I hope someone proves me wrong, but the only other way would be to use FRL to resolve this simple task. Francis Env 1 Prod: WebFOCUS 5.3.2 Servlet - MRE/Dashboard/Self Service/ReportCaster - Windows Server 2003 - IIS/New Atlanta ServletExec - MS SQL Server Env 2 Prod: WebFOCUS 5.3.3 CGI - Self Service - AIX 5.2 - IBM DB2 Env 3 Local: DevStudio 5.3.4 Servlet - Self Service - MS Windows XP SP2 - Apache Tomcat 5.0.28 Output: HTML, Excel 2000 and PDF |
|||
|
|
Master |
Francis is correct. SUMMARIZE/RECOMPUTE do not recalculate the RPCT. prefix on the total lines. Just for fun I tested the MAX. prefix operator and the same is true for this one as well. It seems the prefix operators are calculated as the internal matrix is being built or at some interim level before COMPUTEs. This is probably why they cannot act like or be treated as true COMPUTE fields which are affected correctly by SUMMARIZE/RECOMPUTE.
I suggest using Francis' technique. Thanks! Mickey WebFOCUS 7.1.3 - Windows 2003 Server - Oracle Data Sources - HTML, PDF, EXCEL Output |
|||
|
|
Virtuoso |
And if you don't like the use of the column coding (C1) you can create an extra field SEATS1 and use that in the code like
DEFINE FILE CAR SEATS1=SEATS; END TABLE FILE CAR SUM SEATS1 NOPRINT BY COUNTRY SUM SEATS COMPUTE SEATSPCT/D8.2% = SEATS / SEATS1 * 100; AS '%' BY COUNTRY SUMMARIZE ACROSS BODYTYPE END prod: WF 7.1.4 platform Windows, databases: msSQL2000, msSQL2005, RMS, Oracle, Sybase,IE7 test: WF 7.6.1 on the same platform and databases,IE7 |
|||
|
|
Member |
Thank you very much. This was exactly what I needed. I was hoping I was missing something that didn't require a lot of extra coding - and I was. Although I don't mind the column technique, I'll make it easier for someone else who may have to maintain my code at some later date and be more explicit. Thanks again Francis, Mickey, and Frank.
Test: Win XP SP2, Dev Studio 7.6.1, SQL Server 2K, PDF, EXL2K Prod: Win 2K3, WF 5.3.6, SQL Server 2K, PDF, EXL2K |
|||
|
| Previous Topic | Next Topic | powered by eve community |
| Please Wait. Your request is being processed... |
|

