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] Word Break in Heading Element

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Word Break in Heading Element
 Login/Join
 
Guru
posted
Is it possible to have a Word Break in a Heading element...

HEADING
"PERIOD,1"

My reqmnt is to get Period in the first line and 1 in the Second line.

I cant go for Two seperate lines of Heading because, In Excel It will look Odd on Two Seperate cells. I want the Period
1 in the Same cell.

How to do this ?

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


Thanks,

Ramkumar.
WebFOCUS/Tableau
Webfocus 8 / 7.7.02
Unix, Windows
HTML/PDF/EXCEL/AHTML/XML/HTML5
 
Posts: 394 | Location: Chennai | Registered: December 02, 2009Report This Post
Virtuoso
posted Hide Post
I tried it like this:
DEFINE FILE CAR
BR/A4='<BR>';
END

TABLE FILE CAR
HEADING
"Heading<BR>LINE<BR>1"
SUM   SEATS
BY COUNTRY BY CAR
ON TABLE PCHOLD FORMAT EXL2K
END
Hope this helps ...


GamP

- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
 
Posts: 1961 | Location: Netherlands | Registered: September 25, 2007Report This Post
Guru
posted Hide Post
quote:
LINE
1


Hi Gamp,

Thank you very much for the Suggestion. But It does not work properly with Subheads....

DEFINE FILE CAR
BR/A4='<BR>';
END

TABLE FILE CAR
SUM   SEATS
BY COUNTRY BY CAR
ON COUNTRY SUBHEAD
"<+0>Hiii<+0>LINE<BR>1<+0>"
ON TABLE PCHOLD FORMAT EXL2K
ON TABLE SET STYLE *
     UNITS=IN,
     SQUEEZE=ON,
     ORIENTATION=LANDSCAPE,
$
TYPE=REPORT, HEADALIGN=BODY,  GRID=OFF,$

TYPE=SUBHEAD, BY=COUNTRY, LINE=1,  OBJECT=TEXT,     ITEM=1,     JUSTIFY=LEFT,   SIZE=10,  COLSPAN=1,STYLE=BOLD,$
TYPE=SUBHEAD, BY=COUNTRY, LINE=1,  OBJECT=TEXT,     ITEM=2,     COLOR = RED, JUSTIFY=LEFT,   SIZE=10,  COLSPAN=1,STYLE=BOLD,$
TYPE=SUBHEAD, BY=COUNTRY, LINE=1,  OBJECT=FIELD,     ITEM=2,     JUSTIFY=LEFT,   SIZE=10,  COLSPAN=1,STYLE=BOLD,$


END  


The Output comes something like below....





My Requirement is like Line and 1 should come in the same cell... One below other.... This is going to act as Column Title.

HEADALIGN=BODY, is the one that creates problem here....

any Clue on this ?


Thanks,

Ramkumar.
WebFOCUS/Tableau
Webfocus 8 / 7.7.02
Unix, Windows
HTML/PDF/EXCEL/AHTML/XML/HTML5
 
Posts: 394 | Location: Chennai | Registered: December 02, 2009Report This Post
<JG>
posted
quote:
HEADALIGN=BODY,

Nail on the head as they say.

For what you want, you need to use a template/macro to insert a formula into the cell
that looks something like "Line" & Chr(10) & " 1" (basically, type into the formula bar "text" Alt/CR "text")

Basically a lot of work for a minor cosmetic issue.

I vote for multi line.
 
Report This Post
Expert
posted Hide Post
Try this, though you will have to revise the style sheet:

-SET &ECHO=ALL;

-DEFAULT &OUTPUT = 'EXL2K';

DEFINE FILE CAR
LINE_BREAK/A11 = IF '&OUTPUT' EQ 'HTML' THEN 'LINE<br />1' ELSE 'LINE 1';
END
-RUN

TABLE FILE CAR
SUM
SEATS

BY COUNTRY 
BY CAR

ON COUNTRY SUBHEAD
"<+0>Hiii<+0><LINE_BREAK><+0>"

ON TABLE PCHOLD FORMAT &OUTPUT

ON TABLE SET STYLE *

UNITS=IN, SQUEEZE=ON, ORIENTATION=LANDSCAPE, $

TYPE=REPORT, HEADALIGN=BODY,  GRID=OFF,$

TYPE=SUBHEAD, BY=COUNTRY, LINE=1,  OBJECT=TEXT,     ITEM=1,     JUSTIFY=LEFT,   SIZE=10,  COLSPAN=1,STYLE=BOLD,$
TYPE=SUBHEAD, BY=COUNTRY, LINE=1,  OBJECT=TEXT,     ITEM=2,     COLOR = RED, JUSTIFY=LEFT,   SIZE=10,  COLSPAN=1,STYLE=BOLD,$
TYPE=SUBHEAD, BY=COUNTRY, LINE=1,  OBJECT=FIELD,     ITEM=2,     JUSTIFY=LEFT,   SIZE=10,  COLSPAN=1,STYLE=BOLD,$
END  
-RUN


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
Virtuoso
posted Hide Post
One option is to use a background color to eliminate the grid in the SUBHEAD. This allows you to place the SUBHEAD on two or more lines. Just a thought ...

TABLE FILE CAR
 SUM SEATS
 BY COUNTRY
 BY CAR
 ON COUNTRY SUBHEAD
  " <+0>LINE<+0> "
  "Hiii<+0>1<+0>Biii"
 ON TABLE SET STYLE *
  UNITS=IN, SQUEEZE=ON, ORIENTATION=LANDSCAPE, $
  TYPE=SUBHEAD, JUSTIFY=LEFT, SIZE=10, STYLE=BOLD, HEADALIGN=BODY, BACKCOLOR=LIGHT BLUE, $
  TYPE=SUBHEAD, OBJECT=TEXT, ITEM=2, COLOR=RED, $
 ENDSTYLE
 ON TABLE PCHOLD FORMAT EXL2K
END  


WebFOCUS 7.7.05
 
Posts: 1213 | Location: Seattle, Washington - USA | Registered: October 22, 2007Report This Post
Expert
posted Hide Post
How about going back to the traditional way of breaking a line.
</n>


TABLE FILE CAR
SUM   SEATS
BY COUNTRY BY CAR
ON COUNTRY SUBHEAD
"Hiii</1>LINE</1>"
ON TABLE PCHOLD FORMAT EXL2K
ON TABLE SET STYLE *
     UNITS=IN,
     SQUEEZE=ON,
     ORIENTATION=LANDSCAPE,
$
TYPE=REPORT, HEADALIGN=BODY,  GRID=OFF,$

TYPE=SUBHEAD, BY=COUNTRY, LINE=1,  OBJECT=TEXT,     ITEM=1,     JUSTIFY=LEFT,   SIZE=10,  COLSPAN=1,STYLE=BOLD,$
TYPE=SUBHEAD, BY=COUNTRY, LINE=1,  OBJECT=TEXT,     ITEM=2,     COLOR = RED, JUSTIFY=LEFT,   SIZE=10,  COLSPAN=1,STYLE=BOLD,$
TYPE=SUBHEAD, BY=COUNTRY, LINE=1,  OBJECT=FIELD,     ITEM=2,     JUSTIFY=LEFT,   SIZE=10,  COLSPAN=1,STYLE=BOLD,$
END


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

 
Posts: 6347 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
<JG>
posted
quote:
I cant go for Two seperate lines of Heading because, In Excel It will look Odd on Two Seperate cells. I want the Period
1 in the Same cell.


Macro, or as I said "I vote for multi line."
 
Report This Post
Expert
posted Hide Post
Oops, I should have read more carefully. Frowner


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

 
Posts: 6347 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
Guru
posted Hide Post
Hi All,

Thanks for all the suggestions.

As Macro would be much complicated for this small cosmetic correction, I had to choose tha Multiline as JG suggested...

And thats not too odd on the looks....

Thanks JG...


Thanks,

Ramkumar.
WebFOCUS/Tableau
Webfocus 8 / 7.7.02
Unix, Windows
HTML/PDF/EXCEL/AHTML/XML/HTML5
 
Posts: 394 | Location: Chennai | Registered: December 02, 2009Report This Post
Expert
posted Hide Post
You can do it within a define but you have to use your knowledge of the output format and deal accordingly.

-DEFAULT &WFFMT = 'EXL2K'
DEFINE FILE CAR
  vbcrlf/A6 = IF &WFFMT EQ 'EXL2K THEN HEXBYT(13,'A1')||HEXBYT(10,'A1') ELSE '<br />';
  MULTIHEAD/A30 = 'LINE'||vbcrlf||'1';
END
TABLE FILE CAR
SUM   SEATS
BY COUNTRY BY CAR
ON COUNTRY SUBHEAD
"<+0>Hiii<+0><MULTIHEAD<+0>"
ON TABLE PCHOLD FORMAT &WFFMT
ON TABLE SET STYLE *
  UNITS=IN, SQUEEZE=ON, ORIENTATION=LANDSCAPE, $
  TYPE=REPORT, HEADALIGN=BODY, GRID=OFF, $
  TYPE=SUBHEAD, BY=COUNTRY, LINE=1,  OBJECT=TEXT,     ITEM=1,     JUSTIFY=LEFT,   SIZE=10,  COLSPAN=1,STYLE=BOLD,$
  TYPE=SUBHEAD, BY=COUNTRY, LINE=1,  OBJECT=TEXT,     ITEM=2,     COLOR = RED, JUSTIFY=LEFT,   SIZE=10,  COLSPAN=1,STYLE=BOLD,$
  TYPE=SUBHEAD, BY=COUNTRY, LINE=1,  OBJECT=FIELD,     ITEM=2,     JUSTIFY=LEFT,   SIZE=10,  COLSPAN=1,STYLE=BOLD,$
END

As your example specifies EXL2K I have used the line breaking used within MS Excel which is carriage return line feed characters, but if this was purely for HTML then I would have to use Gamp's suggestion.

One reason why complete description of your problem is paramount.

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
 
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004Report This Post
Guru
posted Hide Post
quote:
-DEFAULT &WFFMT = 'EXL2K'
DEFINE FILE CAR
vbcrlf/A6 = IF &WFFMT EQ 'EXL2K THEN HEXBYT(13,'A1')||HEXBYT(10,'A1') ELSE '
';
MULTIHEAD/A30 = 'LINE'||vbcrlf||'1';
END
TABLE FILE CAR
SUM SEATS
BY COUNTRY BY CAR
ON COUNTRY SUBHEAD
"<+0>Hiii<+0>"
ON TABLE PCHOLD FORMAT &WFFMT
ON TABLE SET STYLE *
UNITS=IN, SQUEEZE=ON, ORIENTATION=LANDSCAPE, $
TYPE=REPORT, HEADALIGN=BODY, GRID=OFF, $
TYPE=SUBHEAD, BY=COUNTRY, LINE=1, OBJECT=TEXT, ITEM=1, JUSTIFY=LEFT, SIZE=10, COLSPAN=1,STYLE=BOLD,$
TYPE=SUBHEAD, BY=COUNTRY, LINE=1, OBJECT=TEXT, ITEM=2, COLOR = RED, JUSTIFY=LEFT, SIZE=10, COLSPAN=1,STYLE=BOLD,$
TYPE=SUBHEAD, BY=COUNTRY, LINE=1, OBJECT=FIELD, ITEM=2, JUSTIFY=LEFT, SIZE=10, COLSPAN=1,STYLE=BOLD,$
END




Your Tip Rocked Tony.... Good One

Really helped it....

Thank you...


Thanks,

Ramkumar.
WebFOCUS/Tableau
Webfocus 8 / 7.7.02
Unix, Windows
HTML/PDF/EXCEL/AHTML/XML/HTML5
 
Posts: 394 | Location: Chennai | Registered: December 02, 2009Report This Post
Expert
posted Hide Post
Only expanding on what JG had already mentioned
quote:
something like "Line" & Chr(10) & " 1"
Again, you just need to think about what you want and the limitations of your various output formats.

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
 
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004Report 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] Word Break in Heading Element

Copyright © 1996-2020 Information Builders