Focal Point
[SOLVED] Unmerge values when using across

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

June 11, 2010, 12:11 PM
Saucey
[SOLVED] Unmerge values when using across
I have a need to unmerge the across value when using the following example code:

TABLE FILE CAR
SUM DEALER_COST RETAIL_COST
BY CAR
ACROSS COUNTRY
ON TABLE PCHOLD AS CAR1 FORMAT EXL2K
END

When the country prints in the output it spans two columns because I am summing two values. Is there a way to make the across values unmerge and have the value in just one cell?

This message has been edited. Last edited by: Kerry,
June 11, 2010, 03:01 PM
Prarie
it's the titles that spans the cells...not the data. Do you want it to say England England France France?


In Focus since 1993. WebFOCUS 7.7.03 Win 2003
Yes, that is how I want the report to display. England England France France

England blank France blank would work too


76x PROD environment (data, masters and fexes on MVS)

iway server 761 (z/OS 1.8)

Application Server: IBM WebSphere Application Server/6.1
Be creative

1st way
TABLE FILE CAR
SUM COMPUTE DUMMY/A10='Country '; AS ''
SUM 
 COUNTRY AS ''
 COUNTRY AS ''
ACROSS COUNTRY NOPRINT
ON TABLE SET HOLDLIST PRINTONLY
ON TABLE PCHOLD FORMAT EXL2K OPEN NOBREAK
END
-RUN
TABLE FILE CAR
SUM DEALER_COST RETAIL_COST 
BY CAR
ACROSS COUNTRY AS '' NOPRINT
ON TABLE SET PAGE NOPAGE
ON TABLE PCHOLD FORMAT EXL2K CLOSE
END  


2nd way
TABLE FILE CAR
SUM 
COMPUTE HEADLINE1/A30='<+0>' || COUNTRY;
COMPUTE HEADLINE2/A30='<+0>' || COUNTRY;
ACROSS COUNTRY NOPRINT
ON TABLE SET HOLDLIST PRINTONLY
ON TABLE HOLD AS HEADLINE FORMAT ALPHA
END
-RUN
TABLE FILE CAR
"<+0>
-INCLUDE HEADLINE
"
SUM DEALER_COST RETAIL_COST 
BY CAR
ACROSS COUNTRY AS '' NOPRINT
ON TABLE SET PAGE NOPAGE
ON TABLE PCHOLD AS CAR1 FORMAT EXL2K
ON TABLE SET STYLE *
TYPE=HEADING, HEADALIGN=BODY,$
ENDSTYLE
END  




several other options spring to mind as well
Ok thanks JG!!