Focal Point Banner
Community Center Education Summit Technical Support User Groups
Let's Get Social!

Facebook Twitter LinkedIn YouTube
Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     Title and data in same row for BY and ACROSS fields
Go
New
Search
Notify
Tools
Reply
  
Title and data in same row for BY and ACROSS fields
 Login/Join
 
Member
posted
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
 
Posts: 4 | Registered: January 21, 2015Reply With QuoteReport This Post
Master
posted Hide Post
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
 
Posts: 542 | Location: Dearborn, MI | Registered: June 03, 2009Reply With QuoteReport This Post
Member
posted Hide Post
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
 
Posts: 4 | Registered: January 21, 2015Reply With QuoteReport This Post
Master
posted Hide Post
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
 
Posts: 542 | Location: Dearborn, MI | Registered: June 03, 2009Reply With QuoteReport This Post
Platinum Member
posted Hide Post
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 


WF 8.2.06
Win10 / IE11
AHTML EXL2K PDF
 
Posts: 147 | Registered: October 19, 2010Reply With QuoteReport This Post
Virtuoso
posted Hide Post
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
 
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005Reply With QuoteReport This Post
  Powered by Social Strata  
 

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     Title and data in same row for BY and ACROSS fields

Copyright © 1996-2018 Information Builders, leaders in enterprise business intelligence.