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.
I have to display couple of values in TABFOOT which is based on the value of subfoot.
Ex:
TABLE FILE TABLENAME PRINT COLUMN1 COLUMN2 BY COLUMN3 ON COLUMN3 SUBFOOT "TOTAL COLUMN3 ON TABLE SUBFOOT "TOTAL VALUE 01 IS TOTALRECORD/TOT.COLUMN1 * 100 " "TOTAL VALUE 02 IS TOTALRECORD/TOT.COLUMN2 * 100 " END
HOW CAN I ACHIEVE THIS? I CAN USE RECAP BUT NOT SOLVING MY PURPOSE.
THANKSThis message has been edited. Last edited by: Kerry,
WFConsultant
WF 8105M on Win7/Tomcat
Posts: 780 | Location: Florida | Registered: January 09, 2005
Without knowing exactly what it is you're looking for, the following code might be helpful:
TABLE FILE car
SUM SEATS NOPRINT
SUM SEATS NOPRINT
BY SEATS
PRINT DCOST
RCOST
BY SEATS
ON SEATS RECAP FLD1/I5 = C2;
ON SEATS SUBFOOT
"Total amount of seats is <FLD1"
ON TABLE RECAP
FLD2/D12.8 = (C1 / C3) * 100;
FLD3/D12.8 = (C1 / C4) * 100;
ON TABLE SUBFOOT
"TOTAL VALUE 01 IS <FLD2 "
"TOTAL VALUE 02 IS <FLD3 "
END
GamP
- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
Posts: 1961 | Location: Netherlands | Registered: September 25, 2007
You'll need to use (DEFINE) data buckets for each total value you want in your SUBFOOT.
To make it dynamically, you'll have to pre-calculate those values and use Dialogue Manager to build the totals for you.
The code below illustrate the idea but as I don't understand the rules you want the way I did the counters may need some adjustments depending on which numbers you expect to see.
TABLE FILE CAR
PRINT DST.SEATS AS DST_SEATS
ON TABLE HOLD AS HSEATS FORMAT ALPHA
ON TABLE SET ASNAMES ON
ON TABLE SET HOLDLIST PRINTONLY
END
-RUN
-SET &REC_CNT=&LINES;
-TYPE RECORDS: &REC_CNT
-SET &ECHO=ON;
DEFINE FILE CAR
CTR/I4 = 1;
-REPEAT :DODEF FOR &I FROM 1 TO &REC_CNT
-READ HSEATS NOCLOSE &DST_SEATS.A3.
SEATS&I/I3 = IF SEATS EQ &DST_SEATS THEN 1 ELSE 0;
-:DODEF
-CLOSE HSEATS
END
TABLE FILE CAR
PRINT
CAR
MODEL
SEATS
CTR NOPRINT
-REPEAT :DOPRT FOR &I FROM 1 TO &REC_CNT
SEATS&I NOPRINT
-:DOPRT
BY COUNTRY
ON COUNTRY SUBFOOT
"Subtotal seats: <ST.CTR"
ON TABLE RECAP
-REPEAT :DOREC FOR &I FROM 1 TO &REC_CNT
-READ HSEATS NOCLOSE &DST_SEATS.A3.
T_SEATS&I/D7.1% = SEATS&I / CTR * 100;
-:DOREC
-CLOSE HSEATS
ON TABLE SUBFOOT
"Total seats: <TOT.CTR"
-REPEAT :DOSF FOR &I FROM 1 TO &REC_CNT
-READ HSEATS NOCLOSE &DST_SEATS.A3.
"Seats &DST_SEATS|: <ST.SEATS&I (<T_SEATS&I )"
-:DOSF
END
Hope that helps.This message has been edited. Last edited by: njsden,
TABLE FILE car
SUM SEATS NOPRINT
COMPUTE QUO/A1 = '"'; NOPRINT
ON TABLE SUBFOOT
"<QUO>Total Seats - <SEATS<QUO>"
ON TABLE SET PAGE NOLEAD
ON TABLE HOLD AS P1 FORMAT WP
END
TABLE FILE CAR
SUM SEATS NOPRINT
SUM SEATS NOPRINT
COMPUTE XX/D5.2 = (C2 / C1) * 100; NOPRINT
COMPUTE QUO/A1 = '"'; NOPRINT
BY SEATS NOPRINT
ON SEATS SUBFOOT
"<QUO>Seat <FST.SEATS - <C2 and percentage - <XX<QUO>"
ON TABLE SET PAGE NOLEAD
ON TABLE HOLD AS P2 FORMAT WP
END
-RUN
TABLE FILE CAR
PRINT DCOST
RCOST
BY SEATS
ON TABLE SUBFOOT
-INCLUDE p1.wp
-INCLUDE p2.wp
END
-RUN
GamP
- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
Posts: 1961 | Location: Netherlands | Registered: September 25, 2007