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     [SOLVED] Subfoot display

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Subfoot display
 Login/Join
 
Master
posted
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.

THANKS

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


WFConsultant

WF 8105M on Win7/Tomcat
 
Posts: 780 | Location: Florida | Registered: January 09, 2005Report This Post
Virtuoso
posted Hide Post
WHAT EXACTLY IS NOT SOLVING YOUR PURPOSE WHEN USING RECAP?

Could you post an example with the CAR table with what you already tried to do and then detail the results you actually expect?



Prod/Dev: WF Server 8008/Win 2008 - WF Client 8008/Win 2008 - Dev. Studio: 8008/Windows 7 - DBMS: Oracle 11g Rel 2
Test: Dev. Studio 8008 /Windows 7 (Local) Output:HTML, EXL2K.
 
Posts: 1533 | Registered: August 12, 2005Report This Post
Virtuoso
posted Hide Post
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, 2007Report This Post
Master
posted Hide Post
Thanks a lot Gamp. That's almost close. I want to calculate the seats at the end of the table.

Ex:
on table subfoot
Total Seats - 50
Seat 1 - 10 and percentage - 10/50 * 100
Seat 2 - 20 and percentage - 20/50 * 100
Seat 3 - 30 and percentage - 15/50 * 100

And the other thing is, If there is a way to build it dynamically then it will be good.

Once again Thanks.


WFConsultant

WF 8105M on Win7/Tomcat
 
Posts: 780 | Location: Florida | Registered: January 09, 2005Report This Post
Virtuoso
posted Hide Post
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,



Prod/Dev: WF Server 8008/Win 2008 - WF Client 8008/Win 2008 - Dev. Studio: 8008/Windows 7 - DBMS: Oracle 11g Rel 2
Test: Dev. Studio 8008 /Windows 7 (Local) Output:HTML, EXL2K.
 
Posts: 1533 | Registered: August 12, 2005Report This Post
Virtuoso
posted Hide Post
There's also another way to make it dynamic:
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, 2007Report This Post
Master
posted Hide Post
I end up doing it as a compound report.

Thanks for all the inputs.


WFConsultant

WF 8105M on Win7/Tomcat
 
Posts: 780 | Location: Florida | Registered: January 09, 2005Report 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     [SOLVED] Subfoot display

Copyright © 1996-2020 Information Builders