Focal Point
Center a variable heading in PDF

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

March 04, 2005, 03:33 PM
Saif K
Center a variable heading in PDF
I have a self serv app with several reports in PDF format.

I am trying to center Heading in Line 3 and 4 to the middle part of the Line 1 and 2. I have tried several options in the style sheet, but was unable to accomplish this.

I need help from the gurus. Thank you. Confused

HEADING
"<1 &DATE <38 XYZ Group of North America <81 QC:&REPNO"
"<1 Produced By:SMG Group <45 Order Status Report <75 Source:XZ1307,PPD256"
"&FTYPE_HDG"
"&JTYPE_HDG"

Confused
March 04, 2005, 08:41 PM
reFOCUSing
This code could help you:

-SET &LINE3 = 'Line 3';
-SET &LINE4 = 'Line 4';
-SET &REPNO = '5';
TABLE FILE CARPRINT
     RETAIL_COST
     DEALER_COSTBY
     COUNTRYBY
     CAR
HEADING
"<1 &DATE <38 XYZ Group of North America <81 QC:&REPNO"
"<1 Produced By:SMG Group <45 Order Status Report <75 Source:XZ1307,PPD256"
"&LINE3"
"&LINE4"
ON TABLE PCHOLD FORMAT PDFON 
TABLE SET STYLE *
UNITS=IN,PAGESIZE='LETTER',LEFTMARGIN=0.25,RIGHTMARGIN=0.25,
TOPMARGIN=0.25,BOTTOMMARGIN=0.25,SQUEEZE=ON,ORIENTATION=LANDSCAPE,$
TYPE=REPORT,FONT='ARIAL',SIZE=8,COLOR='BLACK',BACKCOLOR='NONE',STYLE=NORMAL,
RIGHTGAP=0.00,$
TYPE=HEADING,LINE=3,JUSTIFY=CENTER,WIDTH=10.00,$
TYPE=HEADING,LINE=4,JUSTIFY=CENTER,WIDTH=10.00,$
ENDSTYLE
END



If you know how much space heading 1 and 2 will take on the page you can adjust the width to fit.

This message has been edited. Last edited by: Kerry,
March 07, 2005, 06:04 AM
<Sugiyama>
Please test the following requests.


HEADING CENTER
"<1 &DATE <38 XYZ Group of North America <81 QC:&REPNO"
"<1 Produced By:SMG Group <45 Order Status Report <75 Source:XZ1307,PPD256"
"&FTYPE_HDG"
"&JTYPE_HDG"


Good luck
March 07, 2005, 03:36 PM
<Pietro De Santis>
You don't need the WIDTH parm, JUSTIFY=CENTER will suffice.

TYPE=HEADING, LINE=3, JUSTIFY=CENTER, $
March 07, 2005, 06:35 PM
Saif K
Thank you guys. It was resolved by dividing heading into items <+0> and adjusting the WIDTH in the stylesheet. The report has 12 columns.

HEADING
"&DATE <+0> XYZ Group of North America <+0> QC:&REPNO"
"Produced By:SMG Group <+0> Order Status Report <0+> Source:XZ1307,PPD256"
"&FTYPE_HDG"
"&JTYPE_HDG"

TYPE=HEADING,LINE=1,WIDTH=1, OBJECT=TEXT,ITEM=1,JUSTIFY=LEFT,$
TYPE=HEADING,LINE=1,WIDTH=10,OBJECT=TEXT,ITEM=2,JUSTIFY=CENTER,$
TYPE=HEADING,LINE=1,WIDTH=1, OBJECT=TEXT,ITEM=3,JUSTIFY=RIGHT,$

TYPE=HEADING,LINE=2,WIDTH=2,OBJECT=TEXT,ITEM=1,JUSTIFY=LEFT,$
TYPE=HEADING,LINE=2,WIDTH=8,OBJECT=TEXT,ITEM=2,JUSTIFY=CENTER,$
TYPE=HEADING,LINE=2,WIDTH=2,OBJECT=TEXT,ITEM=3,JUSTIFY=RIGHT,$

TYPE=HEADING,LINE=3,WIDTH=12,JUSTIFY=CENTER,$
TYPE=HEADING,LINE=4,WIDTH=12,JUSTIFY=CENTER,$
Smiler