Focal Point
[CLOSED] Center Alignment of table in PDF report

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/489107374

June 24, 2010, 03:47 PM
subhash
[CLOSED] Center Alignment of table in PDF report
Hi All,

I have this piece of code which places the table on the left side. I want this table to be placed on the center of the report. I tried using TYPE = REPORT ,JUSTIFY=CENTER , but it is placing the data in the table to center but not the table itself. I can adjust it using LEFT and RIGHT MARGINS, but it will mislead me when more columns will come into picture. So, is there a way where it can be adjusted to center of the report by itself.

Code:

-* File CENTER_ALIGNMENT.fex
TABLE FILE CAR
PRINT
'CAR.COMP.CAR'
'CAR.CARREC.MODEL'
'CAR.BODY.BODYTYPE'
HEADING
"car example"

ON TABLE SET PAGE-NUM OFF
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT PDF
ON TABLE SET STYLE *
UNITS=IN,
SQUEEZE=ON,
ORIENTATION=PORTRAIT,
$
TYPE=REPORT,
GRID=ON,
FONT='TIMES NEW ROMAN',
SIZE=10,
JUSTIFY=CENTER,
$
ENDSTYLE
END

This message has been edited. Last edited by: Kerry,
June 24, 2010, 03:50 PM
Francis Mariani
I don't think there's any way to control this.


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
June 24, 2010, 03:56 PM
Don Garland
I'm wondering if the painter tool would work?
June 24, 2010, 04:13 PM
Darin Lee
I don't think it can be centered that way either. Using margin adjustments can "fake" it but if you add a column or two, as subhash mentions, those would need to be readjusted. The layout tool / precision report tool also provides some control at this level as well, but if the overall width of the report increases, they again would need to be adjusted.


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
June 24, 2010, 04:21 PM
njsden
Not too mention that the use of SQUEEZE=ON has also an impact on the overall report width as it will depend on the actual data being presented and therefore there is no easy way to pre-set left and right margins.



Prod/Dev: WF Server 8008/Win 2008 - WF Client 8008/Win 2008 - Dev. Studio: 8008/Windows 7 - DBMS: Oracle 11g Rel 2
Test: Dev. Studio 8008 /Windows 7 (Local) Output:HTML, EXL2K.
June 24, 2010, 04:21 PM
Tom Flynn
Hi Darin,

Yea, I saw that it was tried already, so, I deleted my thought. That's the only way I know, besides spot markers, that ADOBE displays the data.

Here's what I had suggessted which Darin responded to:

UNITS=IN,
SQUEEZE=ON,
ORIENTATION=PORTRAIT,
LEFTMARGIN=2, RIGHTMARGIN=2,
$

AND, I added:

TYPE-HEADING, JUSTIFY=CENTER,$

You could create DM & variables based on the # of columns coming through, another option...


Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
June 24, 2010, 06:18 PM
Waz
The only way that I can think of doing this, is to make the report "fixed", each column has its width, and the width of the report is know, then adjust the margins.

Perhaps this would be a nice NFR.


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!

June 25, 2010, 04:09 AM
PBax
Could you not do a count of the number of columns then have the let margin dynamic relative to the number of columns?

i.e 5 columns - &marg=5.0
6 columns - &marg=4.0
7 columns - &marg=3.0


81.05 All formats
June 25, 2010, 10:32 AM
subhash
I have the columns dynamically coming......


7.6.4,unix
all output
June 27, 2010, 05:42 PM
Waz
Don't forget Proportional Fonts ....


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!