Focal Point
Title and data in same row for BY and ACROSS fields

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

January 26, 2015, 11:25 PM
Gurpreet Singh
Title and data in same row for BY and ACROSS fields
Can we have Country Title and Car data, in same row.

TABLE FILE CAR
SUM DC
BY COUNTRY
ACROSS CAR AS ''
END


WF-7703/7705
Windows, All Outputs
January 26, 2015, 11:50 PM
Ram Prasad E
Check if this helps.
TABLE FILE CAR
SUM DC 
BY COUNTRY 
ACROSS CAR AS ''
ON TABLE SET ASNAMES ON
ON TABLE HOLD
END
TABLE FILE HOLD
PRINT
*
END



Thanks,
Ram


WebFOCUS 8.1.05
Windows
http://ibiwebfocus.wordpress.com
https://www.facebook.com/groups/ibi.webfocus/
January 27, 2015, 02:45 AM
Gurpreet Singh
Thanks Ram, But with Same query, I am doing a Sorting order on Country, and specifically JAPAN at last column. Instead I am getting sort order value 'ZZ' and not JAPAN.

DEFINE FILE CAR
COUNTRY_SORT/A10 = IF COUNTRY EQ 'JAPAN' THEN 'ZZ' ELSE COUNTRY;
END
TABLE FILE CAR
SUM DC
BY CAR
ACROSS COUNTRY_SORT
ACROSS COUNTRY NOPRINT
ON TABLE SET ASNAMES ON
ON TABLE HOLD
END
TABLE FILE HOLD
PRINT
*
END


WF-7703/7705
Windows, All Outputs
January 27, 2015, 04:01 AM
Ram Prasad E
Check if this helps.

APP PATH IBISAMP

DEFINE FILE CAR
COUNTRY_SORT/A20 = IF COUNTRY EQ 'JAPAN' THEN 'ZZ' ELSE COUNTRY;
END
TABLE FILE CAR
BY COUNTRY_SORT NOPRINT
BY COUNTRY
ON TABLE SET HOLDLIST PRINTONLY
ON TABLE HOLD FORMAT ALPHA
END
-RUN
?FF HOLD
-SET &COLUMN_NAME='';
-REPEAT LBL_1 &LINES TIMES;
-READ HOLD &COUNTRY.A10.
-SET &COLUMN_NAME = &COLUMN_NAME | ' ''' | &COUNTRY | '''';
-LBL_1
-TYPE &COLUMN_NAME
-*-EXIT
TABLE FILE CAR
SUM DC AS ''
BY CAR
ACROSS COUNTRY AS ''
ON TABLE SET ASNAMES ON
ON TABLE SET HOLDLIST PRINTONLY
ON TABLE HOLD
END
-RUN
?FF HOLD

TABLE FILE HOLD
PRINT
&COLUMN_NAME
BY CAR
END



WebFOCUS 8.1.05
Windows
http://ibiwebfocus.wordpress.com
https://www.facebook.com/groups/ibi.webfocus/
January 27, 2015, 07:34 AM
dbeagan
Maybe this helps.
See previous post
Applied to your example:
 SET ACROSSTITLE=SIDE
DEFINE FILE ibisamp/car
COUNTRY_SORT/A10 = IF COUNTRY EQ 'JAPAN' THEN 'ZZ' ELSE COUNTRY;
END
TABLE FILE ibisamp/car
SUM DC 
BY CAR AS ''
ACROSS COUNTRY_SORT NOPRINT
ACROSS COUNTRY AS 'CAR'
END 



WebFOCUS 8.2.06
January 27, 2015, 08:29 AM
j.gross
quote:

...Instead I am getting sort order value 'ZZ' and not JAPAN.

...

TABLE FILE CAR
SUM DC
BY CAR
ACROSS COUNTRY_SORT
ACROSS COUNTRY NOPRINT
...


Of course "ZZ" appears, rather than "JAPAN". You have the NOPRINT on the wrong ACROSS.


- Jack Gross
WF through 8.1.05