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     [SOLVED] Inline CSS formatting

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Inline CSS formatting
 Login/Join
 
Gold member
posted
Below is a sketch of my real code. Note that the lines starting with "&USE_OR_NOT" are displayed conditionally based whether or not USE_OR_NOT is set equal to FOC_NONE higher in the code. this means although it appears "Thanks for the order!" as it line 12, it actually depends on how many of the "&USE_OR_NOT" lines are used during execution.

The problem: I want
1. "Thanks for the order!" to always be bold regardless of the number lines in the final report, and
2. "Thanks for the order!" to always be 2 lines below the list of products (I don't want it in the footer).


I cannot use

TYPE=TABHEADING,
LINE=12,
STYLE=BOLD,
$

because "Thanks for the order!" will not alwsys be at line 12.

And I tried " < b >Thanks for the order!< / b >" which seems to fail.

Is there any way to embed CSS in a character string?

Thanks,
George


SAMPLE CODE
===========

TABLE FILE TEST_TABLE
PRINT
FIELD1 NOPRINT
BY FIELD2 NOPRINT
ON TABLE SUBHEAD
"""" "
"Dear Sir(s) your order for the following is ready"
" "
"&USE_OR_NOT -- "&USE_OR_NOT -- "&USE_OR_NOT -- "&USE_OR_NOT -- " "
"Thanks for the order!"
"Sincerely"
ON TABLE SET PAGE-NUM OFF
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT PDF &XOPEN
ON TABLE SET STYLE *
UNITS=IN,
PAGESIZE='Letter',
LEFTMARGIN=1.000000,
RIGHTMARGIN=1.000000,
TOPMARGIN=0.000000,
BOTTOMMARGIN=0.000000,
SQUEEZE=ON,
ORIENTATION=PORTRAIT,
WRAP=ON,
$
TYPE=REPORT,
FONT='TIMES NEW ROMAN',
SIZE=11,
JUSTIFY=LEFT,
STYLE=NORMAL,
WRAP=ON,
$
TYPE=TABHEADING,
LINE=12,
STYLE=BOLD,
$
ENDSTYLE
END

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


WebFOCUS 7.6
Windows, All Outputs
 
Posts: 70 | Registered: April 27, 2012Report This Post
Expert
posted Hide Post
In the future, please put code between code tags (using that </> button) - the code you posted doesn't look great.

Try using a computed field, which you can style using the OBJECT=FIELD tag, and further qualify it with an ITEM tag (skip two lines by using </2):

TABLE FILE CAR
PRINT
COMPUTE THANKS/A100 = 'Thanks for the order!'; NOPRINT

COUNTRY NOPRINT
BY COUNTRY NOPRINT
ON TABLE SUBHEAD
""
""
"Dear Sir(s) your order for the following is ready"
" "
-*"&USE_OR_NOT -- 
-*"&USE_OR_NOT -- "&USE_OR_NOT ---* "&USE_OR_NOT -- " "
"</2<THANKS"
"Sincerely"

ON TABLE SET STYLE *
TYPE=TABHEADING, OBJECT=FIELD, ITEM=1, STYLE=BOLD, $
ENDSTYLE
END


Syntax: How to Identify an Embedded Field in a Heading or Footing
TYPE=type, [LINE=line_#], OBJECT=FIELD, [ITEM=item #]
where:

type
Identifies a type of heading or footing. Select from HEADING, FOOTING, TABHEADING, TABFOOTING, SUBHEAD, or SUBFOOT. For details, see Identifying a Heading or Footing.

line_#
Identifies a line by its position in the heading or footing. You only need to include the LINE attribute if you have a multi-line heading or footing.

item_#
Identifies an item by its position in a line.

If you have more than one embedded field in a heading or footing, you must specify the field you wish to format by giving the item number. Count items from left to right. Do not include text fields in the count. You do not need to specify the item number if there is only one embedded field in the heading or footing.

Note: BORDER options are not supported on specific ITEMS in a HEADING, FOOTING, SUBHEAD, SUBFOOT.


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
Gold member
posted Hide Post
Thanks, I'll give it a try.


WebFOCUS 7.6
Windows, All Outputs
 
Posts: 70 | Registered: April 27, 2012Report This Post
Gold member
posted Hide Post
Thanks.

I tried this and it appears to work only if there is only ONE embedded computed field in the heading or footing. Otherwise, additional embedded fields, in the first item position, could be affected unintentionally since no line numbers or item numbers are specified.

Would you agree?

Thanks again.


WebFOCUS 7.6
Windows, All Outputs
 
Posts: 70 | Registered: April 27, 2012Report This Post
Expert
posted Hide Post
Yes, you would have to know which computed field it is and adjust ITEM=n, or make sure it is the first one.


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     [SOLVED] Inline CSS formatting

Copyright © 1996-2020 Information Builders