Focal Point
How to display Total Column as first colum in ACROSS-TOTAL

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

August 18, 2003, 02:56 PM
<Vipul>
How to display Total Column as first colum in ACROSS-TOTAL
My problem is that my client wants the Total Column (ACROSS-TOTAL) to be the first column. The code is as follows. Any help would be appreciated.

SET EMPTYREPORT = ON
-*SET NODATA =
JOIN CLEAR *
JOIN
TBLMRCHINFO.ACCOUNTSTATUS1 IN TBLMRCHINFO TO TBLTYPEACCOUNTSTATUS.ACCOUNTSTATUS
IN TBLTYPEACCOUNTSTATUS AS J2
END
JOIN TBLMRCHINFO.REPCODE IN TBLMRCHINFO TO TBL_REPS.REPCODE IN TBL_REPS AS J3
DEFINE FILE TBLMRCHINFO
STATUS_NUM/A1 = IF (ACCOUNTSTATUS1 LE 11) THEN '1'
ELSE IF (ACCOUNTSTATUS1 EQ 15) THEN '2'
ELSE IF ((ACCOUNTSTATUS1 EQ 53) OR (ACCOUNTSTATUS1 EQ 105)) THEN '3'
ELSE IF ((ACCOUNTSTATUS1 EQ 52) OR (ACCOUNTSTATUS1 EQ 90)) THEN '4'
ELSE IF ((ACCOUNTSTATUS1 EQ 99) OR (ACCOUNTSTATUS1 EQ 100)) THEN '4'
ELSE '0';
STATUS_DESC/A40 = DECODE STATUS_NUM('1' 'Initial Proposal'
'2' 'Pending Customer Approval'
'3' 'Pending Credit'
'4' 'Complete/Boarded');
LENSALECHNL/I2 = ARGLEN(50, SALESCHANNEL, LENSALECHNL);
Day/YYMD=HDATE ( CREATEDATE,'YYMD');
HOURS/I2=HPART ( CREATEDATE, 'hour', 'I2');
Year/YY=Day;
Month/Mt=Day;
Qtr/Q=Day;
Date/D=Day;
END
TABLE FILE TBLMRCHINFO
SUM
CNT.MRCHID/I11C AS 'Total Accounts Created'
OUTLETVOLUME/P19M AS 'Total, Signed, Volume'
BY
Year
BY
Month
ACROSS
STATUS_DESC AS '' ACROSS-TOTAL
WHERE STATUS_NUM NE '0'
AND LENSALECHNL GE 1;
HEADING
"Account Summary by Month"
" "
ON TABLE SET PAGE-NUM OFF
ON TABLE COLUMN-TOTAL AS 'TOTAL'
ON TABLE SET ONLINE-FMT HTML
ON TABLE SET HTMLCSS ON

Thanks,

vipul.gupta@wellsfargo.com
August 20, 2003, 03:34 PM
<Claudia Holanda>
The easiest thing that comes to mind is to use a multi-verb request.

I'm including a fex as a sample. It's functionally the same as the one you provide, but much simplified. The second request shows the multi-verb.

TABLE FILE CAR
SUM RCOST/D9 DCOST/D9
BY COUNTRY
BY CAR
ACROSS SEATS
-*ACROSS-TOTAL
ON TABLE ROW-TOTAL
END
TABLE FILE CAR
SUM RCOST/D9 AS 'TOTAL,RCOST' DCOST/D9 AS 'TOTAL,DCOST'
BY COUNTRY
BY CAR
SUM RCOST/D9 DCOST/D9
BY COUNTRY
BY CAR
ACROSS SEATS
END

Hope this helps.