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] object=text bolding in HTML/CSS

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED] object=text bolding in HTML/CSS
 Login/Join
 
Gold member
posted
How do I bold the text in my subhead (not the data, only the labels - ie "Vendor, Commodity Code, Part # only).

Does this not work for HTML? It does nothing.
TYPE=subhead, BY=ITEM_NUMBER, LINE=1, OBJECT=TEXT, STYLE=+BOLD, $

My table file:


TABLE FILE FINAL
ON TABLE SET PAGE NOPAGE
ON TABLE SET HTMLCSS ON
ON TABLE SET JSURL pur020j.js
ON TABLE SET CSSURL pur020j.css

ON TABLE SUBHEAD
"PR Item Listing"
"Item # <+8>Description"  
PRINT 
	RECEIVED_CODE AS '' IN 5 
	RECEIVED_DATE AS '' IN 30
	RECEIVED_QUANTITY AS '' IN 40
	BY PR_NUMBER NOPRINT
	BY ORDER_SEQUENCE NOPRINT
	BY ITEM_NUMBER NOPRINT
SUBHEAD
"<ITEM_NUMBER <ITEM_DESCRIPTION <ITEM_LINE_1 <ITEM_DIV "
"<PR_NUMBER Status: <ORDER_STATUS UT Subacct: <ITEM_UT_ACCOUNT "
"Vendor:<MANUFACTURER Commodity Code: <COMMODITY_CODE Part #: <PART_NUMBER Software: <SOFTWARE_FLAG "
"Unit Price: <UNIT_PRICE Unit of Measure: <UNIT_OF_MEASURE "
"Date Quantity "
SUBFOOT
" <DEND> "


Define:
ORDER_DATA_ID/A50='OI_'||PR_NUMBER||'_'||OI_NUMBER;
ITEM_LINE_1/A200 = '<a href="javascript:toggleTable('''||ORDER_DATA_ID||''');">(+)</a>';
ITEM_DIV/A200 = '<div id="'||ORDER_DATA_ID||'" CLASS="DN">';
DEND/A6 = '</div>';

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


WebFOCUS 7.6.3 | Solaris 10 | Excel, PDF
 
Posts: 46 | Location: Austin TX | Registered: June 04, 2009Report This Post
Virtuoso
posted Hide Post
quote:
Does this not work for HTML? It does nothing.
TYPE=subhead, BY=ITEM_NUMBER, LINE=1, OBJECT=TEXT, STYLE=+BOLD, $


It does work. It is the syntax you are using in you report request which does not seem "right".

Please see a working example using the CAR table:
TABLE FILE CAR
PRINT 
	RETAIL_COST AS '' 
	SALES AS '' 
BY COUNTRY NOPRINT
BY CAR NOPRINT
ON TABLE SET HTMLCSS ON
ON TABLE SET PAGE NOPAGE
ON TABLE SUBHEAD
"Item Listing"
ON CAR SUBHEAD
"Country:<COUNTRY Car: <CAR"
ON TABLE SET STYLE *
TYPE=SUBHEAD, BY=CAR, OBJECT=TEXT, STYLE=BOLD, $
TYPE=TABHEADING, OBJECT=TEXT, STYLE=BOLD, $
ENDSTYLE
END


Regards,
Neftali.

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



Prod/Dev: WF Server 8008/Win 2008 - WF Client 8008/Win 2008 - Dev. Studio: 8008/Windows 7 - DBMS: Oracle 11g Rel 2
Test: Dev. Studio 8008 /Windows 7 (Local) Output:HTML, EXL2K.
 
Posts: 1533 | Registered: August 12, 2005Report This Post
Gold member
posted Hide Post
Sorry, but I don't see any issue with my syntax that would cause it.

Just for kicks, I tried that formatting like the example you provided and there is still no bolding.
PRINT 
	RECEIVED_CODE AS '' IN 5 
	RECEIVED_DATE AS '' IN 30
	RECEIVED_QUANTITY AS '' IN 40
	BY PR_NUMBER NOPRINT
	BY ORDER_SEQUENCE NOPRINT
	BY ITEM_NUMBER NOPRINT
ON TABLE SET PAGE NOPAGE
ON TABLE SET HTMLCSS ON
ON TABLE SET JSURL pur020j.js
ON TABLE SET CSSURL pur020j.css
ON TABLE SUBHEAD
"PR Item Listing"
"Item # Description"  
ON ITEM_NUMBER SUBHEAD
"<ITEM_NUMBER <ITEM_DESCRIPTION <ITEM_LINE_1 "
"<PR_NUMBER Status: <ORDER_STATUS UT Subacct: <ITEM_UT_ACCOUNT "
"Vendor:<MANUFACTURER Commodity Code: <COMMODITY_CODE Part #: <PART_NUMBER Software: <SOFTWARE_FLAG "
"Unit Price: <UNIT_PRICE Unit of Measure: <UNIT_OF_MEASURE "
"Date Quantity "
ON ITEM_NUMBER SUBFOOT
" <DEND> "
ON TABLE SET STYLE *
TYPE=SUBHEAD, BY=ITEM_NUMBER, OBJECT=TEXT, STYLE=BOLD, $
TYPE=TABHEADING, OBJECT=TEXT, STYLE=BOLD, $
ENDSTYLE


Since ITEM_LINE_1 initiates a DIV and DEND closes said DIV, I thought the DIV was throwing off the style, but there still is no bolding when I remove those two tags (and thus removing the DIV).

It works (both versions of the code, seen in this post and my original) if object=text is removed. But that bolds everything.

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


WebFOCUS 7.6.3 | Solaris 10 | Excel, PDF
 
Posts: 46 | Location: Austin TX | Registered: June 04, 2009Report This Post
Expert
posted Hide Post
Probably the problem; this will override WF styling...

Do you know what this is doing/styling?

ON TABLE SET CSSURL pur020j.css


Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
 
Posts: 1972 | Location: Centennial, CO | Registered: January 31, 2006Report This Post
Virtuoso
posted Hide Post
I think Tom's observation is right on the spot!

The HTML code generated by the working example I sent you shows the following internal CSS definitions:

<STYLE TYPE="text/css">
<!--
TD { vertical-align:top; }
.x2 { font-weight:bold; }  <-- Table sub-heading
.x3 { font-weight:bold; }  <-- ON CAR subheading
-->
</STYLE>


And this is what the actual elements look like:

<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0 WIDTH="100%">
<TR>
<TD class='x2'>  <-- Table Subheading
Item Listing</TD>
</TR>
...
...
<TR>
<TD>
<span class='x3'>Country:</span>  <-- Text item 1 in subheading
ENGLAND
<span class='x3'> Car: </span>    <-- Text item 2 in subheading
JAGUAR</TD>
</TR>


Both the style and span elements are consistent with the stylesheet definitions and if you ran the example as provided (without the additional external CSSURL declaration) you should be able to observe that all text elements are in bold style as needed.

quote:

Sorry, but I don't see any issue with my syntax that would cause it.


You're right. My comment about syntax was not accurate; I meant to say that something in the code was not "right" and was affecting the stylesheet effects and I think Tom just found it!

Regards,
- Neftali.



Prod/Dev: WF Server 8008/Win 2008 - WF Client 8008/Win 2008 - Dev. Studio: 8008/Windows 7 - DBMS: Oracle 11g Rel 2
Test: Dev. Studio 8008 /Windows 7 (Local) Output:HTML, EXL2K.
 
Posts: 1533 | Registered: August 12, 2005Report This Post
Gold member
posted Hide Post
It appears that
SET STYLEMODE = FIXED
kills that style line.
When I turned stylemode back off, the styling came through for the bolding. But my DIV's no longer work (placed all of the data into appropriate tables, tr's, td's, etc). I need them to hide/display data like an accordion report. Hmmmmmmm.

Since it doesn't appear I can have both my DIVs and bolding, what else can I do? I've tried putting things into define fields, IE:
ORDER_DATA_ID/A50='OI_'||PR_NUMBER||'_'||OI_NUMBER;
ITEM_LINE_1/A200 = '<a href="javascript:toggleTable('''||ORDER_DATA_ID||''');">(+)</a>';

-* THESE...
ORDER_LINE_1/A500V = '<div id="'||ORDER_DATA_ID||'" CLASS="DN">[b]PR:[/b][b]Status:[/b][b]UT Subacct:[/b]';
ORDER_LINE_2/A500V = '[b]Vendor: [/b]'|| MANUFACTURER ||' [b]Commodity Code:[/b]'|| COMMODITY_CODEB ||' [b]Part #: [/b]'|| PART_NUMBER ||' [b]Software: [/b]'|| SOFTWARE_FLAG ||'';
ORDER_LINE_3/A500 = '[b]Unit Price:[/b]  [b]Unit of Measure:[/b]  ';
ORDER_LINE_4/A500 = ''||ITEM_LINK||' [b]Date[/b]  [b]Quantity[/b]<div id="OR_'||PR_NUMBER||'_'||OI_NUMBER||'" class="DN">';

And then referring to those fields in a subhead, IE:
SUBHEAD
"<ITEM_NUMBER <ITEM_DESCRIPTION <ITEM_LINE_1
"<ORDER_LINE_1 "
"<ORDER_LINE_2 "
"<ORDER_LINE_3 "
"<ORDER_LINE_4 "

But the report does odd things. For example I'm looking some sample data from my database for an order, which should have 93 items. Depending on very minuscule changes to those define fields, such as adding a space or sometimes adding references to database fields, the report messes up and gives different numbers of items for the same report that should have 93. It's as if some of the
tags are being misplaced. Sometimes for that same order, I can get for example, 80 items, and if I click on the expand for item #80, it expands 13 orders instead of 1. Any ideas why this is happening?

EDIT: Now that I think about it, I don't expect you guys to be able to troubleshoot this issue since I can't post the data. Perhaps you might be able to suggest something for me to look into, as I might be missing something. No worries if not. Thanks.

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


WebFOCUS 7.6.3 | Solaris 10 | Excel, PDF
 
Posts: 46 | Location: Austin TX | Registered: June 04, 2009Report This Post
Expert
posted Hide Post
quote:
But the report does odd things


If you aren't already doing this, the first thing I would do is separate the data retrieval from the report. Two steps: first get the data and put it in a hold file, then create the report - this should avoid problems because of "very minuscule changes".

Because you appear to be using a lot of embedded HTML in your "report" you may want to consider outputting a pure HTML HOLD file instead of a report - generate your own tables, tr and td. Here's an old working example I have:

(Code cleaned up slightly)

-* File buildtree.fex

SET HOLDLIST   = PRINTONLY
SET HOLDFORMAT = ALPHA
-RUN

DEFINE FILE CAR
TCNT/I9 WITH CAR = TCNT + 1;
END
-RUN

TABLE FILE CAR
PRINT
COMPUTE ACNT/A1 = IF COUNTRY EQ LAST COUNTRY THEN 'N' ELSE 'Y'; NOPRINT
COMPUTE TNODEH/A400 = IF ACNT EQ 'Y' THEN '</div></td></tr></table>' ||
  '<table><tr><td><a onclick="Toggle(this)">' ||
  '<img src="/approot/baseapp/plus.gif" style="margin-right: 6px;" alt="" />' || COUNTRY ||
  '</a><div style="display: none;">'
ELSE ''; AS ''
COMPUTE LEAF/A400 =
  '<table><tr><td>' ||
  '<img src="/approot/baseapp/leaf.gif" style="margin-left: 18px; margin-right: 6px;" alt="" />' || CAR ||
  '</td></tr></table>'; AS ''

BY COUNTRY NOPRINT

ON TABLE HOLD AS FILEA
END
-RUN

-HTMLFORM BEGIN
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<title>buildtree</title>
<script type="text/javascript">

// ---------------------------------------------
// --- Name:    Easy DHTML Treeview           --
// --- Author:  D.D. de Kerf                  --
// --- Version: 0.2          Date: 13-6-2001  --
// ---------------------------------------------
function Toggle(node)
{
// Unfold the branch if it isn't visible
if (node.nextSibling.style.display == 'none')
  {
  // Change the image (if there is an image)
  if (node.childNodes.length > 0)
    {
    if (node.childNodes.item(0).nodeName == "IMG")
      {
      node.childNodes.item(0).src = "/approot/baseapp/minus.gif";
      }
    }

  node.nextSibling.style.display = 'block';
  }
// Collapse the branch if it is visible
else
  {
  // Change the image (if there is an image)
  if (node.childNodes.length > 0)
    {
    if (node.childNodes.item(0).nodeName == "IMG")
      {
      node.childNodes.item(0).src = "/approot/baseapp/plus.gif";
      }
    }

  node.nextSibling.style.display = 'none';
  }
}
</script>

<style type="text/css">
body
{
font-family: "Trebuchet MS", sans-serif;
font-weight: normal;
}
td
{
font-size: 12px;
}

table { border-collapse: collapse; }

</style>
</head>

<body>

<table><tr><td><div>

!IBI.FIL.FILEA;

</div></td></tr></table>

</body>
</html>
-HTMLFORM END

To get this to work properly, you need to download these three images:





Put everything in the baseapp folder.

This message has been edited. Last edited by: Francis Mariani,


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
  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] object=text bolding in HTML/CSS

Copyright © 1996-2020 Information Builders