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.
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> "
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,
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,
<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!
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:
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,
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