Focal Point
[SOLVED] Link Color in Drilldowns

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/4187001986

January 25, 2018, 10:06 AM
Doug
[SOLVED] Link Color in Drilldowns
This is what I used: HYPERLINK-COLOR=RGB(3 1 5) ... I like that number.

I Want The Drilldown Link Text To Be: COLOR=BLACK, SIZE=8, STYLE=-UNDERLINE+BOLD.

What am I missing?

TABLE FILE CAR
"I Want The Drilldown Link Text To Be COLOR=BLACK, SIZE=8, STYLE=-UNDERLINE+BOLD"
SUM DCOST RCOST
BY COUNTRY BY CAR BY MODEL BY TYPE BY SEATS
ON TABLE SET STYLE *
INCLUDE = IBFS:/EDA/EDASERVE/_EDAHOME/ETC/enwarm.sty,$
GRID=OFF, BORDER=OFF, FONT=ARIAL, SIZE=9, STYLE=NORMAL,$
TYPE=HEADING, FONT=ARIAL, SIZE=10, STYLE=ITALIC+BOLD,$
TYPE=DATA, COLUMN=COUNTRY, ALT='I Want Black Text Here.', TARGET='_blank',
COLOR=BLACK, SIZE=8, STYLE=-UNDERLINE+BOLD,
FOCEXEC=IBFS:/WFC/Repository/Vendor/Doug/ScrathPad.fex(ThisNumber=9 ThisValue='Doug'), $
END

This message has been edited. Last edited by: Doug,




   In FOCUS Since 1983 ~ from FOCUS to WebFOCUS.
   Current: WebFOCUS Administrator at FIS Worldpay | 8204, 8206
January 25, 2018, 11:02 AM
Wep5622
You're styling the text that the drilldown is on, not the drilldown itself.

I don't think you can do that with FOCUS styling, but you can with CSS by applying a style to the 'a'-tag.

If you want to limit the styling to only drilldown styles on the COUNTRY column, then it's possible to add CLASS=COUNTRY to the FOCUS style and use that as a class in the CSS stylesheet.
ON TABLE SET CSSURL='IBFS:/WFC/Repository/Vendor/Doug/doug.css'
...
TYPE=DATA, COLUMN=COUNTRY, CLASS=COUNTRY, , ALT='I Want Black Text Here.', TARGET='_blank', FOCEXEC=IBFS:/WFC/Repository/Vendor/Doug/ScrathPad.fex(ThisNumber=9 ThisValue='Doug'), $
END

And in doug.css:
a.COUNTRY, td.COUNTRY a { color: black, text-decoration: none, font-weight: bold }
a:visited.COUNTRY, td.COUNTRY a:visited { color: silver, text-decoration: none, font-weight: bold }
a:active.COUNTRY, td.COUNTRY a:active { color: lime, text-decoration: none, font-weight: bold }



WebFOCUS 8.1.03, Windows 7-64/2008-64, IBM DB2/400, Oracle 11g & RDB, MS SQL-Server 2005, SAP, PostgreSQL 11, Output: HTML, PDF, Excel 2010
: Member of User Group Benelux :
January 25, 2018, 02:18 PM
Doug
Thanks Wep5622, However, it didn't work.

I get: Error / Error Pre-parsing focexec... ... So, what's wrong with it?

Here's the full 3 line content of IBFS:/WFC/Repository/Vendor/Doug/html_dd.cs.

a.COUNTRY, td.COUNTRY a { color: black, text-decoration: none, font-weight: bold }
a:visited.COUNTRY, td.COUNTRY a:visited { color: silver, text-decoration: none, font-weight: bold }
a:active.COUNTRY, td.COUNTRY a:active { color: lime, text-decoration: none, font-weight: bold }


And my modified code:
TABLE FILE CAR
"I Want The Drilldown Link Text To Be COLOR=BLACK, SIZE=8, STYLE=-UNDERLINE+BOLD"
SUM DCOST RCOST
BY COUNTRY BY CAR BY MODEL BY TYPE BY SEATS
ON TABLE SET CSSURL='IBFS:/WFC/Repository/Vendor/Doug/html_dd.css'
ON TABLE SET STYLE *
INCLUDE = IBFS:/EDA/EDASERVE/_EDAHOME/ETC/enwarm.sty,$
GRID=OFF, BORDER=OFF, FONT=ARIAL, SIZE=9, STYLE=NORMAL,$
TYPE=HEADING, FONT=ARIAL, SIZE=10, STYLE=ITALIC+BOLD,$
TYPE=DATA, COLUMN=COUNTRY, ALT='I Want Black Text Here.', TARGET='_blank',
COLOR=BLACK, SIZE=8, STYLE=-UNDERLINE+BOLD,
FOCEXEC=IBFS:/WFC/Repository/Vendor/Doug/ScrathPad.fex(ThisNumber=9 ThisValue='Doug'), $
END

January 25, 2018, 02:30 PM
Francis Mariani
Try removing the quotes in the SET CSSURL statement.


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
January 25, 2018, 02:37 PM
Doug
That sounded so good considering that there's no quotes around the fex name. But, it's still spinning (trying to parse it?) after 5 minutes. Frowner

And, weird, there's no signs of any agents running...
January 25, 2018, 02:48 PM
Francis Mariani
Sorry, I should have mentioned I live in the old world: my CSS files are located where they logically should be - on the web server, in one of the approot folders.


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
January 25, 2018, 05:14 PM
Doug
I'll move it there.And try again. How would I address it down there?

PS: Ne need to apologize for living in the old world. We all started someplace... PS: Ne need to apologize for living in the old world. We all started someplace...
January 25, 2018, 05:24 PM
Doug
Are we sure that I don't need anything else besides those three lines?

Here's some 'old world' code from a website I did back in the late 80s where it's 'wrapped' in <STYLE> tags:
<style>
a:link 	  {text-decoration:none;color:gold;background:none}
a:visited {text-decoration:none;color:gold;background:none}
a:active  {text-decoration:none;color:gold;background:none}
a:hover   {text-decoration:none;color:silver;background:none}
</style>

This message has been edited. Last edited by: Kellyne,
January 26, 2018, 05:25 AM
Wep5622
quote:
Originally posted by Doug:
And my modified code:
ON TABLE SET CSSURL='IBFS:/WFC/Repository/Vendor/Doug/html_dd.css'


It should read (without the equals sign):
ON TABLE SET CSSURL 'IBFS:/WFC/Repository/Vendor/Doug/html_dd.css'


Francis may be right that the CSS file needs to live on the webserver. We don't use the content repository, so all our code is on the reporting server without those IBFS paths, so I had to take a guess there Wink


WebFOCUS 8.1.03, Windows 7-64/2008-64, IBM DB2/400, Oracle 11g & RDB, MS SQL-Server 2005, SAP, PostgreSQL 11, Output: HTML, PDF, Excel 2010
: Member of User Group Benelux :
January 26, 2018, 06:58 PM
Michael L Meagher
I am having a similar issue. I will report back when I get mine running.

One thing I noticed is that the syntax should be: ON TABLE SET CSSURL url, with no '=' between CSSURL and the url.


WebFOCUS 8.2.03 - Production
WebFOCUS 8.2.04 - Sand Box
Windows 2012 R2 Server
HTML, PDF, Excel
In FOCUS since 1980
January 26, 2018, 07:56 PM
Doug
Thanks Guys, Sorry for the delayed reply, this post got chopped and they fixed it.

So, Here's what I have now
TABLE FILE CAR
"I Want The Drilldown Link Text To Be COLOR=BLACK, SIZE=8, STYLE=-UNDERLINE+BOLD"
SUM DCOST RCOST
BY COUNTRY BY CAR BY MODEL BY TYPE BY SEATS
-* NG ON TABLE SET CSSURL=IBFS:/WFC/Repository/Vendor/Doug/html_dd.css
ON TABLE SET CSSURL IBFS:/WFC/Repository/Vendor/Doug/html_dd.css
ON TABLE SET STYLE *
INCLUDE = IBFS:/EDA/EDASERVE/_EDAHOME/ETC/enwarm.sty,$
-* NG INCLUDE = IBFS:/EDA/EDASERVE/Vendor/html_dd.css,$
GRID=OFF, BORDER=OFF, FONT=ARIAL, SIZE=9, STYLE=NORMAL,$
TYPE=HEADING, FONT=ARIAL, SIZE=10, STYLE=ITALIC+BOLD,$
TYPE=DATA, COLUMN=COUNTRY, ALT='I Want Black Text Here.', TARGET='_blank',
COLOR=BLACK, SIZE=8, STYLE=-UNDERLINE+BOLD,
FOCEXEC=IBFS:/WFC/Repository/Vendor/Doug/ScrathPad.fex(ThisNumber=9 ThisValue='Doug'), $
END

I have the css in the associated app, MRE domain, and web apps folders. Where SHOULD it reside and what addressing should I use?

Tony, BT I renoved that STYLE Much which I just added as another attempt to get it to work...
January 27, 2018, 03:01 AM
Chaudhary
we can write css code in fex file itself ,

TABLE FILE CAR
SUM
     CAR.BODY.DEALER_COST
     CAR.BODY.RETAIL_COST
BY  CAR.ORIGIN.COUNTRY
BY  CAR.COMP.CAR
BY  CAR.CARREC.MODEL
BY  CAR.BODY.BODYTYPE
BY  CAR.BODY.SEATS
HEADING
"I Want The Drilldown Link Text To Be COLOR=BLACK, SIZE=8, STYLE=-UNDERLINE+BOLD"
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT HTML
-*ON TABLE HTMLCSS ON
ON TABLE SET STYLE *
     INCLUDE = IBFS:/EDA/EDASERVE/_EDAHOME/ETC/enwarm.sty,
$
TYPE=REPORT,
     BORDER-TOP=OFF,
     BORDER-BOTTOM=OFF,
     BORDER-LEFT=OFF,
     BORDER-RIGHT=OFF,
     FONT='IBIDEFAULT',
     SIZE=9,
     STYLE=NORMAL,
$
TYPE=DATA,
     COLUMN=N1,
     SIZE=8,
     FOCEXEC=IBFS:/WFC/Repository/Vendor/Doug/ScrathPad.fex( \
     ThisNumber='9' \
     ThisValue='Doug' \
     ),
     ALT='I Want Black Text Here.',
          TARGET='_blank',
$
TYPE=HEADING,
     SIZE=10,
     STYLE=BOLD+ITALIC,
$
ENDSTYLE
END

-HTMLFORM BEGIN
<STYLE>
a { 
text-decoration: none !important;
color: black !important;
font-weight: bold !important;

}
</STYLE>
-HTMLFORM END  

This message has been edited. Last edited by: Chaudhary,


WF Production :- WF:8.0.0.4, 8.1.05 App-studio/Developer Studio(8.1.x) ,
8.2.0.1M , 8.2.0.2 (App-Studio8.2.x),
InfoAssist/+, InfoDiscovery
Output format:-AHTML, PDF, Excel, HTML
Platform:-Windows 7, 8,10
January 29, 2018, 01:56 AM
Chaudhary
In WF 8202 we can use HYPERLINK-COLOR Property,

 TYPE=REPORT, COLUMN = columnname,

HYPERLINK-COLOR=RGB(51 102 255), $

This message has been edited. Last edited by: Chaudhary,


WF Production :- WF:8.0.0.4, 8.1.05 App-studio/Developer Studio(8.1.x) ,
8.2.0.1M , 8.2.0.2 (App-Studio8.2.x),
InfoAssist/+, InfoDiscovery
Output format:-AHTML, PDF, Excel, HTML
Platform:-Windows 7, 8,10
January 29, 2018, 05:18 AM
Wep5622
TABLE FILE CAR
"I Want The Drilldown Link Text To Be COLOR=BLACK, SIZE=8, STYLE=-UNDERLINE+BOLD"
SUM DCOST RCOST
BY COUNTRY BY CAR BY MODEL BY TYPE BY SEATS
ON TABLE SET CSSURL IBFS:/WFC/Repository/Vendor/Doug/html_dd.css
ON TABLE SET STYLE *
INCLUDE = IBFS:/EDA/EDASERVE/_EDAHOME/ETC/enwarm.sty,$
GRID=OFF, BORDER=OFF, FONT=ARIAL, SIZE=9, STYLE=NORMAL,$
TYPE=HEADING, FONT=ARIAL, SIZE=10, STYLE=ITALIC+BOLD,$
TYPE=DATA, COLUMN=COUNTRY, ALT='I Want Black Text Here.', TARGET='_blank',
COLOR=BLACK, SIZE=8, STYLE=-UNDERLINE+BOLD,

CLASS=COUNTRY,

FOCEXEC=IBFS:/WFC/Repository/Vendor/Doug/ScrathPad.fex(ThisNumber=9 ThisValue='Doug'), $
END


Assuming that you're using the CSS snippet from my original reply, you are missing the reference to the CSS-class in the CSS file; I added that in the above snippet.

If you used the general snippet that applies styling to EVERY anchor tag in the report, then you don't need that.

If you used ChaudHary's styles, he implemented it as +UNDERLINE+BOLD, not -UNDERLINE+BOLD.

If the HTTP request for the CSS file does not return an error, then it should apply the styling. You can verify that in your browser using the console (F12) in the Network tab - most browsers these days have that. If all is well, the request for the CSS file returns a HTTP 200, but if the web-server can't find it you will see a HTTP 404, or a HTTP 401 if you don't have access to that particular file.


WebFOCUS 8.1.03, Windows 7-64/2008-64, IBM DB2/400, Oracle 11g & RDB, MS SQL-Server 2005, SAP, PostgreSQL 11, Output: HTML, PDF, Excel 2010
: Member of User Group Benelux :
January 29, 2018, 05:25 AM
Wep5622
quote:
Originally posted by Doug:
I'll move it there.And try again. How would I address it down there?


I'm not sure where your apps directory starts in that path, but on the webserver that's usually referred to as /approot.
If Doug is a directory directly in your approot, then the reference would be: /approot/Doug/html_dd.css


WebFOCUS 8.1.03, Windows 7-64/2008-64, IBM DB2/400, Oracle 11g & RDB, MS SQL-Server 2005, SAP, PostgreSQL 11, Output: HTML, PDF, Excel 2010
: Member of User Group Benelux :
January 29, 2018, 07:56 AM
Chaudhary
quote:
If you used ChaudHary's styles, he implemented it as +UNDERLINE+BOLD, not -UNDERLINE+BOLD.


Hi Wep5622,

i updated the style to -UNDERLINE+BOLD

This message has been edited. Last edited by: Chaudhary,


WF Production :- WF:8.0.0.4, 8.1.05 App-studio/Developer Studio(8.1.x) ,
8.2.0.1M , 8.2.0.2 (App-Studio8.2.x),
InfoAssist/+, InfoDiscovery
Output format:-AHTML, PDF, Excel, HTML
Platform:-Windows 7, 8,10
January 29, 2018, 08:42 AM
David M
I've done the following...slightly off black

COLOR=RGB(0 0 1), SIZE=8, STYLE=-UNDERLINE+BOLD,


WebFOCUS 8.1.05M, 8.2.02M
Windows, All Outputs
January 29, 2018, 09:13 AM
Greg G
setting HYPERLINK-COLOR=RGB(6 0 0) instead of color works - this is also being set in the enwarm.sty file to the blue color.

TABLE FILE CAR
"I Want The Drilldown Link Text To Be COLOR=BLACK, SIZE=8, STYLE=-UNDERLINE+BOLD"
SUM DCOST RCOST
BY COUNTRY BY CAR BY MODEL BY TYPE BY SEATS
ON TABLE SET STYLE *
INCLUDE = IBFS:/EDA/EDASERVE/_EDAHOME/ETC/enwarm.sty,$
GRID=OFF, BORDER=OFF, FONT=ARIAL, SIZE=9, STYLE=NORMAL,$
TYPE=HEADING, FONT=ARIAL, SIZE=10, STYLE=ITALIC+BOLD,$
TYPE=DATA, COLUMN=COUNTRY, ALT='I Want Black Text Here.', TARGET='_blank',
SIZE=8, HYPERLINK-COLOR=RGB(6 0 0),STYLE=-UNDERLINE+BOLD,
FOCEXEC=IBFS:/WFC/Repository/Vendor/Doug/ScrathPad.fex(ThisNumber=9 ThisValue='Doug'), $

END
January 29, 2018, 09:33 AM
Doug
Thanks All,

This is what I used:
quote:
HYPERLINK-COLOR=RGB(1 1 1)