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] Wrapping in a header

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Wrapping in a header
 Login/Join
 
Gold member
posted
Is it possible? I have a page of a compound report where all of the text formatting and variables are defined in the heading. One of those variables is a title -- a field that varies from nothing to about 200 characters. I'd like to wrap it down to the next few lines if it's long. The only way I could think to do this is to use substr -- something like this:

TITLE1/A50 = SUBSTR(200, TITLE, 1, 50, 50, 'A50');
TITLE2/A50 = SUBSTR(200, TITLE, 51, 100, 50, 'A50');
TITLE3/A50 = SUBSTR(200, TITLE, 101, 150, 50, 'A50');
TITLE4/A50 = SUBSTR(200, TITLE, 151, 200, 50, 'A50');

And then list title1, title2, title3, title4 out on separate lines in the heading. This works, but the problem is it chops words in half. Any suggestions?

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
Look at PARAG. It is useful in these situations.


Ginny
---------------------------------
Prod: WF 7.7.01 Dev: WF 7.6.9-11
Admin, MRE,self-service; adapters: Teradata, DB2, Oracle, SQL Server, Essbase, ESRI, FlexEnable, Google
 
Posts: 2723 | Location: Ann Arbor, MI | Registered: April 05, 2006Report This Post
Expert
posted Hide Post
With PDF, you can use WRAP.
DEFINE FILE CAR
 LONG_LINE/A100 = 'The quick brown fox jumps over the lazy dog' ;
 DUMMY/A1 WITH COUNTRY = ' ' ;
END
TABLE FILE CAR
HEADING
"<LONG_LINE"
 SUM DUMMY      AS ''
ON TABLE PCHOLD FORMAT PDF
ON TABLE SET STYLE *
UNITS=CM, PAGESIZE='A4', LEFTMARGIN=0.635000, RIGHTMARGIN=0.635000,
    TOPMARGIN=0.635000, BOTTOMMARGIN=0.635000, SQUEEZE=ON,
    ORIENTATION=LANDSCAPE, $
TYPE=REPORT, GRID=OFF, FONT=TIMES NEW ROMAN, $
TYPE=HEADING, LINE=1, ITEM=1, OBJECT=FIELD, WRAP=2, $
ENDSTYLE
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
Gold member
posted Hide Post
Thanks Waz, that worked for the most part. Is it possible to center it? I tried justify=center but no go. Also, is it possible to control the wrap width?


WebFOCUS 7.6.3 | Solaris 10 | Excel, PDF
 
Posts: 46 | Location: Austin TX | Registered: June 04, 2009Report This Post
Gold member
posted Hide Post
Disregard my last message. The wrap through the style is pushing the rest of my report down. I went with a PARAG/GETTOK instead.

For future reference
Something like this:
PARAGS/A300 = PARAG(299, TITLE, '|', 75, PARAGS);
SUB1/A75=GETTOK(PARAGS, 300, 1, '|', 75, SUB1);
SUB2/A75=GETTOK(PARAGS, 300, 2, '|', 75, SUB2);
SUB3/A75=GETTOK(PARAGS, 300, 3, '|', 75, SUB3);
SUB4/A75=GETTOK(PARAGS, 300, 3, '|', 75, SUB4);


WebFOCUS 7.6.3 | Solaris 10 | Excel, PDF
 
Posts: 46 | Location: Austin TX | Registered: June 04, 2009Report This Post
Virtuoso
posted Hide Post
Using WRAP, you can't justify it, You can use a sport marker to approximate the center, but each line will still be left justified. If you wuse the PARAG function, breaking it into individual fields, each field on its own line, then the justify=center will work.

As for the second question, I would suggest when you're given code as an answer for a problem, you'll learn better if you go through the solution and play with it a little to find out why that solution fixes your problem. Just plugging in the solution and counting it good solves the problem, but you'll have the same question again in the future if you haven't learned the concept.

Hint: Play with the number after the WRAP= and see what you get.


Regards,

Darin



In FOCUS since 1991
WF Server: 7.7.04 on Linux and Z/OS, ReportCaster, Self-Service, MRE, Java, Flex
Data: DB2/UDB, Adabas, SQL Server Output: HTML,PDF,EXL2K/07, PS, AHTML, Flex
WF Client: 77 on Linux w/Tomcat
 
Posts: 2298 | Location: Salt Lake City, Utah | Registered: February 02, 2007Report This Post
Virtuoso
posted Hide Post
You beat me to the post. Excellent!


Regards,

Darin



In FOCUS since 1991
WF Server: 7.7.04 on Linux and Z/OS, ReportCaster, Self-Service, MRE, Java, Flex
Data: DB2/UDB, Adabas, SQL Server Output: HTML,PDF,EXL2K/07, PS, AHTML, Flex
WF Client: 77 on Linux w/Tomcat
 
Posts: 2298 | Location: Salt Lake City, Utah | Registered: February 02, 2007Report 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] Wrapping in a header

Copyright © 1996-2020 Information Builders