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 want to build up an HTML table and fill it with images (key performance indicators) from several procedures. I want to turn off the grid when reusing the image from the holdfile. Here's an example of the code:
TABLE FILE EMPDATA
SUM
COMPUTE STOPLIGHT/A150 = IF SALARY GT 100000 THEN '<IMG SRC="http://demos.ibi.com/approot/ibicentury/r1.gif">'
ELSE IF SALARY LT 100000 THEN '<IMG SRC="http://demos.ibi.com/approot/ibicentury/g1.gif">'
ELSE '<SRC="http://demos.ibi.com/approot/ibicentury/y1.gif">'; AS ''
ON TABLE HOLD AS KPI3 FORMAT HTMTABLE
ON TABLE SET STYLE *
TYPE=REPORT,
GRID=ON,
$
ENDSTYLE
END
-HTMLFORM BEGIN
<TABLE heigth="1" width="45%" BORDER="0" CELLPADDING="0" CELLSPACING="0" bgcolor="#C57FB2" >
<TR>
<td height="8"> </td>
</TR>
<TR>
<TD align="left" valign="middle" Height="25"><FONT COLOR="white" FACE="arial"><strong>Test with and without borders</strong></FONT></TD>
</TR>
<TR>
<td height="8"> </td>
</TR>
<TR>
<TD bgcolor="#E8CCE0" valign="top" align="center" heigth="1" border="0" CELLPADDING="0">!IBI.FIL.KPI3;</TD>
</TR>
<TR>
<TD bgcolor="#E8CCE0" valign="top" align="center" heigth="0">!IBI.FIL.KPI3;</TD>
</TR>
</TABLE>
-HTMLFORM END
Notice that this format is exactly what I want, except for the grid around the image. Turning the setting SET GRID=OFF will work for the image, but then some CSS is created by WebFOCUS which will show the images with 3 empty rows underneath. I look for both: a table with images underneath without any spacing and no borders. How do I do this?
Thanks, MarcelThis message has been edited. Last edited by: Kerry,
If you are only going to include URL references to images in the HTMTABLE, you could try using a different output format such as WP. This will write just to contents of the fields to a file. This eliminates the additional HTML code wrapped arund the URLs to the images. I'm not sure if this will work for you but it was just a thought.
TABLE FILE EMPDATA SUM COMPUTE STOPLIGHT/A150 = IF SALARY GT 100000 THEN '<IMG SRC="http://demos.ibi.com/approot/ibicentury/r1.gif">' ELSE IF SALARY LT 100000 THEN '<IMG SRC="http://demos.ibi.com/approot/ibicentury/g1.gif">' ELSE '<SRC="http://demos.ibi.com/approot/ibicentury/y1.gif">'; AS '' ON TABLE HOLD AS KPI3 FORMAT WP
ON TABLE SET STYLE * TYPE=REPORT, GRID=OFF, $
Thanks!
Mickey
FOCUS/WebFOCUS 1990 - 2011
Posts: 995 | Location: Gaithersburg, MD, USA | Registered: May 07, 2003
I had that thought as well that PAGE was putting the extra space in but did not test for it. I tested your code AS IS wiht WF713 and it still adds two blank lines before the image tag. The NOLEAD setting seems to be a problem in WF713.
Thanks!
Mickey
FOCUS/WebFOCUS 1990 - 2011
Posts: 995 | Location: Gaithersburg, MD, USA | Registered: May 07, 2003
Mickey hit the problem you are having and it is one that always happens, we forget that WF HTMTABLE output still contains the HTML wrapper to portray the output in an HTML TABLE arrangement. To let you take control of the HTML that you will be including in your final HTMLFORM use a non-HTML output format like WP as Mickey suggests. Then the only inclusion that you will get from your output is the IMG tag that you want.
BTW you might like to check the occurences of "heigth" for spelling (I notice Francis and Mickey reproduced them in theirs as well )
You also do not require the border="0" on your TD tags either as the border="0" on the TABLE tag suffices in your example.
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, 2004
One approach I have used when WF gets in the way(!) of what I want to achieve, is to take the data into a SAVE file and use a repeat loop and -READ:
TABLE FILE EMPDATA
SUM SALARY
COMPUTE STOPLIGHT/A150 =
IF SALARY GT 100000 THEN '<img src="../approot/ibidemo/r1.gif">' ELSE
IF SALARY LT 50000 THEN '<img src="../approot/ibidemo/g1.gif">' ELSE
'<img src="../approot/ibidemo/y1.gif">'; AS ''
BY LASTNAME
ON TABLE SAVE
END
-RUN
-HTMLFORM BEGIN
<html>
<head>
<style>
body {background-color:gray;}
table {background-color:#ddd;}
.title {background-color:#202020;color:white;}
</style>
<head>
<table width="45%">
<tr>
<td class="title" colspan="3">Without borders</td>
</tr>
-REPEAT LOOP &LINES TIMES
-READ SAVE &NAME.A15 &SAL.12 &IMG.150
<tr><td>!IBI.AMP.NAME;</td><td>!IBI.AMP.SAL;</td><td>!IBI.AMP.IMG;</td></tr>
-LOOP
</table>
</html>
-HTMLFORM END
This allows you to put in all the formatting you want with CSS.
Alan. WF 7.705/8.007
Posts: 1451 | Location: Portugal | Registered: February 07, 2007
thanx for your quick responses! All above worked for me. Strange thing with the NOLEAD setting, indeed it worked before! Cool thing with the Dialogue Manager, Alan. I should try more with it.
NOLEAD is tricky...you think you've turned it on just right, and then it seems to get turned back off if you have any other SET PAGE features anywhere in the fex. It is, indeed, buggy
In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003