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     Subtotal on Over Calculations

Read-Only Read-Only Topic
Go
Search
Notify
Tools
Subtotal on Over Calculations
 Login/Join
 
Gold member
posted
DEFINE FILE CAR
CCOUNT/D6 = 1;
END

TABLE FILE CAR
SUM
CCOUNT
OVER PCT.DEALER_COST WITHIN MODEL
BY MODEL
ACROSS COUNTRY
ON TABLE SUBTOTAL CCOUNT
ON TABLE SET NODATA '--'
END


how do i not display "dealer cost" in my subtotal at all?



Thanks!


~~~||~~~||~~~||~~~||~~~||~~~||~~~||~~~||~~~||~~~
PROD: WebFOCUS 7.1.3 on Win 2K/IIS 6/ISAPI Mode/Self-Serve Apps Only (No App Server)
TEST: WebFOCUS 7.1.3 on Win 2K/IIS 6/Weblogic 8.1/Servlet Mode
 
Posts: 74 | Location: Gaithersburg, MD | Registered: August 08, 2006Report This Post
Expert
posted Hide Post
Bearing in mind that the subtotal line(s) is/are created as a result of the report contents, I don't think that you can using a straight forward report.

If you were to use FML / FRL - call it what you will - then you have control over what is being printed but that would then require you to prepare the values for the report.

One thing you will not be able to do is to use the syntax to control the ROWS (e.g. BY MODEL ROWS '100 LS 2 DOOR AUTO' OVER '2000 4 DOOR BERLINA' OVER '....... etc.) as the WITHIN syntax seems to be mutually exclusive to using ROWS - you get a FOC168 error.

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
 
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004Report This Post
Expert
posted Hide Post
Had to use some grey cells for this, but you can do it using FRL (etc. etc.) and a couple of passes of the data.

This solution makes use of the "WHEN EXISTS" syntax of FRL and when building up the data I specifically do not create a value for the subtotal of the percentage field so that the FRL syntax omits the final line as required.

First pass summates the CCOUNT values by MODEL and COUNTRY and also adds a couple of COMPUTED fields to help with positioning in the final report.
The second pass provides the same but substitutes a single value so that the summation produces a single row of output for the subtotal.
The third and final pass summate the PCT.DEALER_COST WITHIN MODEL.

As the hold file used is set-up in append mode all the data is combined when held soo that it can easily be used in a single FRL report.
APP FI TEMPHOLD DISK TEMPHOLD.FTM (APPEND
DEFINE FILE CAR
CCOUNT/D6 WITH MODEL = 1;
MODEL_ST/A24 = 'Subtotal';
END

TABLE FILE CAR
SUM CCOUNT AS 'Count'
    COMPUTE ROW_NUM/I1 = 1;
    SORT_ORD/I1 = 1;
BY COUNTRY
BY MODEL
ON TABLE HOLD AS TEMPHOLD
END

TABLE FILE CAR
SUM CCOUNT
    COMPUTE ROW_NUM/I1 = 1;
    SORT_ORD/I1 = 2;
BY COUNTRY
BY MODEL_ST
ON TABLE HOLD AS TEMPHOLD
END

TABLE FILE CAR
SUM PCT.DEALER_COST WITHIN MODEL
    COMPUTE ROW_NUM/I1 = 2;
    SORT_ORD/I1 = 1;
BY COUNTRY
BY MODEL
ON TABLE HOLD AS TEMPHOLD
END

TABLE FILE TEMPHOLD
SUM DEALER_COST
 BY SORT_ORD NOPRINT
 BY MODEL
 ACROSS COUNTRY
FOR ROW_NUM
1 WHEN EXISTS AS '' OVER
2 WHEN EXISTS AS ''
END

Messy, but I hope this helps

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
 
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004Report This Post
Gold member
posted Hide Post
Thanks!


~~~||~~~||~~~||~~~||~~~||~~~||~~~||~~~||~~~||~~~
PROD: WebFOCUS 7.1.3 on Win 2K/IIS 6/ISAPI Mode/Self-Serve Apps Only (No App Server)
TEST: WebFOCUS 7.1.3 on Win 2K/IIS 6/Weblogic 8.1/Servlet Mode
 
Posts: 74 | Location: Gaithersburg, MD | Registered: August 08, 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     Subtotal on Over Calculations

Copyright © 1996-2020 Information Builders