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     How to give font color for alternate row

Read-Only Read-Only Topic
Go
Search
Notify
Tools
How to give font color for alternate row
 Login/Join
 
Member
posted
HI
I need to give red and black colour to row data alternately.like for eg.

data1 data2 data3 --->should be in red(row1)
data4 data5 data6 --->should be black(row2)

and so on...
any one know how to do it.
i know it for BACKCOLOR but backcolor does not work for font
 
Posts: 9 | Registered: November 16, 2006Report This Post
Platinum Member
posted Hide Post
Naveen,

The same technique you use for BACKCOLOR should work with COLOR.

Kevin


WF 7.6.10 / WIN-AIX
 
Posts: 141 | Location: Denver, CO | Registered: December 09, 2005Report This Post
Member
posted Hide Post
quote:
Originally posted by KevinG:
Naveen,

The same technique you use for BACKCOLOR should work with COLOR.

Kevin



HI Kevin ,
thanks for quick response but it does not work .what we do with backcolor is
BACKCOLOR=( 'WHITE' RGB(238 238 238) )
but it is not working with color
 
Posts: 9 | Registered: November 16, 2006Report This Post
Virtuoso
posted Hide Post
will this help Naveen?

 DEFINE FILE CAR
PROFIT/D12.2 = RETAIL_COST - DEALER_COST;
END
-*
SET BYDISPLAY = ON
-*
TABLE FILE CAR
PRINT
DEALER_COST
RETAIL_COST
PROFIT
BY COUNTRY
BY CAR
BY MODEL
ON TABLE SET STYLE *
UNITS=IN,
PAGESIZE='SCREEN',
LEFTMARGIN=0.000000,
RIGHTMARGIN=0.000000,
TOPMARGIN=0.000000,
BOTTOMMARGIN=0.000000,
SQUEEZE=ON,
ORIENTATION=LANDSCAPE,
$
TYPE=REPORT,
GRID=OFF,
FONT='TIMES NEW ROMAN',
SIZE=10,
COLOR='BLACK',
BACKCOLOR='NONE',
STYLE=NORMAL,
$
TYPE=DATA,
COLOR='PURPLE',
COLUMN=PROFIT,
WHEN=PROFIT GE 5000,
$
TYPE=DATA,
COLOR='RED',
COLUMN=PROFIT,
WHEN=PROFIT LE 999,
$
ENDSTYLE 


it will give you difeerent colors based upon the value of "profit"
do you make use of the GUI?
it can help!




Frank

prod: WF 7.6.10 platform Windows,
databases: msSQL2000, msSQL2005, RMS, Oracle, Sybase,IE7
test: WF 7.6.10 on the same platform and databases,IE7

 
Posts: 2387 | Location: Amsterdam, the Netherlands | Registered: December 03, 2006Report This Post
Platinum Member
posted Hide Post
Naveen,

Sorry, i should never jump to conclusions when StyleSheets are involed...

Try this;

 TABLE FILE CAR
  PRINT CAR
  COMPUTE LN/I1 = IF LAST LN NE 1 OR 2 THEN 1
                    ELSE IF LAST LN EQ 1 THEN 2
                    ELSE IF LAST LN EQ 2 THEN 1
                    ELSE 3; NOPRINT
  BY COUNTRY
ON TABLE PCHOLD FORMAT HTML

ON TABLE SET STYLE *
TYPE=DATA, COLOR=BLACK, WHEN=LN EQ 1, $
TYPE=DATA, COLOR=RED, WHEN=LN EQ 2, $
ENDSTYLE
END
 


WF 7.6.10 / WIN-AIX
 
Posts: 141 | Location: Denver, CO | Registered: December 09, 2005Report This Post
Member
posted Hide Post
HI Frank,
Actually i have applied Backcolor for my rows.its grey and white for alternate rows.

now what i want is that whatever is the background color of the row the same color i want for font. in that case the data will not be visible.
this is my actual requirement .. Smiler
 
Posts: 9 | Registered: November 16, 2006Report This Post
Platinum Member
posted Hide Post
This may not be your exact requirement, but to alternate background colours by row, simply do this:

TABLE FILE CAR
PRINT 
CAR
BY COUNTRY

ON TABLE SET STYLE *
TYPE=DATA, BACKCOLOR=('GREY' 'BLACK'), $

ENDSTYLE
END


Regards,
Sean


------------------------------------------------------------------------
PROD: WebFOCUS 7.6.2 on Unix AIX/Tomcat/Servlet Mode
TEST: WebFOCUS 7.6.2 on Unix AIX/Tomcat/Servlet Mode
 
Posts: 210 | Location: Ottawa | Registered: November 03, 2005Report This Post
Virtuoso
posted Hide Post
I do not understand this.
you want the font color to be the same as the backcolor or do you want the fontcolor to be the opposite of the backcolor, so black text on white background and white text on black bg?

In that case maybe smiths solution will also work for the fontcolor so

TYPE=DATA, BACKCOLOR=('GREY' 'BLACK'),
COLOR=('BLACK' 'GREY') $

give it a try.




Frank

prod: WF 7.6.10 platform Windows,
databases: msSQL2000, msSQL2005, RMS, Oracle, Sybase,IE7
test: WF 7.6.10 on the same platform and databases,IE7

 
Posts: 2387 | Location: Amsterdam, the Netherlands | Registered: December 03, 2006Report This Post
Member
posted Hide Post
I am trying to use this same technique in excel but it doesn't seem to be working. Other than adding a counter and then coloring those rows is there any other way to get this to work?

TYPE=DATA, BACKCOLOR=(RED RGB(204 204 204)),$

This works for PDF output but not EXL2K.
 
Posts: 19 | Location: Springfield, MA | Registered: May 04, 2004Report This Post
Platinum Member
posted Hide Post
something like this maybe
  
TABLE FILE CAR
LIST CAR COUNTRY 
ON TABLE HOLD 
END
-RUN
TABLE FILE HOLD 
PRINT CAR
AND COMPUTE BAND1/I1=IF (IMOD(LIST, 2, 'I3') NE 0) THEN 0 ELSE 1; NOPRINT
BY COUNTRY 
ON TABLE PCHOLD FORMAT EXL2K
ON TABLE NOTOTAL
ON TABLE SET PAGE NOLEAD
ON TABLE SET STYLE *
TYPE=DATA, BACKCOLOR=RED, WHEN=BAND1 EQ 0,$
TYPE=DATA, BACKCOLOR=GREY, WHEN=BAND1 EQ 1,$
ENDSTYLE
END



WebFOCUS 7.6.6/TomCat/Win2003,SQL Server 2005,Oracle
 
Posts: 125 | Location: New England | Registered: February 20, 2007Report This Post
Expert
posted Hide Post
Why on earth does this not work in 5.3.2:

TABLE FILE CAR
PRINT 
CAR
BY COUNTRY

ON TABLE SET STYLE *
TYPE=DATA, COLOR=( RGB(243 244 248) RGB(255 255 255) ), $

ENDSTYLE
END


Substitute COLOR with BACKCOLOR and it works:

TABLE FILE CAR
PRINT 
CAR
BY COUNTRY

ON TABLE SET STYLE *
TYPE=DATA, BACKCOLOR=( RED BLUE ), $

ENDSTYLE
END


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
Virtuoso
posted Hide Post
Apparently there was a problem with this all the way up till 7.13. Ricks solution will be a work around.
Francis when did you say you might get upgrade?


In Focus since 1993. WebFOCUS 7.7.03 Win 2003
 
Posts: 1903 | Location: San Antonio | Registered: February 28, 2005Report This Post
Member
posted Hide Post
Hi,

You can use the following code block to achieve alternate coloring.

TYPE=DATA,
BACKCOLOR=(RGB(245 245 245) RGB(255 255 255)),
$


Thanks and Regards,
Aravindbaalaaji
 
Posts: 12 | Location: India | Registered: February 13, 2006Report This Post
Member
posted Hide Post
Thanks everyone for the feedback. I'm on WF 5.24.
TYPE=DATA, BACKCOLOR=(RGB(245 245 245) RGB(255 255 255)), $
The code above doesn't seem to work for EXL2K, however I was able to get it to work with a counter and the following code...
TYPE=DATA, BACKCOLOR=RGB(204 204 204), WHEN=CNT_TICKER EQ 5,$
This essentially colors every 5th row.

Thanks again everyone!

Ryan
 
Posts: 19 | Location: Springfield, MA | Registered: May 04, 2004Report This Post
Expert
posted Hide Post
Prarie, the client I will be working for in Jan 2008 will be upgrading early in the new year - I'm keeping my fingers crossed that it won't be as painful as some of the upgrades described here.


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
Expert
posted Hide Post
Francis,

We jumped from 533 to 762 (after trying 760 and 761) and the upgrade was reasonably successful. We tried to upgrade to 714 last year and couldn't get it to work well with WebSphere 5.

Other than a few open cases, things are going well finally. Just be prepared for a LOT of behaviour changes and code tightening.

Have fun!


Ginny
---------------------------------
Prod: WF 7.7.01 Dev: WF 7.6.9-11
Admin, MRE,self-service; adapters: Teradata, DB2, Oracle, SQL Server, Essbase, ESRI, FlexEnable, Google
 
Posts: 2723 | Location: Ann Arbor, MI | Registered: April 05, 2006Report This Post
Master
posted Hide Post
Ryan,

TYPE=DATA, BACKCOLOR=(RGB(245 245 245) RGB(255 255 255)), $

should work with Excel in 5.2.4, the problem may be that the not all colors can be produced in Excel and colors are too close. Excel translates them both to white. Try using (RGB(200 200 200) RGB(255 255 255)),$
OR ('SILVER' 'WHITE'),$


Pat
WF 7.6.8, AIX, AS400, NT
AS400 FOCUS, AIX FOCUS,
Oracle, DB2, JDE, Lotus Notes
 
Posts: 755 | Location: TX | Registered: September 25, 2007Report This Post
Expert
posted Hide Post
the thing about excel (at least xp) is that it takes your rgb values and converts it to what BillGates decides is the closest of its 40 available color values. and sometimes the combinations it produces are wicked icky; The actual rgb/hex values of those excel colors you can get here; and they're *not* just the named unix color set we use in wf by name.
so, when you use multiple formats with 1 fex,
i suggest
-SET &myback = IF &FMT IS 'EXCEL' THEN 'RGB(..)' ELSE 'RGB(...)';
and then use
BACKCOLOR=&myback, COLOR=&mycolor
Works for me.
In excel 2007, that's s'posed to all go away
and you're s'posed to have full rgb range.
anybody know?

oh yeah, one more thing, Naveen..PLEASE UPDATE YOUR SIGNATURE.




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
 
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003Report 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     How to give font color for alternate row

Copyright © 1996-2020 Information Builders