Focal Point
[CLOSED] How to refer to a particular "ACROSS" column?

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

June 25, 2013, 01:20 PM
bug
[CLOSED] How to refer to a particular "ACROSS" column?
I have difficulty formatting a particular ACROSS column. The old way of

"COLUMN=Nx", or "COLUMN="

does not work. Any idea?

Thanks.

This message has been edited. Last edited by: <Kathryn Henning>,


7.66 and 7.704
System: Windows / AIX / Linux
Output: Mostly HTML, with some PDF, Excel and Lotus(!)
June 25, 2013, 01:43 PM
Francis Mariani
TYPE=DATA, ACROSSCOLUMN=RISK_COUNTA, COLOR=RED, WHEN= CUR_RR_CD EQ 'AA', $



Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
June 25, 2013, 01:47 PM
Francis Mariani
To specify a particular ACROSS value:

TABLE FILE CAR
SUM
COUNTRY NOPRINT
SALES

ACROSS COUNTRY

ON GRAPH SET STYLE *
TYPE=REPORT, ACROSSCOLUMN=SALES, COLOR=RGB(255 0 255), $
TYPE=REPORT, ACROSSCOLUMN=SALES, COLOR=RGB(255 0 0)  , WHEN= COUNTRY EQ 'ENGLAND'  , $
TYPE=REPORT, ACROSSCOLUMN=SALES, COLOR=RGB(0 255 0)  , WHEN= COUNTRY EQ 'FRANCE'   , $
TYPE=REPORT, ACROSSCOLUMN=SALES, COLOR=RGB(0 0 255)  , WHEN= COUNTRY EQ 'ITALY'    , $
TYPE=REPORT, ACROSSCOLUMN=SALES, COLOR=RGB(0 255 255), WHEN= COUNTRY EQ 'JAPAN'    , $
TYPE=REPORT, ACROSSCOLUMN=SALES, COLOR=RGB(255 255 0), WHEN= COUNTRY EQ 'W GERMANY', $
ENDSTYLE
END

You need the COUNTRY NOPRINT so that it's available for the WHEN clause.


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
June 26, 2013, 09:44 AM
Wep5622
quote:
Originally posted by Francis Mariani:
You need the COUNTRY NOPRINT so that it's available for the WHEN clause.


Actually, the WHEN clauses work fine without the extra COUNTRY column; it's available as an ACROSS column already after all.

Funnily enough, there is a difference between both forms; with the NOPRINT column the SALES column titles get printed, without it they don't.

Anyway, for whatever reason you need to add that column (WHEN recognising the field or getting ACROSS column titles), there's no rime or reason to it.


WebFOCUS 8.1.03, Windows 7-64/2008-64, IBM DB2/400, Oracle 11g & RDB, MS SQL-Server 2005, SAP, PostgreSQL 11, Output: HTML, PDF, Excel 2010
: Member of User Group Benelux :
June 26, 2013, 12:57 PM
Doug
Or, IF you know what columns you want to identify AND you do not know the values THEN you can identify the columns using numeric subscripts ELSE Whatever; (imho: I like this feature Smiler)
TABLE FILE CAR
SUM COUNTRY NOPRINT SALES ACROSS COUNTRY
ON GRAPH SET STYLE *
TYPE=REPORT, COLUMN=SALES(1), COLOR=RGB(255 000 255), $
TYPE=REPORT, COLUMN=SALES(2), COLOR=RGB(255 000 000), $
TYPE=REPORT, COLUMN=SALES(3), COLOR=RGB(000 255 000), $
TYPE=REPORT, COLUMN=SALES(4), COLOR=RGB(000 000 255), $
TYPE=REPORT, COLUMN=SALES(5), COLOR=RGB(000 255 255), $
TYPE=REPORT, COLUMN=SALES(6), COLOR=RGB(255 255 000), $
ENDSTYLE
END





   In FOCUS Since 1983 ~ from FOCUS to WebFOCUS.
   Current: WebFOCUS Administrator at FIS Worldpay | 8204, 8206
June 27, 2013, 01:34 PM
George Patton
I'm intrigued by Doug's code:
(I changed the ON GRAPH to ON TABLE of course)
TABLE FILE CAR
SUM COUNTRY NOPRINT SALES ACROSS COUNTRY
ON TABLE SET STYLE *
TYPE=REPORT, COLUMN=SALES(1), COLOR=RGB(255 000 255), $
TYPE=REPORT, COLUMN=SALES(2), COLOR=RGB(255 000 000), $
TYPE=REPORT, COLUMN=SALES(3), COLOR=RGB(000 255 000), $
TYPE=REPORT, COLUMN=SALES(4), COLOR=RGB(000 000 255), $
TYPE=REPORT, COLUMN=SALES(5), COLOR=RGB(000 255 255), $
TYPE=REPORT, COLUMN=SALES(6), COLOR=RGB(255 255 000), $
ENDSTYLE
END


The country shows up above the word SALES wnen COUNTRY NOPRINT is selected - both in the appropriate colour.

Removing the NOPRINT gives a different result. The word COUNTRY shows up in black to the left of SALES if the NOPRINT is removed. SALES is still the correct colour.

If I remove COUNTRY NOPRINT altogether then the word SALES no longer appears in the heading, but the country names are in colour .....


WebFOCUS 7.7.05 Windows, Linux, DB2, IBM Lotus Notes, Firebird, Lotus Symphony/OpenOffice. Outputs PDF, Excel 2007 (for OpenOffice integration), WP
June 27, 2013, 02:21 PM
Danny-SRL
George,
quote:
If I remove COUNTRY NOPRINT altogether then the word SALES no longer appears in the heading, but the country names are in colour .....

SALES appears in the heading because COUNTRY NOPRINT adds a field to your request and when there is more than 1 field in a SUM ... ACROSS the titles are shown.
The COUNTRY names are in color because you code TYPE=REPORT. See the following:
TABLE FILE CAR
SUM  SALES ACROSS COUNTRY
ON TABLE SET STYLE *
TYPE=DATA, COLUMN=SALES(1), COLOR=RGB(255 000 255), $
TYPE=DATA, COLUMN=SALES(2), COLOR=RGB(255 000 000), $
TYPE=DATA, COLUMN=SALES(3), COLOR=RGB(000 255 000), $
TYPE=DATA, COLUMN=SALES(4), COLOR=RGB(000 000 255), $
TYPE=DATA, COLUMN=SALES(5), COLOR=RGB(000 255 255), $
TYPE=DATA, COLUMN=SALES(6), COLOR=RGB(255 255 000), $
ENDSTYLE
END



Daniel
In Focus since 1982
wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF

June 27, 2013, 03:02 PM
Doug
1) You need to adjust the subscripts when you remove the "COUNTRY NOPRINT" as that field is counted even though it is NOPRINTed (it's still in the matrix).
2) So, how'd I miss that "ON GRAPH" in my TABLE FILE request (or did I leave it there to see if someone would catch it?)? Either way, it a good learning experience...