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 apply CSS to a drilldown anchor tag?

Read-Only Read-Only Topic
Go
Search
Notify
Tools
how to apply CSS to a drilldown anchor tag?
 Login/Join
 
Expert
posted
I want to apply several different styles to different anchor tags for different drilldowns, and i can't seem to style the anchor tag in css with a class attribute, i can only apply 1 anchor style to all anchors...yuck.

A CLASS applied to the TYPE=HEADING,ITEM=2,FOCEXEC=(...),CLASS=whatever,$
only applies to the TD tag, not to the anchor.
Specifying
.whatever {...}
and/or
a.whatever {...}
has no effect.
Specifying
a {...}
does work, but that means the same formatting for every type of link in a report, which is no good at all.

I've tinkered till i'm nuts, Could anyone offer a suggestion? TIA.




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

This is a tricky one mainly because IB (in their infinite wisdom) do not place class values within their anchor tags upon report generation.

The only way I can see to get around this is to build your anchor tag in a variable, compute or define and then include that in your heading. Not what you want to hear but unfortunately .....

-* File css_example.fex
-SET &MRE_RANDx = RDUNIF('D12.2') * 65536;
-DEFAULT &MRE_RAND = &MRE_RANDx
DEFINE FILE CAR
  heading_a/A200 = '<A class=whatever2 HREF="/ibi_apps/WFServlet?IBIF_webapp=/ibi_apps&|IBIC_server=
      EDASERVE&|IBIWF_msgviewer=OFF&|IBIAPP_app=baseapp&|IBIF_ex=css_example&|CLICKED_ON=
      &|MRE_RAND=&MRE_RANDx"> on the forum</A>';
END
TABLE FILE CAR
 SUM RCOST AS 'Cost to End Buyer'
OVER DCOST AS 'Cost to Dealer'
OVER COMPUTE Profit/D9 = RCOST - DCOST; AS 'Profit'
BY COUNTRY
BY CAR
BY MODEL
HEADING
"Test for <+0> Susannah <+0> <heading_a"
ON TABLE SET PAGE-NUM OFF
ON TABLE SET LINES 9999
ON TABLE HOLD AS MYTABLE FORMAT HTMTABLE
ON TABLE SET STYLE *
TYPE=REPORT, CLASS=TABLE, $
TYPE=HEADING, ITEM=2, CLASS=whatever1, FOCEXEC=css_example(MRE_RAND=&MRE_RANDx), $
ENDSTYLE
END
-RUN

-HTMLFORM BEGIN
<html>
<head>
<title>CSS Example</title>
<style>
 .TABLE {font-family:Tahoma; font-size:8pt; border-style: NONE;}
 .whatever1 {font-family:Tahoma; font-size:8pt; font-weight:bold; color:#00ffff; background-color:#ffffff;}
 .whatever2 {font-family:Tahoma; font-size:8pt; font-weight:bold; color:#ff0000; background-color:#ffffff;}
</style>
</head>
<body>
<INPUT type=hidden value=!IBI.AMP.MRE_RAND; name="IBIMR_random" id="IBIMR_random">
!IBI.FIL.MYTABLE;
</body>
</html>
-HTMLFORM END


Have a look at the source and you'll see no class within the "A HREF="

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
 
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004Report This Post
Expert
posted Hide Post
Susannah,

The following will work only if you have

HEADALIGN=BODY

as this creates separate TD's for each item in the Heading line.

-* File anchor_test.fex

TABLE FILE CAR
SUM
SALES
BY COUNTRY
HEADING
"ANCHOR1 <+0> ANCHOR2 <+0> ANCHOR3"
ON TABLE SET STYLE *
TYPE=HEADING, HEADALIGN=BODY, $
TYPE=HEADING, ITEM=1, CLASS=link1, STYLE=BOLD, FOCEXEC=ANCHOR_TEST, $
TYPE=HEADING, ITEM=2, CLASS=link2, STYLE=BOLD, FOCEXEC=ANCHOR_TEST, $
TYPE=HEADING, ITEM=3, CLASS=link3, STYLE=BOLD, FOCEXEC=ANCHOR_TEST, $
ENDSTYLE
ON TABLE HOLD AS HREP001 FORMAT HTMTABLE
END
-RUN

-HTMLFORM BEGIN
<HTML>
<HEAD>
<STYLE>
.link1 A { color: red;    text-decoration: none; }
.link2 A { color: green;  text-decoration: none; }
.link3 A { color: orange; text-decoration: none; }
</STYLE>
</HEAD>
<BODY>
!IBI.FIL.HREP001;
-HTMLFORM END
<BODY>
</HTML>


The
 .link1 A 
syntax styles anchors inside elements that have been tagged with .link1.

Cheers and have a good weekend.


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
  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 apply CSS to a drilldown anchor tag?

Copyright © 1996-2020 Information Builders