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] Sort the second column.

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Sort the second column.
 Login/Join
 
Platinum Member
posted
Whenever we sort fields, those fields will be put at the first columns. How can I sort second column and keep the first column as original?

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


WebFOCUS 7.7.03
Windows, All Outputs
 
Posts: 125 | Registered: June 17, 2013Report This Post
Gold member
posted Hide Post
Multiverb report can be a workaround.Please review the sample code below, this may help:
TABLE FILE CAR
SUM
MODEL
BY COUNTRY
PRINT
CAR
ON TABLE SET STYLE *
TYPE=REPORT, COLUMN=CAR, SEQUENCE=1, $
TYPE=REPORT, COLUMN=MODEL, SEQUENCE=2, $
TYPE=REPORT, COLUMN=COUNTRY, SEQUENCE=3, $
ENDSTYLE

END


WF 8.1.04,Infoassist,Oracle, Excel, PDF,HTML.
 
Posts: 82 | Registered: January 06, 2014Report This Post
Virtuoso
posted Hide Post
JVB,
quote:

SUM
MODEL
BY COUNTRY
PRINT
CAR

This won't work because you must repeat the sort fields in a multi-set request.

hainguyen,
Here is a simple solution:
  
TABLE FILE CAR
PRINT
COUNTRY
CAR
SALES
BY CAR NOPRINT
END

Here is a more complex one:
  
TABLE FILE CAR
PRINT
COUNTRY NOPRINT
COMPUTE XCOUNTRY/A10=IF COUNTRY EQ LAST COUNTRY THEN ' ' ELSE COUNTRY; AS COUNTRY
CAR NOPRINT
COMPUTE XCAR/A16=IF CAR EQ LAST CAR THEN ' ' ELSE CAR; AS CAR
SALES
BY CAR NOPRINT
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
Apparently your first field is in some sort order that you like, but didn't specify explicitly.
The solution is to explicitly specify the sort order of your first field and then apply the sorting on your second field.

Sometimes that requires computing a sort field for the first field and use that as the first BY field with a NOPRINT to hide it.

For example:
TABLE FILE CAR
PRINT
	MODEL
	COMPUTE SORT/I3 = LAST SORT + 1; NOPRINT
BY TOTAL SORT NOPRINT
BY COUNTRY
BY CAR
END


WebFOCUS 8.1.03, Windows 7-64/2008-64, IBM DB2/400, Oracle 11g & RDB, MS SQL-Server 2005, SAP, PostgreSQL 11, Output: HTML, PDF, Excel 2010
: Member of User Group Benelux :
 
Posts: 1669 | Location: Enschede, Netherlands | Registered: August 12, 2010Report This Post
Platinum Member
posted Hide Post
Thanks a lot for all suggestions. I tried the simple solution of Danny and it works great. Simple but effective.


WebFOCUS 7.7.03
Windows, All Outputs
 
Posts: 125 | Registered: June 17, 2013Report This Post
Platinum Member
posted Hide Post
In Dannys example,

 

TABLE FILE CAR
PRINT
COUNTRY NOPRINT
COMPUTE XCOUNTRY/A10=IF COUNTRY EQ LAST COUNTRY THEN ' ' ELSE COUNTRY; AS COUNTRY
CAR NOPRINT
COMPUTE XCAR/A16=IF CAR EQ LAST CAR THEN ' ' ELSE CAR; AS CAR
SALES
BY CAR NOPRINT
END

 


How do we turn off the borders for the COLUMNS COUNTRY AND CAR AND display them like when we use the BYDISPLAY off.?


App Studio Version 8202
windows Platform
SQL Server 2008/2012
 
Posts: 183 | Location: TX | Registered: January 22, 2007Report 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] Sort the second column.

Copyright © 1996-2020 Information Builders