Hi, I'm trying to hold data using ACROSS COUNTRY and uisng COLUMNS command to sort but when I print the hold data I'm getting extra character appended. Below is my code
TABLE FILE CAR
SUM
SALES
BY CAR AS ''
ACROSS COUNTRY AS '' COLUMNS 'ITALY' AND 'ENGLAND' AND 'FRANCE' AND 'W GERMANY' AND 'JAPAN'
ON TABLE HOLD AS H_TEMP1 FORMAT FOCUS
END
TABLE FILE H_TEMP1
PRINT
*
END
ON Uppercases the literal specified in an AS phrase and propagates it as the field name in the HOLD Master File. Creates names for ACROSS fields that consist of the AS name value concatenated to the beginning of the ACROSS field value and controls the way ACROSS fields are named in HOLD files of any format.
Happy Holidays.
Thank your for participating in the Focal Point Forum, Tamra Colangelo Focal Point Moderator Information Builders
WebFOCUS 8x - BI Portal, Developer Studio, App Studio, Excel, PDF, Active Formats and HTML5
December 23, 2016, 08:53 AM
WF World
quote:
concatenated to the beginning of the ACROSS field value and controls the way ACROSS fields are named
Hi Tamra, Thanks for your response on this request. I've already tried using SET ASNAMES=ON before but it didn't work for me.
SET ASNAMES=ON
TABLE FILE CAR
SUM
SALES
BY CAR AS ''
ACROSS COUNTRY AS '' COLUMNS 'ITALY' AND 'ENGLAND' AND 'FRANCE' AND 'W GERMANY' AND 'JAPAN'
ON TABLE HOLD AS H_TEMP1 FORMAT FOCUS
END
TABLE FILE H_TEMP1
PRINT
*
END
WebFOCUS 8.1.03 Windows, Linux All Outputs
December 23, 2016, 09:08 AM
Tony A
quote:
I've already tried using SET ASNAMES=ON before but it didn't work for me.
You need to read what Tamra wrote in full as she is saying that this is expected behaviour (as well as being documented - she included the quote from the documentation).
T
In FOCUS since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2
WebFOCUS App Studio 8.2.06 standalone on Windows 10
SET ASNAMES=ON
TABLE FILE CAR
SUM
SALES AS ''
BY CAR AS ''
ACROSS COUNTRY AS '' COLUMNS 'ITALY' AND 'ENGLAND' AND 'FRANCE' AND 'W GERMANY' AND 'JAPAN'
ON TABLE HOLD AS H_TEMP1
END
TABLE FILE H_TEMP1
PRINT
*
ON TABLE PCHOLD FORMAT PDF
END
WebFOCUS 8.1.03 Windows, Linux All Outputs
December 23, 2016, 10:33 AM
J.L. Hinds
May be an easier way but here is a fast way
TABLE FILE H_TEMP1 PRINT E01 E02 AS 'ITALY' E03 AS 'ENDGLAND' E04 AS 'FRANCE' E05 AS 'W GERMANY' E06 AS 'JAPAN' END
WebFOCUS 7.6 Windows, All Outputs
December 26, 2016, 05:55 AM
WF World
Hi Hinds, Thanks for the reply. My across value changes dinamically. I'll read it in a variable and then provide it as below
ACROSS COUNTRY AS '' COLUMNS &COLVAL11
Now its working fine.
I really appriciate your help on this. Thanks
WebFOCUS 8.1.03 Windows, Linux All Outputs
December 27, 2016, 03:21 PM
Waz
Hi WF World,
If your question has been answered, please add [SOLVED] or [CLOSED] to the title of your first post.