Focal Point Banner


As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.

Join the TIBCO Community
TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.

  • From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
  • Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
  • Request access to the private WebFOCUS User Group (login required) to network with fellow members.

Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     Style ACROSS columns.

Read-Only Read-Only Topic
Go
Search
Notify
Tools
Style ACROSS columns.
 Login/Join
 
Platinum Member
posted
I have a report with ACROSS fields. I need the data in each across value to be colored. Means for example, all data under the ACROSS value ‘say 2’ has to be colored in RED. All data under the ACROSS value ‘3’ has to colored as ‘BLUE’ etc.

See the below code:

TABLE FILE CAR
SUM RETAIL_COST
BY COUNTRY
ACROSS SEATS
ACROSS CAR
ON TABLE SET STYLE *
TYPE=ACROSSVALUE,COLOR=RED, $
TYPE=ACROSS,COLUMN=C1,COLOR=GREEN, $
TYPE=DATA,ACROSSCOLUMN=RETAIL_COST,COLOR=BLUE,WHEN = SEATS EQ 2, $
END

Thanks for your help!


Regards,
Cyril Joy.

WF Production 8008 on Linux.
 
Posts: 143 | Location: Rochester,NY. | Registered: August 20, 2004Report This Post
Expert
posted Hide Post
Cyril,

Though not elegant, this gets you on the way:

DEFINE FILE CAR
FLAG/D4 = SEATS;
END

TABLE FILE CAR
SUM
SALES AS ''
MIN.FLAG NOPRINT
BY COUNTRY

ACROSS SEATS
ACROSS CAR
ON TABLE SET STYLE *

TYPE=DATA,  ACROSSCOLUMN=SALES, COLOR='RED', WHEN=MIN.FLAG EQ 2, $
TYPE=DATA,  ACROSSCOLUMN=SALES, COLOR='BLUE', WHEN=MIN.FLAG EQ 4, $
TYPE=DATA,  ACROSSCOLUMN=SALES, COLOR='GREEN', WHEN=MIN.FLAG EQ 5, $
ENDSTYLE
END


Hopefully someone else has a better idea...


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
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Platinum Member
posted Hide Post
Thanks, Francis.

But why the below code is coloring the columns which has only data. I need the entire portion of the report to be colored? (I use BACKCOLOR instead of COLOR)

DEFINE FILE CAR
FLAG/D4 = SEATS;
END

TABLE FILE CAR
SUM
SALES AS ''
MIN.FLAG NOPRINT
BY COUNTRY

ACROSS SEATS
ACROSS CAR
ON TABLE SET STYLE *

TYPE=DATA, ACROSSCOLUMN=SALES, BACKCOLOR='RED', WHEN=MIN.FLAG EQ 2, $
TYPE=DATA, ACROSSCOLUMN=SALES, BACKCOLOR='BLUE', WHEN=MIN.FLAG EQ 4, $
TYPE=DATA, ACROSSCOLUMN=SALES, BACKCOLOR='GREEN', WHEN=MIN.FLAG EQ 5, $
ENDSTYLE
END


Regards,
Cyril Joy.

WF Production 8008 on Linux.
 
Posts: 143 | Location: Rochester,NY. | Registered: August 20, 2004Report This Post
Expert
posted Hide Post
Unfortunately this is because data rows do not exist. For example, England-Alfa Romeo does not exist, therefore there is no SEAT or FLAG value for England-Alfa Romeo.

It looks like this solution will not work. I don't have any other ideas...


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
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Platinum Member
posted Hide Post
What do you mean by "entire portion of the report to be colored"? If you're only interested in coloring the data, then if no data exists, as Francis mentioned, then you would not expect it to be colored?


Prod - WF 7.6.4 Unix/Solaris - Self-Service, BI Dashboard, MRE
Dev - WF 7.6.4 Unix/Solaris - Self-Service, BI Dashboard, MRE
Databases: Oracle 10g, SQL Server 2000, DB2.
 
Posts: 177 | Location: Calgary, Alberta, Canada | Registered: April 25, 2005Report This Post
Virtuoso
posted Hide Post
Cyril,

I have two thoughts which I have not tested.

1) set the default background of the data to the color you want as the default.

TYPE=DATA, BACKCOLOR=...,$

2) If number 1 does not work, put another style statement in the stylesheet and set the BACKCOLOR WHEN=SEATS EQ 0,$


Thanks!

Mickey

FOCUS/WebFOCUS 1990 - 2011
 
Posts: 995 | Location: Gaithersburg, MD, USA | Registered: May 07, 2003Report This Post
Virtuoso
posted Hide Post
purpose of across is to dynamically display columns as they exists. If only one sort value exists, then there is no column 2 to change colors on. You could use column notation as follows to get what you need. The "ACROSS COUNTRY COLUMNS value and value " I used simply to control the order of the columns.
TABLE FILE CAR
PRINT 
     CAR
ACROSS COUNTRY
ON TABLE NOTOTAL
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
     UNITS=IN,
     SQUEEZE=ON,
     ORIENTATION=PORTRAIT,
$
TYPE=REPORT,
     GRID=OFF,
     FONT='TIMES NEW ROMAN',
     SIZE=10,
     COLOR='BLACK',
     BACKCOLOR='NONE',
     STYLE=NORMAL,
$
TYPE=DATA,
     COLUMN=N1,
     BACKCOLOR='RED',
$
TYPE=DATA,
     COLUMN=C3,
     BACKCOLOR='BLUE',
$
TYPE=DATA,
     COLUMN=C5,
     BACKCOLOR='YELLOW',
$
ENDSTYLE
END


Regards,

Darin



In FOCUS since 1991
WF Server: 7.7.04 on Linux and Z/OS, ReportCaster, Self-Service, MRE, Java, Flex
Data: DB2/UDB, Adabas, SQL Server Output: HTML,PDF,EXL2K/07, PS, AHTML, Flex
WF Client: 77 on Linux w/Tomcat
 
Posts: 2298 | Location: Salt Lake City, Utah | Registered: February 02, 2007Report This Post
Platinum Member
posted Hide Post
My code is as shown below. One BY and two ACROSS.

TABLE FILE CAR
SUM RETAIL_COST
BY COUNTRY
ACROSS SEATS
ACROSS CAR
ON TABLE SET STYLE *
END

Basically i need the entire background of every second ACROSS value fields to be colored,by using BACKCOLOR.


Regards,
Cyril Joy.

WF Production 8008 on Linux.
 
Posts: 143 | Location: Rochester,NY. | Registered: August 20, 2004Report This Post
Virtuoso
posted Hide Post
The code I posted gives you what you need - just specify every other column starting with C2:

TYPE=DATA,
     COLUMN=C2,
     BACKCOLOR='RED',
$
TYPE=DATA,
     COLUMN=C4,
     BACKCOLOR='RED',
$
TYPE=DATA,
     COLUMN=C6,
     BACKCOLOR='RED',
$
TYPE=DATA,
     COLUMN=C8,
     BACKCOLOR='RED',
$
TYPE=DATA,
     COLUMN=C10,
     BACKCOLOR='RED',
$
TYPE=DATA,
     COLUMN=C12,
     BACKCOLOR='RED',
$


Regards,

Darin



In FOCUS since 1991
WF Server: 7.7.04 on Linux and Z/OS, ReportCaster, Self-Service, MRE, Java, Flex
Data: DB2/UDB, Adabas, SQL Server Output: HTML,PDF,EXL2K/07, PS, AHTML, Flex
WF Client: 77 on Linux w/Tomcat
 
Posts: 2298 | Location: Salt Lake City, Utah | Registered: February 02, 2007Report This Post
Virtuoso
posted Hide Post
Cyril,
Don't forget the use of DM:
  
-* File cyril1.fex
TABLE FILE CAR
SUM
     RETAIL_COST
BY COUNTRY
ACROSS SEATS
ACROSS CAR
ON TABLE NOTOTAL
ON TABLE SET STYLE *
     UNITS=IN,
     SQUEEZE=ON,
     ORIENTATION=PORTRAIT,
$
TYPE=REPORT,
     GRID=OFF,
     FONT='TIMES NEW ROMAN',
     SIZE=10,
$
-REPEAT #YELLOW FOR &I FROM 2 TO 64 STEP 2;
TYPE=DATA,
     COLUMN=N&I,
     BACKCOLOR='YELLOW',
$
TYPE=TITLE,
     COLUMN=N&I,
     BACKCOLOR='YELLOW',
$
-#YELLOW
ENDSTYLE
END


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

 
Posts: 1980 | Location: Tel Aviv, Israel | Registered: March 23, 2006Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     Style ACROSS columns.

Copyright © 1996-2020 Information Builders