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] Order rows by lowest subtotal and remove subtotal tag

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Order rows by lowest subtotal and remove subtotal tag
 Login/Join
 
Gold member
posted
I need to order region rows by lowest subtotal and also i am getting region name for each subtotal row which also needs to be removed.could any one help me please?

TABLE FILE GGSALES
SUM UNITS
BY REGION
BY PRODUCT
ON REGION SUB-TOTAL AS 'Sub Total'
ON TABLE PCHOLD FORMAT HTML
ON TABLE SET STYLE *
$
TYPE=SUBTOTAL,
OBJECT=TAG,
BY=1,
SIZE=8,
$
END

This message has been edited. Last edited by: FP Mod Chuck,


Webfocus AppStudio 8201
Windows
 
Posts: 53 | Registered: May 09, 2016Report This Post
Master
posted Hide Post
Use a HOLD file with the subtotals in it and use it as a BY-field in the next TABLE statement.

Either hidden or not

TABLE FILE GGSALES
	SUM UNITS WITHIN REGION AS 'SUBTOT'
		UNITS
	BY REGION
	BY PRODUCT
ON TABLE SET ASNAMES ON
ON TABLE HOLD AS Q
END

TABLE FILE Q
SUM UNITS
BY SUBTOT 
BY REGION
BY PRODUCT
ON TABLE PCHOLD FORMAT HTML
ON TABLE SET STYLE *
$
TYPE=SUBTOTAL,
OBJECT=TAG,
 BY=1,
 SIZE=8,
$
END


_____________________
WF: 8.0.0.9 > going 8.2.0.5
 
Posts: 668 | Location: Veghel, The Netherlands | Registered: February 16, 2010Report This Post
Gold member
posted Hide Post
Thank you very much Dave.i need the sub total as one of the row below the units(by region)


Webfocus AppStudio 8201
Windows
 
Posts: 53 | Registered: May 09, 2016Report This Post
Virtuoso
posted Hide Post
TABLE FILE GGSALES
	SUM UNITS WITHIN REGION AS 'SUBTOT'
		UNITS
	BY REGION
	BY PRODUCT
ON TABLE SET ASNAMES ON
ON TABLE HOLD AS Q
END

TABLE FILE Q
SUM UNITS
BY SUBTOT NOPRINT
BY REGION
BY PRODUCT
ON REGION SUBTOTAL AS 'Sub Total'
ON TABLE PCHOLD FORMAT HTML
ON TABLE NOTOTAL
ON TABLE SET STYLE *
$
TYPE=SUBTOTAL,
OBJECT=TAG,
 BY=1,
 SIZE=8,
$
END


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
Gold member
posted Hide Post
Would something like this work for you?

It does a multi verb to store the subtotal and can sort by that in the next step

 TABLE FILE GGSALES
SUM UNITS AS 'REGION_ST'
BY REGION

SUM UNITS
BY REGION
BY PRODUCT
ON TABLE HOLD AS HOLD_GGSA
END

TABLE FILE HOLD_GGSA
SUM UNITS
BY LOWEST REGION_ST NOPRINT
BY REGION
BY PRODUCT
ON REGION_ST SUBFOOT
"Sub Total <REGION_ST"
ON TABLE PCHOLD FORMAT HTML
ON TABLE SET STYLE *
TYPE=SUBFOOT,
SIZE=8,
$
ENDSTYLE
END 


WF: 8201, OS: Windows, Output: HTML, PDF, Excel
 
Posts: 78 | Registered: November 08, 2010Report This Post
Gold member
posted Hide Post
Thank you very much martin it is working fine .but in the subtotal tag i am getting 'Sub Total Midwest' needs to be replaced with 'Sub Total' only.is it possible?


Webfocus AppStudio 8201
Windows
 
Posts: 53 | Registered: May 09, 2016Report This Post
Gold member
posted Hide Post
Thank you very much Crymsyn.


Webfocus AppStudio 8201
Windows
 
Posts: 53 | Registered: May 09, 2016Report This Post
Virtuoso
posted Hide Post
Change this line of code from
"Sub Total to
"Sub Total"


Thank you for using Focal Point!

Chuck Wolff - Focal Point Moderator
WebFOCUS 7x and 8x, Windows, Linux All output Formats
 
Posts: 2127 | Location: Customer Support | Registered: April 12, 2005Report This Post
Virtuoso
posted Hide Post
Oops I meant change this line
"Sub Total To
"Sub Total"


Thank you for using Focal Point!

Chuck Wolff - Focal Point Moderator
WebFOCUS 7x and 8x, Windows, Linux All output Formats
 
Posts: 2127 | Location: Customer Support | Registered: April 12, 2005Report This Post
Virtuoso
posted Hide Post
Wow... It keeps deleting part of the original line

"Sub Total to
"Sub Total"


Thank you for using Focal Point!

Chuck Wolff - Focal Point Moderator
WebFOCUS 7x and 8x, Windows, Linux All output Formats
 
Posts: 2127 | Location: Customer Support | Registered: April 12, 2005Report This Post
Gold member
posted Hide Post
[QUOTE]Originally posted by Chuck Wolff:
Wow... It keeps deleting part of the original line

thank you Chuck but it keeps "Sub total" i need sub total without double quotes


Webfocus AppStudio 8201
Windows
 
Posts: 53 | Registered: May 09, 2016Report This Post
Virtuoso
posted Hide Post
quote:
but it keeps "Sub total" i need sub total without double quotes

What do you mean by that ?
The labelling : « Sub Total » is not displayed with double quotes.

SET ASNAMES = ON
TABLE FILE GGSALES
SUM UNITS AS 'REGION_ST'
BY REGION

SUM UNITS
BY REGION
BY PRODUCT
ON TABLE HOLD AS HOLD_GGSA
END

TABLE FILE HOLD_GGSA
SUM UNITS
BY LOWEST REGION_ST NOPRINT
BY REGION
BY PRODUCT
ON REGION_ST SUBFOOT
"Sub Total <REGION_ST"
ON TABLE PCHOLD FORMAT HTML
ON TABLE SET STYLE *
TYPE=SUBFOOT,
SIZE=8,
$
ENDSTYLE
END


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
Gold member
posted Hide Post
Thank you MartinY.i got final solution with your help as i expected.


Webfocus AppStudio 8201
Windows
 
Posts: 53 | Registered: May 09, 2016Report 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] Order rows by lowest subtotal and remove subtotal tag

Copyright © 1996-2020 Information Builders