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.



Read-Only Read-Only Topic
Go
Search
Notify
Tools
Removing grid
 Login/Join
 
<Marcel Naumann>
posted
Hello all,

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,
Marcel

This message has been edited. Last edited by: Kerry,
 
Report This Post
Expert
posted Hide Post
Marcel,

Put your code between
[code] 
[/code]

tags so we can see the image code in the compute statements. If you don't already have it, add border=0 to the image code.


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
Expert
posted Hide Post
Your image code should be
<IMG  SRC="http://demos.ibi.com/approot/ibicentury/r1.gif" border=0>

although now I'm not sure if this will solve the problem.


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
<Marcel Naumann>
posted
Oops,

I didn't realise that there's a WF server parsing my request. Smiler
the BORDER syntax did not resolve, unfortunately.

TABLE FILE EMPDATA
SUM
     COMPUTE STOPLIGHT/A150 = IF SALARY GT 100000 THEN '<IMG  SRC="http://demos.ibi.com/approot/ibicentury/r1.gif" border="0">'
  ELSE IF SALARY LT 100000 THEN '<IMG  SRC="http://demos.ibi.com/approot/ibicentury/g1.gif" border="0">'
  ELSE '<SRC="http://demos.ibi.com/approot/ibicentury/y1.gif" border="0">'; 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 
 
Report This Post
Virtuoso
posted Hide Post
Marcel,

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, 2003Report This Post
Virtuoso
posted Hide Post
The following seems to work as well:

Please note the additions of HTML code in BOLDFACE:

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
<HTML>
<STYLE>
TABLE {border:0px}
TD {border:0px}
</STYLE>
<BODY>

<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>
</BODY>
</HTML>

-HTMLFORM END


Thanks!

Mickey

FOCUS/WebFOCUS 1990 - 2011
 
Posts: 995 | Location: Gaithersburg, MD, USA | Registered: May 07, 2003Report This Post
Expert
posted Hide Post
Will this be closer to what you need:

I'm not sure if you want the "PAGE 1" text to appear twice, but SET PAGE NOLEAD removes the text and the blank cells.

TABLE FILE EMPDATA
SUM
COMPUTE STOPLIGHT/A150 =
IF SALARY GT 100000 THEN '<IMG  SRC="HTTP://DEMOS.IBI.COM/APPROOT/IBICENTURY/R1.GIF" BORDER="0">' ELSE
IF SALARY LT 100000 THEN '<IMG  SRC="HTTP://DEMOS.IBI.COM/APPROOT/IBICENTURY/G1.GIF" BORDER="0">' ELSE
                         '<SRC="HTTP://DEMOS.IBI.COM/APPROOT/IBICENTURY/Y1.GIF" BORDER="0">'; AS ''
ON TABLE HOLD AS KPI3 FORMAT HTMTABLE
ON TABLE SET PAGE NOLEAD
ON TABLE SET STYLE *
TYPE=REPORT, GRID=OFF, $
ENDSTYLE
END
-RUN

-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


Result:


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
Virtuoso
posted Hide Post
Francis,

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, 2003Report This Post
Expert
posted Hide Post
We go through hoops to do something simple and it gets broken in the next release!


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

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 Wink)

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, 2004Report This Post
Virtuoso
posted Hide Post
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, 2007Report This Post
<Marcel Naumann>
posted
quote:
NOLEAD

Hi all,

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.

Best regards,
Marcel
 
Report This Post
Expert
posted Hide Post
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, 2003Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic


Copyright © 1996-2020 Information Builders