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     exl2k - Prevent TOTAL of '% of TOTAL' from displaying in RECOMPUTE [SOLVED]

Read-Only Read-Only Topic
Go
Search
Notify
Tools
exl2k - Prevent TOTAL of '% of TOTAL' from displaying in RECOMPUTE [SOLVED]
 Login/Join
 
Master
posted
I have created a prototype in exl2k to show numeric counts (columns) with the total and a '% of TOTAL'
(pct.cnt) of that total.

I am trying to prevent the TOTAL of the '% of TOTAL' from displaying in the ON TABLE RECOMPUTE, along with
the other totals.

Can anyone help me? I have been playing with ON TABLE SUBFOOT, ON TABLE RECOMPUTE, etc., but it gets
a little monochromatic. Eeker

Here is the code:

-* File PLAY_CARS.fex
SET ASNAMES = ON
 
TABLE FILE CAR
PRINT
CAR
MODEL
SALES
BY COUNTRY
ON TABLE HOLD AS CX1
END
-RUN

DEFINE FILE CX1
ECAR/I9 = IF COUNTRY EQ 'ENGLAND' AND SALES GT 0 THEN 1 ELSE 0;
FCAR/I9 = IF COUNTRY EQ 'FRANCE'  AND SALES GT 0 THEN 1 ELSE 0;
ICAR/I9 = IF COUNTRY EQ 'ITALY'   AND SALES GT 0 THEN 1 ELSE 0;
JCAR/I9 = IF COUNTRY EQ 'JAPAN'   AND SALES GT 0 THEN 1 ELSE 0;
GCAR/I9 = IF COUNTRY EQ 'W GERMANY' AND SALES GT 0 THEN 1 ELSE 0;
END

TABLE FILE CX1
"POST DEFINE CODE"
PRINT
ECAR
FCAR
ICAR
JCAR
GCAR
COMPUTE ALLCARS/D12 = ECAR + FCAR + ICAR + JCAR  + GCAR;
BY COUNTRY
ON TABLE HOLD AS CX2
END
-RUN

TABLE FILE CX2
HEADING
" SUM THEM "
SUM
ALLCARS AS 'ATOT'
PCT.CNT.ALLCARS AS 'PCTOT'
ECAR
FCAR
ICAR
JCAR
GCAR
BY COUNTRY
ON TABLE HOLD AS CX2
END
-RUN

TABLE FILE CX2
HEADING
" FINAL REPORT "
" "
PRINT
ECAR AS 'England'
FCAR AS 'France'
ICAR AS 'Italy'
JCAR AS 'Japan'
GCAR AS 'W Germany'
ATOT AS 'Total'
PCTOT AS '% of,TOTAL'
BY COUNTRY
ON TABLE RECOMPUTE

ON TABLE PCHOLD FORMAT EXL2K
 
ON TABLE SET PAGE NOPAGE
ON TABLE SET STYLE *
TYPE=REPORT,
FONT=ARIAL,
SIZE=9,
STYLE=NORMAL,
$
TYPE=HEADING,
HEADALIGN=BODY,
JUSTIFY=CENTER,
$
TYPE=HEADING,
LINE=1,
STYLE=BOLD,
COLSPAN=8,
$
TYPE=HEADING,
LINE=2,
COLSPAN=8,
$
TYPE=TITLE,
STYLE=BOLD,
$
TYPE=GRANDTOTAL,
STYLE=BOLD,
COLSPAN=8,
$
ENDSTYLE
END

-RUN


Thank you !

This message has been edited. Last edited by: Tomsweb,


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
You have PCTOT as a column of CX2, so the report against CX2 has no basis on which it can be "recomputed".

To recompute the percent, you need to include its numerator and denominator as (NOPRINT) columns, and COMPUTE the percent as a printed column. RECOMPUTE will then recomputed the percent column's summary value, based on the column-totals of the (hidden) numerator and denominator columns.

This message has been edited. Last edited by: j.gross,


- 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
I solved the problem with this block of code at the bottom of the request.

 
TYPE=GRANDTOTAL,
COLUMN=PCTOT,
COLOR='WHITE',
$


Thanks Cool


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
Master
posted Hide Post
quote:
Originally posted by Tomsweb:
I solved the problem with this block of code at the bottom of the request.
I also added the code JG recommended to make it correct.

 
SET ASNAMES = ON
-SET &ECHO = ALL;

TABLE FILE CAR
PRINT
CAR
MODEL
SALES
BY COUNTRY
ON TABLE HOLD AS CX1
END
-RUN

DEFINE FILE CX1
ECAR/I9 = IF COUNTRY EQ 'ENGLAND'   AND SALES GT 0 THEN 1 ELSE 0;
FCAR/I9 = IF COUNTRY EQ 'FRANCE'    AND SALES GT 0 THEN 1 ELSE 0;
ICAR/I9 = IF COUNTRY EQ 'ITALY'     AND SALES GT 0 THEN 1 ELSE 0;
JCAR/I9 = IF COUNTRY EQ 'JAPAN'     AND SALES GT 0 THEN 1 ELSE 0;
GCAR/I9 = IF COUNTRY EQ 'W GERMANY' AND SALES GT 0 THEN 1 ELSE 0;
END

TABLE FILE CX1
"POST DEFINE CODE"
PRINT
ECAR
FCAR
ICAR
JCAR
GCAR
COMPUTE ALLCARS/D12 = ECAR + FCAR + ICAR + JCAR  + GCAR;
BY COUNTRY
ON TABLE HOLD AS CX2
END
-RUN

TABLE FILE CX2
HEADING
" SUM THEM THE CORRECT WAY "
SUM
ALLCARS AS 'ATOT'
COMPUTE PCTOT/D7.2% = ALLCARS / TOT.ALLCARS * 100;
ECAR
FCAR
ICAR
JCAR
GCAR
BY COUNTRY
ON TABLE HOLD AS CX2
END
-RUN

?FF CX2
-RUN
-*EXIT

TABLE FILE CX2
HEADING
" FINAL REPORT "
" "
PRINT
ECAR AS 'England'
FCAR AS 'France'
ICAR AS 'Italy'
JCAR AS 'Japan'
GCAR AS 'W Germany'
ATOT AS 'Total'
PCTOT AS '% of,TOTAL'
BY COUNTRY
ON TABLE RECOMPUTE

ON TABLE PCHOLD FORMAT EXL2K

ON TABLE SET PAGE NOPAGE
ON TABLE SET STYLE *
TYPE=REPORT,
FONT=ARIAL,
SIZE=9,
STYLE=NORMAL,
$
TYPE=HEADING,
HEADALIGN=BODY,
JUSTIFY=CENTER,
$
TYPE=HEADING,
LINE=1,
STYLE=BOLD,
COLSPAN=8,
$
TYPE=HEADING,
LINE=2,
COLSPAN=8,
$
TYPE=TITLE,
STYLE=BOLD,
$
TYPE=GRANDTOTAL,
STYLE=BOLD,
COLSPAN=8,
$
TYPE=GRANDTOTAL,
COLUMN=PCTOT,
COLOR='WHITE',
$


Thanks JG! Cool


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     exl2k - Prevent TOTAL of '% of TOTAL' from displaying in RECOMPUTE [SOLVED]

Copyright © 1996-2020 Information Builders