Focal Point
Sort on Expand by Row sum fields

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/9947049526

November 06, 2012, 06:58 PM
JOE
Sort on Expand by Row sum fields
I have an issue that I can not figure out. I have a simple Expand by Row Report that has a sum field for the last column. I'd like to have that column sorted highest to lowest each time a by field is clicked. Any ideas on how to do that? Order by does not work..It screws up the expand by by fields.

Thanks for any assistance possible.

SET EXPANDBYROW = ON
TABLE FILE BSH
SUM
     BSH.SEG01.COUNT AS 'Totals'
BY  LOWEST BSH.SEG01.TERRITORY_NAME
BY  LOWEST BSH.SEG01.MARKET
BY  LOWEST BSH.SEG01.REGION_NAME
BY  LOWEST BSH.SEG01.CALLERBRANCH
 
ON BSH.SEG01.TERRITORY_NAME RECOMPUTE AS '*TOTAL'
 
ON BSH.SEG01.MARKET RECOMPUTE AS '*TOTAL BSH.SEG01.MARKET'
 
ON BSH.SEG01.REGION_NAME RECOMPUTE AS '*TOTAL BSH.SEG01.REGION_NAME'
ON TABLE SUBHEAD
"Territory/Market/Region/Branch Totals"
WHERE TERRITORY_NAME EQ '&TN';
ON TABLE SET PAGE-NUM NOLEAD
ON TABLE SUMMARIZE BSH.SEG01.COUNT AS 'TOTAL'
ON TABLE PCHOLD FORMAT HTML
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
     INCLUDE = endeflt,
$
TYPE=DATA,
     COLUMN=N4,
     FOCEXEC=callerbranchcnt,
$
TYPE=TABHEADING,
     LINE=1,
     JUSTIFY=LEFT,
$
TYPE=TABHEADING,
     LINE=1,
     OBJECT=TEXT,
     ITEM=1,
     SIZE=11,
$
TYPE=SUBTOTAL,
     BY=1,
     COLOR='WHITE',
     BACKCOLOR='TEAL',
$
TYPE=SUBTOTAL,
     BY=2,
     COLOR='WHITE',
     BACKCOLOR=RGB(102 102 153),
$
TYPE=SUBTOTAL,
     BY=3,
     COLOR='WHITE',
     BACKCOLOR='OLIVE',
$
TYPE=SUBTOTAL,
     BY=6,
     COLOR='WHITE',
     BACKCOLOR='BLUE',
$
ENDSTYLE
END
  



WebFocus 7.7.02 WinXP
November 07, 2012, 01:47 AM
Ram Prasad E
This is possible either by reloading the page for each click so webFOCUS will do sorting or by using javascript to do sorting.

Thanks,
Ram


WebFOCUS 8.1.05
Windows
http://ibiwebfocus.wordpress.com
https://www.facebook.com/groups/ibi.webfocus/
November 07, 2012, 12:32 PM
Doug
What's the output format? If it's not AHTML then switch to AHTML and see if that works for you.




   In FOCUS Since 1983 ~ from FOCUS to WebFOCUS.
   Current: WebFOCUS Administrator at FIS Worldpay | 8204, 8206
November 08, 2012, 11:40 AM
JOE
Thanks..I tried AHTML..however it screws up the by fields..not sure I want these particular users to use that format.


WebFocus 7.7.02 WinXP