I have built a report that consists of 3 measures in 3 ACROSS fields that looks like this:
TOTAL NEW USED
CAR RETAIL DEALER UNITS RETAIL DEALER UNITS RETAIL DEALER UNITS
MAZDA 661 367 368 713 368 368 587 366 368
FORD 653 660 961 771 961 368 557 417 961
TOYOTA 633 329 339 670 339 961 579 314 339
NISSAN 540 383 407 598 407 339 462 351 407
HONDA 499 309 282 457 282 407 551 426 282
I can successfully sort on any of the first 3 (TOTAL) columns uning the code below and perform a drill down to resort on any of those first 3 columns. I have been unable to re-sort based on any of the columns in the NEW and USED ACROSS categories. Trying to sort on one of these applies the selected column but only for the first ACROSS category (TOTAL). As you can see below I have tried incorporating the ACROSS column value as part of my DEFINE but it does not do the trick. Can anyone point me towards being able to sort on the 2d and 3d set of columns?
DEFINE FILE TOTSALES6
SORTVAL/D12 = IF VEHTYPE EQ 'ATOTL' THEN &SORTCOLUMN1 ELSE
IF VEHTYPE EQ 'NEW' THEN &SORTCOLUMN1 ELSE
IF VEHTYPE EQ 'USED' THEN &SORTCOLUMN1 ELSE 0;
END
TABLE FILE TOTSALES6
SUM
SORTVAL
TOTSALES6.SEG01.ALLINGROSS1/D12CB AS 'Retail'
TOTSALES6.SEG01.FIGROSS1/D12CB AS 'Dealer'
TOTSALES6.SEG01.UNITS/D12CB AS 'Units'
BY TOTAL HIGHEST SORTVAL NOPRINT
BY TOTSALES6.SEG01.BRAND AS 'Car'
BY TOTSALES6.SEG01.FLAG1 NOPRINT
BY TOTSALES6.SEG01.BRANDID NOPRINT
ACROSS TOTSALES6.SEG01.VEHTYPE AS '' COLUMNS ATOTL AS 'Total' AND NEW AS 'New ' AND USED AS 'Used'
END
This message has been edited. Last edited by: Kerry,
WF 7.7.04, WF 8.0.7, Win7, Win8, Linux, UNIX, Excel, PDF
December 27, 2012, 03:28 PM
RSquared
you always seem to be sorting on &sortcolumn1. should these be changed to &sortcolumn1 , 2 ,3 ?
WF 7.6.11 Oracle WebSphere Windows NT-5.2 x86 32bit
December 28, 2012, 06:59 AM
Alex
The parameter is set to the column based on the ACRSOO column value. My problem is that I have only been able to get the columns in the first ACROSS set.
WF 7.7.04, WF 8.0.7, Win7, Win8, Linux, UNIX, Excel, PDF
December 28, 2012, 07:44 AM
RSquared
Alex, Please post the rest of your code. I can't find "ACRSOO ".
WF 7.6.11 Oracle WebSphere Windows NT-5.2 x86 32bit
December 28, 2012, 11:06 AM
Alex
Typo. Should be ACROSS.
WF 7.7.04, WF 8.0.7, Win7, Win8, Linux, UNIX, Excel, PDF
December 28, 2012, 11:18 AM
Alex
I solve my problem by parameterizing and passing the value of the ACROSS column. Thanks for taking a look at it.
WF 7.7.04, WF 8.0.7, Win7, Win8, Linux, UNIX, Excel, PDF