Focal Point Banner
Community Center Education Summit Technical Support User Groups
Let's Get Social!

Facebook Twitter LinkedIn YouTube
Go
New
Search
Notify
Tools
Reply
  
Dynamic Column sort
 Login/Join
 
Platinum Member
posted
Can anyone help me with column-sorting on the fly where the user can click on a hyperlink on any column on the report(html) to re-generate the same report based on the field they click??

Appreciate ur help

Thanks
PK
 
Posts: 216 | Location: Houston,TX | Registered: June 11, 2004Reply With QuoteReport This Post
Platinum Member
posted Hide Post
If you have subscribed to the OLAP option of WebFocus , then the absolute easiest way to sort any column of a displayed report is to just add the line ...
-OLAP ON
as the first non-comment line of the Focexec
 
Posts: 226 | Registered: June 08, 2003Reply With QuoteReport This Post
<Grzegorz>
posted
You can also use the "self-drilldown" technique:

-* sort.fex file:
-* Sort order: HIGHEST or LOWEST:
-DEFAULTS &SORTORD='FIRST';
-* Previous sort column:
-DEFAULTS &PREVSRT='FIRST';
-* The SORTCOL column is used for sorting:
-DEFAULTS &SORTCOL='COUNTRY';
-* Set up the sort order appropriately:
-SET &SORTORD= IF &PREVSRT NE &SORTCOL THEN 'LOWEST' ELSE
- IF &SORTORD EQ 'LOWEST' THEN 'HIGHEST' ELSE 'LOWEST';
-*
TABLE FILE CAR
SUM SALES
BY &SORTORD TOTAL &SORTCOL NOPRINT
BY COUNTRY
ON TABLE SET STYLE *
TYPE=TITLE, COLUMN=P1, FOCEXEC=SORTS ( \
PREVSRT='&SORTCOL' \
SORTCOL='COUNTRY' \
SORTORD='&SORTORD'), $

TYPE=TITLE, COLUMN=P2, FOCEXEC=SORTS ( \
PREVSRT='&SORTCOL' \
SORTCOL='SALES' \
SORTORD='&SORTORD'), $

ENDSTYLE
END

It is not so effortless like OLAP (especially in the real-life cases), but is more flexible and completely customizable.
 
Reply With QuoteReport This Post
Expert
posted Hide Post
I agree with Gregorz.
I use this technique, and along with it, i put a mouseover on the column title

SUM DOLLARS AS
'[span title="click to sort by">Dollars[/span>'

and then the user knows what to do.
 
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003Reply With QuoteReport This Post
Platinum Member
posted Hide Post
Thank you guys for all ur suggestions! I got it working now.

Appreciate it

PK
 
Posts: 216 | Location: Houston,TX | Registered: June 11, 2004Reply With QuoteReport This Post
  Powered by Social Strata  
 


Copyright © 1996-2018 Information Builders, leaders in enterprise business intelligence.