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.
I have a focus procedure generating HTML. I need the background of the data cells of the summary row as blue. The hyperlinks in that row are no more visible (cause they are also blue). Is there any way I can selectively turn the links as white in that row (using webfocus stylesheet) ?
WebFOCUS 5.3.3 MRE - Solaris - Sun Web Server - Weblogic
Govind, my original post apparently made a mess of the board, since it had html tags in it... so sorry. My thinking is that it won't work. In a focus style sheet, you can apply a CLASS, but not to the drilldown, just to the TD. We need a way to apply a CLASS to the FOCEXEC= part of the drilldown. so a work-around is to define your own drilldown...
MYDRILL/A100='<A HREF= ... >' | MYVAR | '</A>';
and apply your own styling directly to the A tag.
If there is a way to apply a CLASS to the Anchor Tag of a drilldown.. perhaps someone will come along and tell us.
otherwise, in the style section of your htmlform you can choose a single set of colors and features for all anchor tags that will work for all bg colors;
-HTMLFORM BEGIN
<HEAD>
<style>
A {color:#999999; text-decoration:underline}
a:hover, a:active{ color:#6699cc; text-decoration:underline}
</style>
...etc
This message has been edited. Last edited by: susannah,
In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003
yes, that's what i was saying above; If you want to run a subfex passing the value MYVAR and having the drilldown on some fancier version of MYVAR, like MYVARNAME, then something like this: Just make sure the A200 is big enough because you'll be putting a class= attribute in there.
ouch. you're in mre that makes it more work. so i guess your format has got to be A1000 just make sure you put an escape character, a pipe | after each & in your href. good luck!
In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003
Govind, better idea...lets make this really simple. We can easily change the text color in a dd column using conditional styling. The only thing you'll lose is the CHANGE in color when your user hovers over it. But you can still make it underline on hover... Compute some FLAG/I1 for whatever condition your need TYPE=DATA,COLUMN=CAR,COLOR=RED,WHEN=FLAG EQ 0, focexec=somefex(parms..),$ TYPE=DATA,COLUMN=CAR,COLOR=TEAL,WHEN=FLAG EQ 1, focexec=somefex(parms..),$ ..then in your HTMLFORM
HEAD>
<style>
A {color:#999999; text-decoration:NONE}
a:hover, a:active{ color:#6699cc; text-decoration:underline}
</style>
...the color will be overridden by the direct color reference in your focus style section, but the underline (or text-decoration feature) will still work. the color reference will only affect other dd's on your page, if you have any. So simple.. see if this works for you.
In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003
Susannah, I tried it. I see that it allows me to change color of links on mouseover (also making the underline appear on mouseover).
Isn't there a way to create white-links-on-blue-background and blue-links-on-white-background ? I tried to do it using 'WHEN' but no luck. I guess I will use a different coloring scheme.
Thx,
WebFOCUS 5.3.3 MRE - Solaris - Sun Web Server - Weblogic
You can use custom CSS CLASSes to dynamically style report items as well. I will try to come up with an example that includes hyperlinks.
Here's an example:
TABLE FILE CAR PRINT COUNTRY CAR ON TABLE SET HTMLCSS ON ON TABLE HOLD FORMAT HTMTABLE ON TABLE SET STYLE * TYPE=REPORT, STYLE=BOLD, COLOR=GREEN,$ TYPE=DATA, CLASS='ONE', WHEN=COUNTRY EQ 'ENGLAND',$ TYPE=DATA, CLASS='TWO', WHEN=COUNTRY EQ 'ITALY',$ ENDSTYLE END -RUN -HTMLFORM BEGIN < HTML > < STYLE > .ONE {background-color:#000080;color:#ffffff} .TWO {background-color:#ffffff;color:#000080} < / STYLE > !IBI.FIL.HOLD; < / HTML > -HTMLFORM END
Thanks!
Mickey
FOCUS/WebFOCUS 1990 - 2011
Posts: 995 | Location: Gaithersburg, MD, USA | Registered: May 07, 2003
The tricky part here is that when you use CLASS= in the FOCUS Stylesheet, it assigns the CLASS attribute to the TD, not the A. there fore you need to adjust the CSS to indicate that you want specific styling for all A that are contained within TDs that have a CLASS of ONE, for example. Hence the need to prefix the a:hover, a:active with the TD.ONE in the CSS.
I hope this makes sense. LEt me know if you have questions.
Thanks!
Mickey
FOCUS/WebFOCUS 1990 - 2011
Posts: 995 | Location: Gaithersburg, MD, USA | Registered: May 07, 2003
I thought I would post the complete example just to make it easy.
TABLE FILE CAR PRINT COUNTRY CAR ON TABLE SET HTMLCSS ON ON TABLE HOLD FORMAT HTMTABLE ON TABLE SET STYLE * TYPE=REPORT, STYLE=BOLD, COLOR=GREEN,$ TYPE=DATA, CLASS='ONE', FOCEXEC=CARFEX1, WHEN=COUNTRY EQ 'ENGLAND',$ TYPE=DATA, CLASS='TWO', FOCEXEC=CARFEX2, WHEN=COUNTRY EQ 'ITALY',$ ENDSTYLE END -RUN -HTMLFORM BEGIN < HTML > < STYLE > A {color:#999999; text-decoration:NONE} TD.ONE a:hover, a:active{ color:#6699cc; text-decoration:underline} TD.TWO A:hover {background-color:#ffffff;color:#800000} < / STYLE > !IBI.FIL.HOLD; < / HTML > -HTMLFORM END
Thanks!
Mickey
FOCUS/WebFOCUS 1990 - 2011
Posts: 995 | Location: Gaithersburg, MD, USA | Registered: May 07, 2003
ah. that's just the syntax we were looking for. thanks mickey.
mickey, i tried it and can't make your example work? SCRATCH! i got it working... back to thanks, mickeyThis message has been edited. Last edited by: susannah,
In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003
Susannah, the code works. Perhaps you forgot to remove the blanks in the html tags.
TABLE FILE CAR PRINT COUNTRY CAR ON TABLE SET HTMLCSS ON ON TABLE HOLD FORMAT HTMTABLE ON TABLE SET STYLE * TYPE=REPORT, STYLE=BOLD, COLOR=GREEN,$ TYPE=DATA, CLASS='ONE', FOCEXEC=CARFEX1, WHEN=COUNTRY EQ 'ENGLAND',$ TYPE=DATA, CLASS='TWO', FOCEXEC=CARFEX2, WHEN=COUNTRY EQ 'ITALY',$ ENDSTYLE END -RUN -HTMLFORM BEGIN <HTML> <STYLE> A {color:#999999; text-decoration:NONE} TD.ONE a:hover, a:active{ color:#6699cc; text-decoration:underline} TD.TWO A:hover {background-color:#ffffff;color:#800000} </STYLE> !IBI.FIL.HOLD; </HTML> -HTMLFORM 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
I see that 'ENGLAND' links are now in gray color. Is there a way now to make the background of those lines to blue ? I tried it with webfocus's BACKCOLOR and also with CSS's background-color on 'A','TD.ONE'.
Thx
WebFOCUS 5.3.3 MRE - Solaris - Sun Web Server - Weblogic
Try this new example. I think it might have all you need.
TABLE FILE CAR PRINT CAR RCOST DCOST BY COUNTRY SUBTOTAL AS ' ON TABLE SET HTMLCSS ON ON TABLE HOLD FORMAT HTMTABLE ON TABLE SET STYLE * TYPE=REPORT, STYLE=BOLD, COLOR=GREEN,$ TYPE=DATA, CLASS='TWO', COLUMN=RCOST, FOCEXEC=CARFEX2,$ TYPE=DATA, CLASS='TWO', COLUMN=DCOST, FOCEXEC=CARFEX2,$ TYPE=SUBTOTAL, BACKCOLOR=NAVY, COLOR=WHITE,$ TYPE=SUBTOTAL, COLUMN=RCOST, CLASS='ONE', FOCEXEC=CARFEX1,$ TYPE=SUBTOTAL, COLUMN=DCOST, CLASS='ONE', FOCEXEC=CARFEX1,$ ENDSTYLE END -RUN -HTMLFORM BEGIN <HTML> <STYLE> A:visited {color:#999999} TD.ONE {background-color:#000080} TD.ONE a:link {color:#ffffff; text-decoration:NONE} TD.ONE a:hover {color:#ffff00; text-decoration:underline} TD.ONE a:active{color:#6699cc; text-decoration:underline} TD.TWO a:link {color:#000080; text-decoration:NONE} TD.TWO a:hover {color:#800000; text-decoration:underline} TD.TWO a:active{color:#6699cc; text-decoration:underline} </STYLE> !IBI.FIL.HOLD; </HTML> -HTMLFORM END
In reference to my previous post:
The reason why you need to control the background color in the CSS instead of in the WebFOCUS Stylesheet is because when WebFOCUS creates the HTML TABLE it can only put one CLASS=value in the TD code for any given cell. Doing a global 'TYPE=DATA, BACKCOLOR=NAVY' is overwritten for the cells for which we specifically apply a CLASS setting.
Thanks!
Mickey
FOCUS/WebFOCUS 1990 - 2011
Posts: 995 | Location: Gaithersburg, MD, USA | Registered: May 07, 2003
Make sure you clear the history of your browser to see the full effects of the new example I posted. It will show all links that have been visited as gray. If you clear the history you should see all the proper colors before clicking on a link.
Thanks!
Mickey
FOCUS/WebFOCUS 1990 - 2011
Posts: 995 | Location: Gaithersburg, MD, USA | Registered: May 07, 2003
Mickey, Francis & Susannah, thank you all for the help. It worked great. I will start introducing CSS into my code. Till now I had been putting it off. The follg shows the style I settled on.
TABLE FILE CAR
PRINT CAR AS 'Car' RCOST AS 'Retail Cost' DCOST AS 'Dealer Cost'
BY COUNTRY AS 'Country'
ON TABLE SET PAGE-NUM NOLEAD
ON TABLE SET HTMLCSS ON
ON TABLE SUMMARIZE
ON TABLE HOLD FORMAT HTMTABLE
ON TABLE SET STYLE *
TYPE=REPORT,COLOR=BLACK,FONT='ARIAL',SIZE=9,$
TYPE=TITLE,CLASS='W_ON_B',FOCEXEC=CARFEX1,$
TYPE=GRANDTOTAL,CLASS='W_ON_B',FOCEXEC=CARFEX1,$
TYPE=DATA,CLASS='B_ON_W',FOCEXEC=CARFEX1,$
ENDSTYLE
END
-RUN
-HTMLFORM BEGIN
<HTML>
<STYLE>
TABLE { border-collapse:collapse; border-left: 1.00pt SOLID #000000;
border-right: 1.00pt SOLID #000000;}
TD { border-top: 1.00pt SOLID #000000; border-bottom: 1.00pt SOLID #000000;
border-right: 1.00pt SOLID #000000; }
A:visited {color:#999999}
TD { vertical-align:top; padding-left:6pt; padding-right:6pt; }
TD.W_ON_B {background-color:#0000ff}
TD.W_ON_B a:link {color:#ffffff; text-decoration:NONE}
TD.W_ON_B a:hover {color:#ffff00; text-decoration:underline}
TD.W_ON_B a:active {color:#6699cc; text-decoration:underline}
TD.B_ON_W a:link {color:#000080; text-decoration:NONE}
TD.B_ON_W a:hover {color:#cc0033; text-decoration:underline}
TD.B_ON_W a:active {color:#6699cc; text-decoration:underline}
</STYLE>
!IBI.FIL.HOLD;
</HTML>
-HTMLFORM END
This message has been edited. Last edited by: Kerry,
WebFOCUS 5.3.3 MRE - Solaris - Sun Web Server - Weblogic