[SOLVED] Simple Style Problem when same column name is specified more than once
I thought this would be easy. The docs states "When a field occurs more than once, use field(n) to select a particular occurrence or field(*) to select all occurrences of the field."
Neither seems to be working as advertised - for COMPUTE columns occurring more than once , only the first occurrence is styled. For DEFINE or normal columns it works.
DEFINE FILE CAR
COUNTRYY/A12 = COUNTRY;
END
TABLE FILE CAR
PRINT
COUNTRY
COUNTRYY
COMPUTE COUNTRYX/A12 = COUNTRY;
COUNTRY
COMPUTE COUNTRYX/A12 = COUNTRY;
COUNTRYY
ON TABLE SET STYLE *
TYPE=REPORT, COLUMN=COUNTRY(*), COLOR=RED, $
TYPE=REPORT, COLUMN=COUNTRYY(*), COLOR=YELLOW, $
TYPE=REPORT, COLUMN=COUNTRYX(*), COLOR=BLUE, $
ENDSTYLE
END
This message has been edited. Last edited by: Francis Mariani,
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
October 02, 2013, 02:29 PM
Dan Satchell
Please try not to confuse the tool so much!
DEFINE FILE CAR
COUNTRYY/A12 = COUNTRY;
END
TABLE FILE CAR
PRINT
COUNTRY
COUNTRYY
COMPUTE COUNTRYX/A12 = COUNTRY;
COUNTRY
COUNTRYX
COUNTRYY
ON TABLE SET STYLE *
TYPE=REPORT, COLUMN=COUNTRY(*), COLOR=RED, $
TYPE=REPORT, COLUMN=COUNTRYY(*), COLOR=YELLOW, $
TYPE=REPORT, COLUMN=COUNTRYX(*), COLOR=BLUE, $
ENDSTYLE
END
WebFOCUS 7.7.05
October 02, 2013, 03:55 PM
Francis Mariani
!
Nice solution.
I was doing this in a Dialogue manager loop where I was repeatedly computing the column - I'll find a different way to do it, perhaps using DEFINE.
Thanks,
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