Focal Point
Centering the heading

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

March 15, 2005, 05:50 PM
<tourettes>
Centering the heading
I'm having a problem centering the heading. For some reason, the heading centers not by the page, but by the columns of data.



Thanks in advance.
March 15, 2005, 06:05 PM
Leo L
The Heading function within the report I believe will always center according to the report. If you were looking at creating a heading for the webpage I would suggest using it within the -HTMLFORM section and coding it in HTML.

Something like..

-HTMLFORM BEGIN
<CENTER>
<h3>heading</h3>
</CENTER>
-HTMLFORM END
-* Then displaying your table
TABLE FILE CAR
...
..
END

Leo
March 18, 2005, 11:53 AM
<tourettes>
I should have specified that the reports are in PDF format....any ideas??
March 18, 2005, 01:32 PM
<JG>
You need to use a spot marker. The number depends on the page orientation and the size of your heading

TABLE FILE CAR
HEADING
"<35 HELLO "
PRINT MODEL
BY CAR
ON TABLE PCHOLD FORMAT PDF
END
March 18, 2005, 01:59 PM
<Pietro De Santis>
May I guess that you've articulated an issue with PDF reports that I also have a problem with?

If you have a PDF report that has very few, narrow columns, The HEADING CENTER centers the heading over the report columns, not the whole page. The PDF report, which is designed for printing, is aligned to the left of the physical page - there's no way to center the headings and the columns of the report with regards to the page size, other than using spot markers or positioning.

It would be nice to either center the body of the report automatically, or center the headings to the physical page.
March 18, 2005, 02:08 PM
<JG>
WebFocus by default always centers the heading over the displayed columns, this is a built in feature. To force other behavior, for PDF you must use spot markers, or for HTML and Excel you must use colspan in the style sheet perhaps with the addition of dummy fields to pad the report width, or CSS.
March 18, 2005, 02:48 PM
reFOCUSing
Here is an old post you may want to check out:

Centering Variable Heading In PDF

Here is some code that should work for you:

TABLE FILE CAR
PRINT
RETAIL_COST
DEALER_COST
BY COUNTRY
BY CAR
HEADING
"HEADING1"
"HEADING2"
"HEADING3"
ON TABLE PCHOLD FORMAT PDF
ON 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=1,JUSTIFY=CENTER,WIDTH=10.50,$
TYPE=HEADING,LINE=2,JUSTIFY=CENTER,WIDTH= 8.00,$
TYPE=HEADING,LINE=3,JUSTIFY=CENTER,$
ENDSTYLE
END

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