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     [CLOSED] SUBTOTAL on multiple sort fields

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED] SUBTOTAL on multiple sort fields
 Login/Join
 
Platinum Member
posted
Hello

Below is the sample code with CAR file. This gives subtotal by Country and then grand total of the same.
Is it possible to have 5 records before grand total which provide subtotal by 5 different BODYTYPE values? I don't want subtotal by BODYTYPE for each country. I was not able to get it however I tried.

TABLE FILE CAR
SUM
	CAR.BODY.DEALER_COST
	CAR.BODY.RETAIL_COST
	CAR.BODY.SALES
BY CAR.ORIGIN.COUNTRY
BY CAR.BODY.BODYTYPE
ON CAR.ORIGIN.COUNTRY SUBTOTAL
ON TABLE SUBTOTAL
ON TABLE PCHOLD FORMAT HTML
END  


Please suggest.
Thank you.

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


WebFOCUS 8206
All formats
 
Posts: 95 | Registered: September 13, 2017Report This Post
Platinum Member
posted Hide Post
Only way I think of is to split into 3 reports


WebFOCUS 8206
All formats
 
Posts: 95 | Registered: September 13, 2017Report This Post
Virtuoso
posted Hide Post
Something such as this ?

DEFINE FILE CAR
COUNTRY /A10 = '';
END
TABLE FILE CAR
SUM	DEALER_COST
	RETAIL_COST
	SALES
BY TOTAL COMPUTE ROWID /I2 = 1;
BY COUNTRY
BY BODYTYPE
ON TABLE HOLD AS BODYTOT
END
-RUN

DEFINE FILE CAR
ROWID /I2 = 2;
END
TABLE FILE CAR
SUM	DEALER_COST
	RETAIL_COST
	SALES
BY ROWID NOPRINT
BY COUNTRY
ON COUNTRY SUBTOTAL
WHEN ROWID EQ 2
BY BODYTYPE
ON TABLE PCHOLD FORMAT HTML
MORE
FILE BODYTOT
END
-RUN


WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007
 
Posts: 2409 | Location: Montreal Area, Qc, CA | Registered: September 25, 2013Report This Post
Platinum Member
posted Hide Post
Martin, is it possible to exclude 1 country SALES from Grand Total?
TABLE FILE CAR
SUM
	CAR.BODY.SALES
BY CAR.ORIGIN.COUNTRY
ON TABLE SUBTOTAL
ON TABLE PCHOLD FORMAT HTML
END   

quote:
Originally posted by MartinY:
Something such as this ?


WebFOCUS 8206
All formats
 
Posts: 95 | Registered: September 13, 2017Report This Post
Expert
posted Hide Post
quote:
is it possible to exclude 1 country SALES from Grand Total?

Have you tried to achieve this yourself using Martin's example or are you just wanting someone to do it for you?

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
Virtuoso
posted Hide Post
MacGuyver does it for you!
  
-SET &ECHO=ALL;
-* File wf_dev02.fex
-* 
-* McGuyver technique: using a flat file
-* Create the MacGuyver Master and data file on the fly
-*
SET MSG=ON
EX -LINES 7 EDAPUT MASTER,FSEQ,C,MEM
FILENAME=FSEQ,SUFFIX=FIX
SEGNAME=CHAR1,SEGTYPE=S0
FIELDNAME=BLANK,BLANK,A1,A1,$
SEGNAME=CHARS,SEGTYPE=S0,PARENT=CHAR1,OCCURS=VARIABLE
FIELDNAME=CHAR,CHARS,A1,A1,$
FIELDNAME=COUNTER,ORDER,I2,I4,$
-RUN
FILEDEF FSEQ DISK FSEQ.FTM
-RUN
-WRITE FSEQ  FILEFORMACGUYVERFILEFORMACGUYVERFILEFORMACGUYVER
-RUN
-*
-* Example
JOIN BLANK WITH BODYTYPE IN CAR TO BLANK IN FSEQ AS B_
DEFINE FILE CAR
BLANK/A1 WITH BODYTYPE=' ';
XCOUNTRY/A10=IF COUNTER EQ 2 THEN 'TOTAL' ELSE COUNTRY;
END
TABLE FILE CAR
SUM SALES RCOST DCOST
BY COUNTER NOPRINT PAGE-BREAK REPAGE
BY XCOUNTRY AS COUNTRY
BY BODYTYPE
ON XCOUNTRY SUBFOOT
" "
WHEN COUNTER EQ 1
ON XCOUNTRY SUBTOTAL MULTILINES AS '** '
WHERE COUNTER LE 2
ON TABLE NOTOTAL
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
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED] SUBTOTAL on multiple sort fields

Copyright © 1996-2020 Information Builders