|
Go
![]() |
New
![]() |
Search
![]() |
Notify
![]() |
Tools
![]() |
Reply
![]() |
|
|
Platinum Member |
I am trying to produce a totals line for each column in the report captioned below. I cannot
use RECAP, RECOMPUTE, SUMMARIZE as they will not produce fields that I can carry forward in a hold file for future in a program. Here is the code... TABLE FILE TF_PRREF2 HEADING CENTER "ECT RATINGS REPORT" "FOR &BEG1 - &END1" "FOR FILE1 " SUM CNT.COUNTER AS 'CNT' TOTANS CORRECT NA WRONG COMPUTE PRCT/I10 = (CORRECT/TOTANS)*100; -*TTOTANS -*TCORRECT -* -*COMPUTE GRADE/A1 = IF (PRCT GE 90) AND (PRCT LE 100) THEN 'A' -* ELSE IF (PRCT GE 80) AND (PRCT LE 89) THEN 'B' -* ELSE IF (PRCT GE 70) AND (PRCT LE 79) THEN 'C' -* ELSE IF (PRCT GE 60) AND (PRCT LE 69) THEN 'F'; -* BY REVIEWTYPE BY MDDEPT NOPRINT BY REVIEWED_MD BY VSTART BY VEND BY VASOF -*ON TABLE HOLD AS FILE1 END -RUN -GOTO OUTT -* -* TABLE FILE FILE1 HEADING CENTER "ECT RATINGS REPORT" "FROM FILE1 " CNT TOTANS CORRECT NA WRONG COMPUTE PRCT/I10 = (CORRECT/TOTANS)*100; -* BY REVIEWTYPE -*BY MDDEPT BY REVIEWED_MD BY VSTART BY VEND BY VASOF -*ON REVIEWTYPE RECOMPUTE AS '' -*ON TABLE NTOTAL -*ON TABLE HOLD AS FILE2 END -RUN REPORT Below: ? RATINGS REPORT REVIEWTYPE REVIEWED_MD VSTART VEND VASOF CNT TOTANS CORRECT NA WRONG PRCT ECT 00369 2008/01/01 2008/03/31 2008/06/03 65 773 630 332 143 81 02981 2008/01/01 2008/03/31 2008/06/03 1 12 10 5 2 83 02984 2008/01/01 2008/03/31 2008/06/03 8 94 79 41 15 84 05800 2008/01/01 2008/03/31 2008/06/03 1 0 0 1 0 0 ? Thanks Tomsweb WebFOCUS 5.3.3, 7.1.3, 7.4.1, 7.6 Windows, Aix 5.2, MVS, VM WebFOCUS’ Developer Studio and ESRI/GIS mapping capabilities |
||
|
|
Virtuoso |
Tom
please try to surround your code and examples with the following set of coes to make it better readable. [ CODE] your text and code [ /CODE] But leave out the spaces after the [
|
|||||||
|
|
Master |
Tom,
Is this what you are looking for? REVIEWTYPE REVIEWED_MD VSTART VEND VASOF CNT TOTANS CORRECT NA WRONG PRCT 00369 2008/01/01 2008/03/31 2008/06/03 65 773 630 332 143 81 02981 2008/01/01 2008/03/31 2008/06/03 1 12 10 5 2 83 02984 2008/01/01 2008/03/31 2008/06/03 8 94 79 41 15 84 05800 2008/01/01 2008/03/31 2008/06/03 1 0 0 1 0 0 99999 75 879 719 379 160 248 If so, try something along this line: -* File tomsweb2.fex TABLE FILE CAR PRINT SALES RETAIL DEALER BY COUNTRY BY CAR ON TABLE HOLD AS TOM FORMAT ALPHA END FILEDEF TOM DISK TOM.FTM (APPEND DEFINE FILE TOM XCOUNTRY/A10='ZZZZZZZZZZ'; XCAR/A16=' '; END TABLE FILE TOM SUM SALES RETAIL DEALER BY XCOUNTRY BY XCAR ON TABLE SAVE AS TOM END TABLE FILE TOM PRINT SALES RETAIL DEALER BY COUNTRY BY CAR END This message has been edited. Last edited by: Danny-SRL, |
|||
|
|
Master |
Note to Daniel's approach:
When applying it to your report, the compute COMPUTE PRCT/I10 = (CORRECT/TOTANS)*100;should be retained in the second request to correctly summarize the PRCT column. - Jack Gross WF 7.6.7, Win |
|||
|
|
Platinum Member |
Thanks, thats it!
Tomsweb WebFOCUS 5.3.3, 7.1.3, 7.4.1, 7.6 Windows, Aix 5.2, MVS, VM WebFOCUS’ Developer Studio and ESRI/GIS mapping capabilities |
|||
|
| Previous Topic | Next Topic | powered by eve community |
| Please Wait. Your request is being processed... |
|

