IB - Developer Center    Forums  Hop To Forum Categories  FOCUS/WebFOCUS    trying to produce a totals line
Go
New
Search
Notify
Tools
Reply
  
-star Rating Rate It!  Login/Join 
Platinum Member
Posted
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 "
PRINT
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

Red Face


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
 
Posts: 145 | Location: Pennsylvania | Registered: July 06, 2006Reply With QuoteEdit or Delete MessageReport This Post
Virtuoso
Posted Hide Post
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 [




Frank

prod: WF 7.6.5 platform Windows,
databases: msSQL2000, msSQL2005, RMS, Oracle, Sybase,IE7
test: WF 7.6.5 on the same platform and databases,IE7

 
Posts: 1635 | Location: Amsterdam, the Netherlands | Registered: December 03, 2006Reply With QuoteEdit or Delete MessageReport This Post
Master
Posted Hide Post
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,


Daniel
wf 7.6/WinXP/IIS/SSA
www.wrapapp.com
www.srl.co.il

 
Posts: 594 | Location: Tel Aviv, Israel | Registered: March 23, 2006Reply With QuoteEdit or Delete MessageReport This Post
Master
Posted Hide Post
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
 
Posts: 532 | Location: NYC | Registered: January 11, 2005Reply With QuoteEdit or Delete MessageReport This Post
Platinum Member
Posted Hide Post
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
 
Posts: 145 | Location: Pennsylvania | Registered: July 06, 2006Reply With QuoteEdit or Delete MessageReport This Post
 Previous Topic | Next Topic powered by eve community  
 

IB - Developer Center    Forums  Hop To Forum Categories  FOCUS/WebFOCUS    trying to produce a totals line

Copyright © 1996-2008 Information Builders, leaders in enterprise business intelligence.