Focal Point
[SOLVED] Across field - SubTotal - custom Subheads

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

December 02, 2008, 01:38 PM
<Gauri>
[SOLVED] Across field - SubTotal - custom Subheads
I am developing a FEX with an ACROSS field (on cities). And also using a SUBTOTAL on the BY field. I want to have a custom title for these subtotal.

The fex goes like below

DEFINE FILE GABUD
SRT_DESC0/A15 = 'Net Income';
GRP_CTCD/A50 = DECODE CAT_14_CD (
'CGR' 'A01-Total Revenue'
'GEN' 'A03-Total Revenue'
'RIR' 'A05-Total Revenue'
'FRI' 'A07-Total Revenue'
'MCR' 'A09-Total Revenue'
'PST' 'A11-Total Revenue'
'SRS' 'B01-Total Salaries and Related Expenses'
'ROE' 'C01-Total Rent & Occupancy Cost'
'TEE' 'D01-Total Travel and Entertainment'
'PSE' 'E01-Total Professional services'
'MKT' 'F01-Total Marketing'
'PRM' 'G01-Total Promotional'
'IVR' 'H01-Total Investor Relations'
'ICL' 'I01-Total Insurance Costs'
'CFE' 'J01-Total Conference/Director/Shareholder Expense'
'DSE' 'J02-Total Conference/Director/Shareholder Expense'
'OAC' 'K01-Total Other Administrative Costs'
'APC' 'K02-Total Other Administrative Costs'
'MCE' 'L01-Total Shared Cost Reimbursements'
'ERS' 'L02-Total Shared Cost Reimbursements'
ELSE 'Z01-Others');
GRP_CD1/A2 = EDIT(GRP_CTCD,'9$');
GRP_CD_DS/A42 = EDIT(GRP_CTCD,'$$$$9999999999999999999999999999999999999999');
END
-*-----------------------------------------------------------------------------------------------------
TABLE FILE GABUD
PRINT
SRT_DESC0
GRP_CD1
GRP_CD_DS
CAT_14_CD
ACCT_DESC
BUS_UNIT_DESC NOPRINT
COMPUTE POS/I2 = POSIT (BUS_UNIT_DESC, 30, '(', 1, 'I2'); NOPRINT
COMPUTE BU_DESC/A30 = SUBSTR(30, BUS_UNIT_DESC, 1, (POS - 1), POS, BU_DESC);
COMPUTE TOT_MTH/D12.2CB = MONTH1 + MONTH2 + MONTH3 + MONTH4 + MONTH5 + MONTH6 + MONTH7 + MONTH8 + MONTH9 + MONTH10 + MONTH11 + MONTH12;
COMPUTE RCP_NETIN/A10 = '';
COMPUTE SKIP_REC/A1 = IF TOT_MTH EQ 0 THEN 'Y'ELSE 'N';
BY CO
BY MCU
BY OBJECT_ACCT_CD
-*----------------------------------------------------------
WHERE TOTAL SKIP_REC EQ 'N';
-*---------------------
ON TABLE HOLD AS GABUD1
END
-*-EXIT
-*--------------------------------------------------
TABLE FILE GABUD1
SUM
TOT_MTH AS ' '
ACROSS BU_DESC AS ''
BY RCP_NETIN NOPRINT
BY GRP_CD1 NOPRINT
BY CAT_14_CD NOPRINT
BY OBJECT_ACCT_CD AS ''
BY ACCT_DESC AS ''
-* ***************************************Here is the problem***********************
-* I want to display the subhead as GRP_CD_DS (ie Total Revenue, Total Salaries and Related Expenses, etc)
-*and not the the variable itself.
-* **********************************************************************************
ON GRP_CD1 SUBTOTAL AS GRP_CD_DS
ON RCP_NETIN SUB-TOTAL AS 'Net Cash Flow'
End


I can not use RECAP, otherwise for RECAP, i have to say,

Any help on this greatly appreciated!!!!


Thanks,

This message has been edited. Last edited by: Kerry,
December 02, 2008, 01:42 PM
<Gauri>
I cannot use RECAP, as i have ACROSS fiels on cities. And End User has abilities to run the report of n number of cities.

So i need the Subtitles of the subtotals as eg.'Total Revenue, Total Salaries and Related Expenses' stored in variable 'GRP_CD_DS'
which i am not able to use in SUBTOTAL.
December 02, 2008, 05:42 PM
FrankDutch
Add

BY GRP_CD_DS NOPRINT (after the line BY GRP_CD1)

and

replace the line

ON GRP_CD1 SUBTOTAL....

into

ON GRP_CD_DS SUBTOTAL AS ''




Frank

prod: WF 7.6.10 platform Windows,
databases: msSQL2000, msSQL2005, RMS, Oracle, Sybase,IE7
test: WF 7.6.10 on the same platform and databases,IE7

December 03, 2008, 11:51 AM
<Gauri>
Thanks Frank, It worked!!!