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]Sorting on the Basis of Count in the Across Field

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED]Sorting on the Basis of Count in the Across Field
 Login/Join
 
Gold member
posted
I have this kind of crosstab report:
TABLE FILE SQLOUT
SUM
CNT.DTC_KEY AS 'DTC_COUNT'
BY MODULE_ID
BY &DTC_BYTE AS 'DTC'
ACROSS VEHICLE
WHERE MODULE_ID NE MISSING
ON TABLE PCHOLD FORMAT &WFFMT




The user has a strange requirement that when only one vehicle is Selected for the Across Field, the Report should be sorted on the basis of the Count in the across fields.

Is there any way i can sort the report using the descending count of the Across Field?

This message has been edited. Last edited by: <Emily McAllister>,


Webfocus 8105,8808,7703,7611, EXL2K,HTML,PDF,COMT,AHTML Info Assist+ , Reportcaster
 
Posts: 64 | Location: Toronto, Ontario | Registered: May 15, 2014Report This Post
Virtuoso
posted Hide Post
May not be the only way, but this is one
TABLE FILE CAR
SUM SEATS
BY COUNTRY
BY BODYTYPE
-*WHERE BODYTYPE EQ 'SEDAN';
ON TABLE HOLD AS TMP FORMAT FOCUS
END
-RUN

TABLE FILE TMP
SUM SEATS
BY HIGHEST SEATS NOPRINT
BY COUNTRY
ACROSS BODYTYPE
END
-RUN


With the WHERE in effect, you'll only have one ACROSS value.


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
Thanks!! Worked Well, I have Used Branching Statements. Ran the Piece of Code i pasted when Multiple Vehicles are selected and Ran Yours When only One Vehicle is Selected.
Worked like a Charm.


Webfocus 8105,8808,7703,7611, EXL2K,HTML,PDF,COMT,AHTML Info Assist+ , Reportcaster
 
Posts: 64 | Location: Toronto, Ontario | Registered: May 15, 2014Report This Post
Virtuoso
posted Hide Post
My pleasure.

Edit your first post and add [SOLVED] in the subject.


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
  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]Sorting on the Basis of Count in the Across Field

Copyright © 1996-2020 Information Builders