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     WHERE clause using subtotal value

Read-Only Read-Only Topic
Go
Search
Notify
Tools
WHERE clause using subtotal value
 Login/Join
 
Guru
posted
I have a focexec that is writing detail lines with a subtotal. Is there a way to use the subtotal value in a WHERE clause so that if the subtotal of all detail lines = n then the details don't print?


WF 8.1.05 Windows
 
Posts: 333 | Location: Orlando, FL | Registered: October 17, 2006Report This Post
Platinum Member
posted Hide Post
use if/where total amtfield eq/ne/gt/lt value

Good luck


FOCUS 7.6 MVS PDF,HTML,EXCEL
 
Posts: 115 | Location: Chicago, IL | Registered: May 28, 2004Report This Post
Virtuoso
posted Hide Post
Anatess,

Use a multi-set request and issue a WHERE TOTAL on the higher order SUM. Something like this
DEFINE FILE CAR
TSALES/I6=SALES;
END
TABLE FILE CAR
SUM TSALES NOPRINT BY COUNTRY
PRINT SALES BY COUNTRY SUBTOTAL
WHERE TOTAL TSALES GT 30000
END


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
Anatess

Depending on the complexity of your request, both ET and Danny provide a solution:

For example:
TABLE FILE CAR
PRINT SALES
BY COUNTRY  SUB-TOTAL
WHERE TOTAL SALES GT 12000
END
gives
COUNTRY          SALES 

ITALY            12400 
                 13000 
*TOTAL ITALY     25400 
JAPAN            43000 
                 35030 
*TOTAL JAPAN     78030 
W GERMANY        14000 
                 18940 
                 14000 
                 15600 
*TOTAL W GERMANY 62540 
TOTAL           165970 
and
TABLE FILE CAR
SUM SALES
BY COUNTRY  SUB-TOTAL
WHERE TOTAL SALES GT 12000
END
gives
COUNTRY          SALES 

ITALY            30200 
*TOTAL ITALY     30200 
JAPAN            78030 
*TOTAL JAPAN     78030 
W GERMANY        88190 
*TOTAL W GERMANY 88190 
TOTAL           196420 
and
DEFINE FILE CAR
TSALES/I6=SALES;
END
TABLE FILE CAR
SUM TSALES NOPRINT BY COUNTRY 
PRINT SALES
BY COUNTRY  SUB-TOTAL
WHERE TOTAL TSALES GT 12000
END
gives
COUNTRY          SALES 

ITALY             4800 
                 12400 
                 13000 
                     0 
*TOTAL ITALY     30200 
JAPAN            43000 
                 35030 
*TOTAL JAPAN     78030 
W GERMANY         7800 
                  8950 
                  8900 
                 14000 
                 18940 
                 14000 
                 15600 
*TOTAL W GERMANY 88190 
TOTAL           196420 

Notice the difference between example 1 and example 3 in particular.


Alan.
WF 7.705/8.007
 
Posts: 1451 | Location: Portugal | Registered: February 07, 2007Report This Post
Guru
posted Hide Post
Oh man! I completely didn't realize that my response to this didn't get posted. Just wanted to let you know that I was able to make it work. I basically used Danny's and Alan's 3rd example to do the job. Thanks guys and sorry for the very late reply.


WF 8.1.05 Windows
 
Posts: 333 | Location: Orlando, FL | Registered: October 17, 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     WHERE clause using subtotal value

Copyright © 1996-2020 Information Builders