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] Center text in PDF with Wrap

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Center text in PDF with Wrap
 Login/Join
 
Member
posted
I have a pdf report that I am working on and I am running into a problem with centering the data in the columns when wrap is turned on. Is there a way around this? I am including an example below.

TABLE FILE CAR
PRINT
'CAR.COMP.CAR'
'CAR.CARREC.MODEL'
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT PDF
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
UNITS=IN,
SQUEEZE=ON,
ORIENTATION=PORTRAIT,
$
TYPE=REPORT,
GRID=OFF,
FONT='TIMES NEW ROMAN',
SIZE=10,
RIGHTGAP=0.125000,
$
TYPE=DATA,
COLUMN=N1,
GRID=ON,
JUSTIFY=CENTER,
$
TYPE=DATA,
COLUMN=N2,
GRID=ON,
JUSTIFY=CENTER,
$
TYPE=TITLE,
COLUMN=N1,
GRID=ON,
JUSTIFY=CENTER,
$
TYPE=TITLE,
COLUMN=N2,
GRID=ON,
JUSTIFY=CENTER,
$
TYPE=REPORT,
COLUMN=N2,
WRAP=0.750000,
$
ENDSTYLE
END

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


Release: 7.7.03
OS : Linux
Outputs: EXL2K/PDF/HTML
 
Posts: 10 | Location: Omaha, NE | Registered: October 26, 2006Report This Post
Expert
posted Hide Post
Wow, that's ugly! I'm afraid I don't think we can do anything about that.


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
Member
posted Hide Post
I was afraid of that. I have looked around in both Focal Point and the Tips and Techniques section and did not find anything that helped.


Release: 7.7.03
OS : Linux
Outputs: EXL2K/PDF/HTML
 
Posts: 10 | Location: Omaha, NE | Registered: October 26, 2006Report This Post
Guru
posted Hide Post
quote:
WRAP=0.750000,

Do you have enough room to expand your column width? WRAP = 1.75


Developer Studio 7.6.11
AS400 - V5R4
HTML,PDF,XLS
 
Posts: 305 | Location: Winnipeg,MB | Registered: May 12, 2008Report This Post
Member
posted Hide Post
Unfortunately I don't. The actual report is 10 columns across, and anything larger pushes the data to a next page.


Release: 7.7.03
OS : Linux
Outputs: EXL2K/PDF/HTML
 
Posts: 10 | Location: Omaha, NE | Registered: October 26, 2006Report This Post
Expert
posted Hide Post
My only suggestion would be to use Mcgyver + PARAG + GETTOK to generate the rows, the JUSTIFY=CENTER will then work, you wont need the WRAP.


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
Expert
posted Hide Post
My suggestion would be to not use JUSTIFY=CENTER with WRAP until some future version of WebFOCUS PDF output is fixed. I would also open a case with Tech Support.


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
Member
posted Hide Post
Thanks. I have opened a ticket up with Tech Support, and will be giving the suggestion that Waz gave a try today.


Release: 7.7.03
OS : Linux
Outputs: EXL2K/PDF/HTML
 
Posts: 10 | Location: Omaha, NE | Registered: October 26, 2006Report This Post
Member
posted Hide Post
Was this ever fixed? I'm having the same problem in webfocus 7.6 - I am printing a custom title from the user which can get quite long and should be wrapped, but as soon as I turn on wrapping it becomes left-justified and ugly.


Using WebFOCUS 7.6.3 (as of 16-OCT-2009)
 
Posts: 2 | Registered: October 02, 2007Report This Post
Virtuoso
posted Hide Post
No. There is no center justification when wrap is used.

However, if it's a parameter, you could use a function like PARAG or EDIT to insert commas at specified locations in the text and then use that string in your AS phrase. Something like this:
-SET &STRING='THIS IS A TITLE NEXT TITLE2 AND ANOTHER TITLE ';
-SET &COLTITLE=PARAG(&STRING.LENGTH, '&STRING.EVAL', ',', 10, 'A&STRING.LENGTH')
TABLE FILE CAR
PRINT CAR AS '&COLTITLE.EVAL'
BY COUNTRY
ON TABLE PCHOLD FORMAT PDF
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
     UNITS=IN,
     SQUEEZE=ON,
     ORIENTATION=PORTRAIT,
$
TYPE=REPORT,
     GRID=OFF,
     FONT='ARIAL',
     SIZE=10,
     COLOR='BLACK',
     BACKCOLOR='NONE',
     STYLE=NORMAL,
$
TYPE=TITLE, COLUMN=CAR, JUSTIFY=CENTER,$
ENDSTYLE
END


This will work as-is for a column title. row values would not work with this.

This message has been edited. Last edited by: Darin Lee,


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
Member
posted Hide Post
Thanks Darin. I think I can adapt that technique for my needs. I opened a case with IBI and they confirmed that wrap+centering does not work. They claimed that squeeze would let me wrap and center, but then determined that that didn't work, either, so hopefully they'll fix this...


Using WebFOCUS 7.6.3 (as of 16-OCT-2009)
 
Posts: 2 | Registered: October 02, 2007Report This Post
Expert
posted Hide Post
Nice work Darin... I like the implantation of those commas... This just might come in handy someday... referring back to this means that I won't need to re-invent the wheel... Nor will anyone else if they check out FocalPoint...
 
Posts: 3132 | Location: Tennessee, Nashville area | Registered: February 23, 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] Center text in PDF with Wrap

Copyright © 1996-2020 Information Builders