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
THEAD Tag [solved]
 Login/Join
 
Guru
posted
Is there a way to get WebFOCUS to put out THEAD tags on HTMTABLE format?

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


Release: WebFOCUS 7.6.8
OS: Windows
Output formats: HTML, PDF, Excel, csv
 
Posts: 256 | Registered: July 21, 2008Report This Post
Expert
posted Hide Post
Wouldn't it be lovely? The answer is, unfortunately, WF does not create THEAD and TBODY tags. But you can fool it:

DEFINE FILE CAR
THEADS/A8 = '<THEAD>';
THEADE/A8 = '</THEAD>';
END
TABLE FILE CAR
PRINT
*
HEADING
"<THEADS"
"WEBFOCUS REPORT"
"<THEADE"
WHERE READLIMIT EQ 100
WHERE RECORDLIMIT EQ 100
ON TABLE SET PAGE NOLEAD
ON TABLE SET STYLESHEET *
FONT='ARIAL', SIZE=8, GRID=OFF, $
ENDSTYLE

ON TABLE HOLD AS H001 FORMAT HTMTABLE
END
-RUN

-HTMLFORM BEGIN
<STYLE>
THEAD { COLOR: RED; }
</STYLE>
!IBI.FIL.H001;
-HTMLFORM 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
Guru
posted Hide Post
Neat idea. I guess my needs are too different to make this work for me - I actually want my TH's which are generated for the Titles to be inside of the THEAD...


Release: WebFOCUS 7.6.8
OS: Windows
Output formats: HTML, PDF, Excel, csv
 
Posts: 256 | Registered: July 21, 2008Report This Post
Virtuoso
posted Hide Post
Not quite so neat -- the THEAD and /THEAD tags will be inproperly nested: WF encloses each element of the HEADING a TD /TD pair. Standard browsers may not mind, but if the THEAD is needed for an accessibility agent, it may complain.

To include the column titles in the span of the THEAD, you could play with sticking the /THEAD in a conditional subhead, conditioned to appear only at top of page. That way, the column-title lines are sandwiched between the THEAD in the HEADING, and the /THEAD in the SUBHEAD. -- But you'll still have the improper nesting issue.


- Jack Gross
WF through 8.1.05
 
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005Report This Post
Expert
posted Hide Post
Sorry Jack.


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
Silver Member
posted Hide Post
Here is a sample on how to add THEAD's, TH's and what ever else you want to add to your table using javascript......

TABLE FILE CAR                                  
PRINT COUNTRY CAR MODEL
WHERE SEAT EQ 2
ON TABLE HOLD AS MYTHING FORMAT HTMTABLE
END 
-RUN                                                
-HTMLFORM BEGIN                                     
<HTML>                                              
<HEAD>                                              
<SCRIPT  LANGUAGE=JAVASCRIPT>                       
function header()
{                     
var doIt = document.getElementsByTagName("TR");
var fixedHTML = "<TABLE BORDER CELLPADDING=1>";
	for (var i = 0; i < doIt.length; i++)
	{
		if (i)
		{
			if (new String(doIt[i].innerHTML).indexOf("<TD vAlign=bottom>") >= 0)
			{
			var theHTML = new String(doIt[2].innerHTML);
			var newHTML = theHTML.replace(/<TD vAlign=bottom>/g, "<TH>");
			newHTML = newHTML.replace(/<\/TD>/g, "</TH>");
			fixedHTML += "<THEAD><TR>"+newHTML+"</TR></THEAD>";
			}
			else if (new String(doIt[i].innerHTML).indexOf("PAGE 1") >= 0) fixedHTML += "";
			else fixedHTML += "<TR>"+doIt[i].innerHTML+"</TR>";
		}
	}
	fixedHTML += "</TABLE>";
document.getElementById("sample").innerHTML = fixedHTML;
}                                                   
</SCRIPT>                                           
</HEAD>                                             
<BODY onload="header()" id="sample">                                              
 !IBI.FIL.MYTHING;                                 
</BODY>                                             
</HTML>                                             


7.6.6 Mainframe
7.6.4 Web Focus
Windows

 
Posts: 45 | Location: Gaffney SC | Registered: March 30, 2007Report This Post
Guru
posted Hide Post
I ended up doing it the Javascript as well with the following snippet of code:
 
 var tHead = table.createTHead();
 var oTR = tHead.insertRow();
 var titles = table.getElementsByTagName('th');

 for(var x = 0; x < titles.length; x++)
 {
    var oTH = titles[x];
    oTR.appendChild(oTH);
 }
 table.deleteRow(1);

 


Release: WebFOCUS 7.6.8
OS: Windows
Output formats: HTML, PDF, Excel, csv
 
Posts: 256 | Registered: July 21, 2008Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic


Copyright © 1996-2020 Information Builders