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     [SOLVED] Event on a report cell

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Event on a report cell
 Login/Join
 
Member
posted
Hi,

I'm new on this forum. I'm french and I'm sorry for my bad english. I use DS since 3 month.

I've a HTML report with webfocus style sheet. I put color on the last total row to indentifie differents cases. Colors are chosen according to data values. If the data value is 0 or 1 then the blue color is attributed to the cell, else if it's included between 2 and 4, the orange color is attributed to the cell, in the other cases the red color is attributed.

I'd like to put a legend table to give the users the correspondance between values and colors. I want to know if is it possible to put a mouseover event on the cell to display the legend that is currently in an HTML page ?

My HTML report is in a frame on the same page.

Thanks for your help

Clément

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


7.1.4
Windows XP 5.1 with SP2
Excel et HTML output formats.
.
 
Posts: 10 | Location: France | Registered: October 28, 2008Report This Post
Virtuoso
posted Hide Post
Bonjour Clement

Welcome to this WebFocus forum.

Yes that is possible, but first let me try to help you to help yourself.

On the top of the posts, you see a kind of tab which holds things like Go, New etc.
I hope you understand the English word Search....
If you click on it you get a small window...type Mouseover and hit the button "GO"

Now you will get several items that holds the word "mouseover".

Second suggestion:
if you post some code to explain your question with an example, please put between these red carrets
</>
or use
[code]
[/code] to obtain the same result.

If you create an example, try to use one of the databases like CAR, everyone can copy our code and play with it. That's better than posting some code with fields we do not know or understand (French...).




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
Thanks Franck.

I understand what you mean about the search method, I've already used it before posting my message. I've implemented it and it works, but it adds a new column in my report and I don't want it ! Over the mouseover works on a picture while in my case, this only data !

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


7.1.4
Windows XP 5.1 with SP2
Excel et HTML output formats.
.
 
Posts: 10 | Location: France | Registered: October 28, 2008Report This Post
Master
posted Hide Post
You could do it in a subfoot (TABFOOTING in this case).
ON TABLE SUBFOOT
"<+0>Blue <+0> 0 - 1"
"<+0>Orange <+0> 2 - 4"
"<+0>Red <+0> > 4"
...

in your stylesheet
TYPE=TABFOOTING,
LINE=1, ITEM=1, COLOR=BLUE,
$
TYPE=TABFOOTING,
LINE=2, ITEM=1, COLOR=ORANGE,
$
TYPE=TABFOOTING,
LINE=3, ITEM=1, COLOR=RED,
$


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
<JG>
posted
Clement

As you are on 7.1.4 I would use a variation on the pop up description functionality.

Normally this will just display the description text associated with a column in the master file
however you can quite easily get it to work with items such as computed and defined column titles
and with texts used for row totals

Create a graphic image in .gif or jpeg format that contains your legend.
save this file to your apps folder.

your basic code would then look like this

 
SET POPUPDESC = ON
-HTMLFORM BEGIN
<SCRIPT TYPE="text/javascript">
var Total ="<img src=http://localhost:9090/approot/ibidemo/centurylogo.gif>";
</SCRIPT>
-HTMLFORM END
TABLE FILE CAR
PRINT
     DEALER_COST 
	 ACROSS MODEL
BY COUNTRY
BY CAR 
-* Note the following should be coded on 1 line
ON TABLE COLUMN-TOTAL AS '<span ONMOUSEOVER="IBI_popupDesc(Total)"; ONMOUSEOUT="IBI_killDesc()"><U>Total</U></span>' 

ON TABLE SET LINES 9999
ON TABLE SET PAGE-NUM OFF
ON TABLE PCHOLD FORMAT HTML
ON TABLE SET HTMLCSS ON
END
 
 
Report This Post
Member
posted Hide Post
Hi JG,

Your solution is closer to what I have in mind. I've already think to use a image but I don't know how can I find the link "http://localhost:8080/..."
And in your example, you put the mouse over event on a column total, in my case it's on a cell.
I'd like to use something style like :
TYPE=DATA,COLUMN=MODEL, JUSTIFY=CENTER, BACKCOLOR = RGB(204 204 204), WHEN=BRAND EQ 'Toyota',JAVASCRIPT=OnMouseOver(),$


7.1.4
Windows XP 5.1 with SP2
Excel et HTML output formats.
.
 
Posts: 10 | Location: France | Registered: October 28, 2008Report This Post
Member
posted Hide Post
Hi Pat,

I try your solution but it doesn't work, the result is absolutly the same than before.


7.1.4
Windows XP 5.1 with SP2
Excel et HTML output formats.
.
 
Posts: 10 | Location: France | Registered: October 28, 2008Report This Post
<JG>
posted
Clement,

All you need to do is re-define the column.
If its a BY do it in a define
If its a PRINT or SUM column do it in a compute
If its numeric you will also have to convert it to alpha and justify the output;

 
SET POPUPDESC = ON
-HTMLFORM BEGIN
<SCRIPT TYPE="text/javascript">
var Total ="<img src=/approot/ibidemo/centurylogo.gif>";
</SCRIPT>
-HTMLFORM END
DEFINE FILE CAR
MODELA/A150= IF CAR EQ 'TOYOTA'
              THEN 
             '<span ONMOUSEOVER="IBI_popupDesc(Total)"; ONMOUSEOUT="IBI_killDesc()"><U>' ||MODEL||'</U></span>' 
              ELSE MODEL;
END
TABLE FILE CAR
PRINT
COMPUTE     DEALER_COSTA/A150= IF DEALER_COST LE 5000
     THEN '<span ONMOUSEOVER="IBI_popupDesc(Total)"; ONMOUSEOUT="IBI_killDesc()"><U>' 
        ||FTOA(DEALER_COST,'(D12)','A20')||'</U></span>' ELSE FTOA(DEALER_COST,'(D12)','A20');
FLAG/A1=IF DEALER_COST LE 5000 THEN 'Y' ELSE 'N'; NOPRINT

BY COUNTRY
BY CAR 
BY MODELA
ON TABLE SET LINES 9999
ON TABLE SET PAGE-NUM OFF
ON TABLE PCHOLD FORMAT HTML
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
TYPE=DATA,COLUMN=MODELA, JUSTIFY=CENTER, BACKCOLOR = RGB(204 204 204), WHEN=CAR EQ 'TOYOTA',$
TYPE=DATA,COLUMN=DEALER_COSTA, JUSTIFY=RIGHT,$
TYPE=DATA,COLUMN=DEALER_COSTA, JUSTIFY=RIGHT, BACKCOLOR = RGB(204 204 204), WHEN=FLAG EQ 'Y',$
ENDSTYLE
END
 
 
Report This Post
Member
posted Hide Post
JG,

It's ok for the popup, but it opens it at the top of the report while my cell with the event is at the bottom !! So we can't see the picture !

And I can't see the picture because I don't know its url !!!


7.1.4
Windows XP 5.1 with SP2
Excel et HTML output formats.
.
 
Posts: 10 | Location: France | Registered: October 28, 2008Report This Post
<JG>
posted
Clement

I am afraid you have hit a Microsoft IE bug.

In Opera and Chrome it's perfect in Firefox the positioning is fine but the image flickers.

IE 6 and 7 screw up the positioning when you scroll the page.

The controlling javascript is \ibi_html\javaassist\ibi\html\js\ibipopupdesc.js

You can also change the background colour and borders for the popup here

Perhaps one of the forums better js people could fix it.
It's because the script does not calculate the scrolling offset for IE.

You must know the URL if you have coded it.

The file needs to be in a folder such as /ibi/apps/baseapp
in which case the relative URL will be /approot/baseapp/image_name.gif
 
Report This Post
Member
posted Hide Post
I try an other solution. Instead of the onmouser event, I use a link.

It's work but I don't know how to put off the scrollbar, menubar and how to put width and height !

TYPE=DATA,COLUMN=STAB, JUSTIFY=CENTER,WHEN=COTATION EQ 'Value',FOCEXEC=app/myfex.fex,TARGET='_blank',$

I've try an another solution, that is to call javascript like this
TYPE=DATA,COLUMN=STAB, JUSTIFY=CENTER,WHEN=COTATION EQ 'Value',JAVASCRIPT=legende(),$

function legende() {
var vFeatures = "menubar=no,toolbar=no,status=no,resizable=no,scrollbars=no,width=440,height=100";
wfReport = window.open("http://www.google.fr/", "wfReport",vFeatures);
wfReport.focus();
}

But I don't know what URL to replace http://www.google.fr/ !!!
The URL looks like : "http://localhost:8080/ibi_apps/WFServlet?IBIMR_action=MR_RUN_FEX&IBIMR_sub_action=MR_STD_REPORT&IBIMR_fex=app%2Fmypage.htm&IBIMR_folder=%23nouveaudossi&IBIMR_domain=wsj00002%2Fwsj00002.htm&IBIMR_Random=0.8111758994203008"

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


7.1.4
Windows XP 5.1 with SP2
Excel et HTML output formats.
.
 
Posts: 10 | Location: France | Registered: October 28, 2008Report This Post
<JG>
posted
Clement


Your URL is what I have already told you. I assume you know what an apps folder is.

OK. You do not understand.

What is the physical location where your image is stored. It should be something like /ibi/apps/foldername/filename .gif on UNIX

From that I might be able to tell you

This is the basic code that you need

DEFINE FILE CAR
HELP/A1=IF DEALER_COST LE 5000 THEN 'Y' ELSE 'N';
END
TABLE FILE CAR
PRINT
DEALER_COST
HELP NOPRINT
ACROSS MODEL
BY COUNTRY
BY CAR

ON TABLE SET LINES 9999
ON TABLE SET PAGE-NUM OFF
ON TABLE HOLD AS H1 FORMAT HTML
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
TYPE=DATA,ACROSSCOLUMN=DEALER_COST,WHEN = HELP EQ 'Y', JAVASCRIPT=legende(),$
ENDSTYLE
END
-RUN
-HTMLFORM BEGIN

<script LANGUAGE="JavaScript">
function legende() {
window.open("http://www.google.fr/","help","menubar=0,toolbar=0,status=0,resizable=0,scrollbars=0,width=440,height=100");
}



!IBI.FIL.H1;
-HTMLFORM END
 
Report This Post
Expert
posted Hide Post
Clement,
i have another approach..works just fine in IE.
i place a legend KEY table on top of my html output.
here's how:
my fex makes an html output table which i call "MYTAB", ON TABLE HOLD AS MYTAB FORMAT HTMTABLE
I then use HTMLFORM BEGIN and END to display this output table
I then place a second output table with absolute positioning, and z-index 1 to make sure this KEY table appears on top of my output.

-HTMLFORM BEGIN
<head>
<title>InSeam:Price Break by delivery</title>
<style>
TABLE {border-collapse:collapse}
A {color:teal; text-decoration:underline}
a:hover, a:active{ color:#6699cc; text-decoration:underline}
</style>
<script>
defaultStatus="InSeam: Price Break by Delivery"
</script>
</head>
!IBI.FIL.MYTAB; 
<table border="0" cellpadding="0" cellspacing="0"
style="border-collapse: collapse;
font-family:MS Sans Serif; font-size:8.5pt;color:#4A484B;
position: absolute;left:  930; top: 400; z-index: 1   ">
<tr><td align=center ><u>K E Y</u> <br />% on break
<tr><td align=center style="padding-left: 0;background-color:RGB(255 225 225)" > 10%
<tr><td align=center style="padding-left: 0;background-color:RGB(255 200 200 )"> 20%
<tr><td align=center style="padding-left: 0;background-color:RGB(255 175 175) "> 30%
<tr><td align=center style="padding-left: 0;background-color:RGB(255 150 150 )"> 40%
<tr><td align=center style="padding-left: 0;background-color:RGB(255 125 125)"> 50%
<tr><td align=center style="padding-left: 0;background-color:RGB(255 100 100)"> 60%
<tr><td align=center style="padding-left: 0;background-color:RGB(255  75  75)"> 70%
<tr><td align=center style="padding-left: 0;background-color:RGB(255  50  50 )"> 80%
<tr><td align=center style="padding-left: 0;background-color:RGB(255  25  25)"> 90%
<tr><td align=center style="padding-left: 0;background-color:RGB(255  0  0)">100%
</table>
-HTMLFORM END

Bienvenue a Focal Point.
-S.




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
<JG>
posted
susannah

The problems are that the ledgend is static and scrolls off screen
as you scroll the window for a long or wide report,
also it is always visable when within the visable window which is not what Clement is looking for.
 
Report This Post
Member
posted Hide Post
JG,

Thanks for your basic code, but this is already that I've put and it works. My page opens like a popup, without the menubar, menustatus... and at the good size. That what I told you in my last message. The only problem I meet, is that I've a 404 error due to the URL ! I'm in relation with a responsable of my company, I hope he could tell me it.


7.1.4
Windows XP 5.1 with SP2
Excel et HTML output formats.
.
 
Posts: 10 | Location: France | Registered: October 28, 2008Report This Post
Expert
posted Hide Post
take a chill pill, john!
let Clement et.al. decide.




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

Sorry, but John is rigtht, I don't want the table appears all the time at the top of the report. I want to realise something that looks like a popup. The users will click on the link only if they need it !


7.1.4
Windows XP 5.1 with SP2
Excel et HTML output formats.
.
 
Posts: 10 | Location: France | Registered: October 28, 2008Report This Post
<JG>
posted
Disappointed Susannah, I don’t think that was a quite the appropriate response considering Clements stated need.
 
Report This Post
Expert
posted Hide Post
Salut Clément,

Here is an example of a mouseover. It uses the html "title" attribute.

-*-- Mouseover example using html title attribute -----------------------------

SET HOLDLIST=PRINTONLY
-RUN

TABLE FILE CAR
SUM
COMPUTE COLOUR_FLAG/A1 =
IF SALES GT 40000 THEN '4' ELSE
IF SALES GT 30000 THEN '3' ELSE
IF SALES GT 20000 THEN '2' ELSE
IF SALES GT 10000 THEN '1' ELSE
IF SALES EQ 0 THEN '0' ELSE
'9'; NOPRINT

COMPUTE COLOUR_TEXT/A20 =
IF SALES GT 40000 THEN 'Sales > 40,000' ELSE
IF SALES GT 30000 THEN 'Sales > 30,000' ELSE
IF SALES GT 20000 THEN 'Sales > 20,000' ELSE
IF SALES GT 10000 THEN 'Sales > 10,000' ELSE
IF SALES EQ 0 THEN 'Zero sales' ELSE
'Sales < 10,000'; NOPRINT

COMPUTE MOUSEOVER/A255 =
'<span style="cursor: default;" title=''' | COLOUR_TEXT | '''>' | COUNTRY | '</span>'; AS 'Country'

SALES     AS 'Sales'

BY COUNTRY  NOPRINT

ON TABLE SET STYLE *
TYPE=REPORT, FONT='ARIAL', SIZE=8, $
TYPE=DATA, BACKCOLOR=RED,    WHEN= COLOUR_FLAG EQ '0',$
TYPE=DATA, BACKCOLOR=GREEN,  WHEN= COLOUR_FLAG EQ '1', $
TYPE=DATA, BACKCOLOR=BLUE,   WHEN= COLOUR_FLAG EQ '2', $
TYPE=DATA, BACKCOLOR=ORANGE, WHEN= COLOUR_FLAG EQ '3', $
TYPE=DATA, BACKCOLOR=PINK,   WHEN= COLOUR_FLAG EQ '4', $
TYPE=DATA, BACKCOLOR=PURPLE, WHEN= COLOUR_FLAG EQ '9', $
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
Member
posted Hide Post
Hi,

I've got my URL now, it looks like :
"http://localhost:8080/ibi_apps/WFServlet?IBIMR_action=MR_RUN_FEX&IBIMR_sub_action=MR_STD_REPORT&IBIMR_fex=app%2Fmypage.htm&IBIMR_folder=%23nouveaudossi&IBIMR_domain=wsj00002%2Fwsj00002.htm&IBIMR_Random=0.8111758994203008"

but when I put it in the javascript function, it doesn't work ! Javascript returns the message :
Ligne :4232
Car :98
Erreur : Unterminated string constant
Code : 0
URL : http://localhost:8080/ibi_apps/WFServlet

It seems like the process actually fails right after the question mark.

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


7.1.4
Windows XP 5.1 with SP2
Excel et HTML output formats.
.
 
Posts: 10 | Location: France | Registered: October 28, 2008Report This Post
Expert
posted Hide Post
If you have an ampersand (&) embedded in the html/javascript part of a fex, it has to be followed by a pipe (|):

"http://localhost:8080/ibi_apps/WFServlet?IBIMR_action=MR_RUN_FEX&|IBIMR_sub_action=MR_STD_REPORT&|IBIMR_fex=app%2Fmypage.htm&|IBIMR_folder=%23nouveaudossi&|IBIMR_domain=wsj00002%2Fwsj00002.htm&|IBIMR_Random=0.8111758994203008"


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
Member
posted Hide Post
Thanks a lot Francis !! It works !
Problem solved !

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


7.1.4
Windows XP 5.1 with SP2
Excel et HTML output formats.
.
 
Posts: 10 | Location: France | Registered: October 28, 2008Report 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     [SOLVED] Event on a report cell

Copyright © 1996-2020 Information Builders