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     [CLOSED] TABLE ID and CLASS in HTML

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED] TABLE ID and CLASS in HTML
 Login/Join
 
Gold member
posted
Can some tell me how to create an ID for a webfocus generated html table?

When I run a fex with format HTML and view source i see the Table structure.
  

<TABLE
 <TR>
<TD>
STORE_NUMBER</TD>
<TD>
DIVISION</TD>
<TD>
REGION</TD>
<TD>
DISTRICT</TD>
<TD>
DIVISION</TD>
<TD>
REGION</TD>

<TD>
DISTRICT</TD>
<TD>
DIVISION</TD>
<TD>
REGION</TD>
<TD ALIGN=RIGHT VALIGN=BOTTOM>
DISTRICT</TD>
</TR>
<TR>
<TD ALIGN=RIGHT>
0071</TD>

<TD ALIGN=RIGHT>
1</TD>
<TD ALIGN=RIGHT 
7</TD>
<TD ALIGN=RIGHT>
50</TD>
<TD ALIGN=RIGHT>
1</TD>
<TD ALIGN=RIGHT>
7</TD>
<TD ALIGN=RIGHT>
50</TD>

<TD ALIGN=RIGHT>
1</TD>
<TD ALIGN=RIGHT>
7</TD>
<TD ALIGN=RIGHT>
50</TD>
</TR>
</TABLE>


I need WebFOCUS to generate an ID and Class for my table like.

[CODE]
<TABLE id="fp" class="b">

 <TR>
<TD>
STORE_NUMBER</TD>
<TD>
DIVISION</TD>
<TD>
REGION</TD>
<TD>
DISTRICT</TD>
<TD>
DIVISION</TD>
<TD>
REGION</TD>

<TD>
DISTRICT</TD>
<TD>
DIVISION</TD>
<TD>
REGION</TD>
<TD ALIGN=RIGHT VALIGN=BOTTOM>
DISTRICT</TD>
</TR>
<TR>
<TD ALIGN=RIGHT>
0071</TD>

<TD ALIGN=RIGHT>
1</TD>
<TD ALIGN=RIGHT 
7</TD>
<TD ALIGN=RIGHT>
50</TD>
<TD ALIGN=RIGHT>
1</TD>
<TD ALIGN=RIGHT>
7</TD>
<TD ALIGN=RIGHT>
50</TD>

<TD ALIGN=RIGHT>
1</TD>
<TD ALIGN=RIGHT>
7</TD>
<TD ALIGN=RIGHT>
50</TD>
</TR>
</TABLE>




Please advice.

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


WF: 7.6.8
OS/Platform: Windows, Unix
 
Posts: 55 | Registered: May 25, 2010Report This Post
Platinum Member
posted Hide Post
Hi,

You can hold the HTML output and embed it in a HTMLFORM:
  
TABLE FILE CAR
PRINT
*

ON TABLE HOLD AS HLD FORMAT HTMTABLE
END
-HTMLFORM BEGIN
<HTML>
<TABLE ID=FIRST >
!IBI.FIL.HLD;
</TABLE>
</HTML>
-HTMLFORM END
-EXIT



OR if you want more control over the components in the HTML table create your own tags in the TABLE request:

  
TABLE FILE CAR
PRINT
COMPUTE V_LENGTH/D5= LENGTH;NOPRINT
COMPUTE V_WIDTH/D5 = WIDTH;NOPRINT
COMPUTE V_HEIGHT/D5 = HEIGHT;NOPRINT
COMPUTE V_TOT_DIFF/D20 = RETAIL_COST - DEALER_COST;NOPRINT
COMPUTE V_TEMPCOUNT/D20 = IF COUNTRY NE LAST COUNTRY THEN 1 ELSE V_TEMPCOUNT + 1;NOPRINT
COMPUTE V_COUNTALPHA/A20 = TRIM('L', EDIT(V_TEMPCOUNT), 20, '0', 1, V_COUNTALPHA);NOPRINT
COMPUTE V_ID/A40 = IF COUNTRY EQ LAST COUNTRY THEN EDIT(COUNTRY,'9$99') || V_COUNTALPHA ELSE EDIT(COUNTRY,'9$99');NOPRINT
COMPUTE TEXT/A3000 =  '<TR ID=' || V_ID || ' style=" FONT-SIZE: 8pt; FONT-FAMILY: Arial;" > <TD  align=center class=rptData1 bgcolor="DarkGray";  style= "FONT-WEIGHT: bold;">' |  COUNTRY || '</TD> <TD class=rptData1 bgcolor="DarkGray"; >' || CAR || '</TD> <TD  class=rptData1 bgcolor="DarkGray"; >' || MODEL || '</TD>  <TD class=rptData1 align=center >' || FTOA(V_LENGTH,'(D5)','A100V')|| '</TD> <TD class=rptData1 align=center >' || FTOA(V_WIDTH,'(D5)','A100V')|| '</TD> <TD class=rptData1 align=center >' || FTOA(V_HEIGHT,'(D5)','A100V') || '</TD> <TD class=rptData1 align=center >' || FTOA(RETAIL_COST, '(D20M)','A100V') || '</TD> <TD class=rptData1 align=center >' || FTOA(DEALER_COST, '(D20M)','A100V') || '</TD> <TD class=rptData1 align=center >' || FTOA(V_TOT_DIFF, '(D20M)','A100V') || '</TD> </TR>';
ON TABLE SET HOLDLIST PRINTONLY
ON TABLE HOLD AS CAR1 FORMAT ALPHA
END
-HTMLFORM BEGIN
<HTML>
<TABLE id=first class=whatever>
!IBI.FIL.CAR1;
</TABLE>
</HTML>
-HTMLFORM END
-EXIT




thanks
Sashanka


WF 7.7.03/Windows/HTML,PDF,EXL
POC/local Dev Studio 7.7.03 & 7.6.11
 
Posts: 103 | Registered: June 12, 2009Report This Post
Gold member
posted Hide Post
My Table is a dynamically genarated one and the number of rows always varies, so I will not be able the create my own tags...



And when using HTLTABLE

 
-HTMLFORM BEGIN
<HTML>
<TABLE ID=FIRST >
!IBI.FIL.HLD;
</TABLE>
</HTML>
-HTMLFORM END
-EXIT




 <TABLE ID=FIRST > 

will be overridden by
 <TABLE 

from html table.


WF: 7.6.8
OS/Platform: Windows, Unix
 
Posts: 55 | Registered: May 25, 2010Report This Post
Platinum Member
posted Hide Post
Hi,

Your custom TABLE tag in the HTMLFORM will not be overwritten by the WF genereated one - WF table tag will be embedded in custom tag so you can control the parent tag with the id/class/JS as per your req.

And for the tags created in the COMPUTE/Define - num of rows returned should not be a concern -we are creating the tags for the columns. Only thing is the hold file size may increase with no of rows...since it is a HTML report I assume it will return reasonable no of rows.


thanks
Sashanka


WF 7.7.03/Windows/HTML,PDF,EXL
POC/local Dev Studio 7.7.03 & 7.6.11
 
Posts: 103 | Registered: June 12, 2009Report 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     [CLOSED] TABLE ID and CLASS in HTML

Copyright © 1996-2020 Information Builders