Focal Point Banner


As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.

Join the TIBCO Community
TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.

  • From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
  • Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
  • Request access to the private WebFOCUS User Group (login required) to network with fellow members.

Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     trying to produce a totals line

Read-Only Read-Only Topic
Go
Search
Notify
Tools
trying to produce a totals line
 Login/Join
 
Master
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 8.1.05M, 8.2.x
APP Studio, Developer Studio, InfoAssist, Dashboards, charts & reports
Apache Tomcat/8.0.36
 
Posts: 573 | Location: Baltimore, MD | Registered: July 06, 2006Report 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.10 platform Windows,
databases: msSQL2000, msSQL2005, RMS, Oracle, Sybase,IE7
test: WF 7.6.10 on the same platform and databases,IE7

 
Posts: 2387 | Location: Amsterdam, the Netherlands | Registered: December 03, 2006Report This Post
Virtuoso
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
In Focus since 1982
wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF

 
Posts: 1980 | Location: Tel Aviv, Israel | Registered: March 23, 2006Report This Post
Virtuoso
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 through 8.1.05
 
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005Report This Post
Master
posted Hide Post
Thanks, thats it!


Tomsweb
WebFOCUS 8.1.05M, 8.2.x
APP Studio, Developer Studio, InfoAssist, Dashboards, charts & reports
Apache Tomcat/8.0.36
 
Posts: 573 | Location: Baltimore, MD | Registered: July 06, 2006Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     trying to produce a totals line

Copyright © 1996-2020 Information Builders