Jump to content

Recommended Posts

Posted

Hello,

Can someone advise how to center the <COUNTRY Field in the header using the code below If you look at the first page, England typed out isnt aligned with England as a field.

TABLE FILE CAR

SUM

SALES

RETAIL_COST

BY COUNTRY

HEADING

"ENGLAND"

"<COUNTRY"

ON COUNTRY PAGE-BREAK

ON TABLE SET HTMLCSS ON

ON TABLE PCHOLD FORMAT PDF

ON TABLE SET STYLE *

TYPE=HEADING, HEADALIGN=BODY, JUSTIFY=CENTER, COLSPAN=3,$

TYPE=HEADING,

LINE=1,

COLSPAN=3,

JUSTIFY=CENTER,

$

TYPE=HEADING,

LINE=2,

COLSPAN=3,

JUSTIFY=CENTER,

$

ENDSTYLE

END

-RUN

Posted

DEFINE FILE CAR

TITL /A10V = 'England';

END

TABLE FILE CAR

SUM SALES

RETAIL_COST

BY COUNTRY

HEADING

"<TITL"

"<COUNTRY"

ON COUNTRY PAGE-BREAK

ON TABLE SET HTMLCSS ON

ON TABLE PCHOLD FORMAT PDF

ON TABLE SET STYLE *

TYPE=HEADING,

HEADALIGN=BODY,

$

TYPE=HEADING,

LINE=1,

COLSPAN=3,

JUSTIFY=CENTER,

$

TYPE=HEADING,

LINE=2,

COLSPAN=3,

JUSTIFY=CENTER,

$

ENDSTYLE

END

-RUN

Posted

Hi Brandon,

If you display the text field in the center, The text will be centered based on the number of characters in the text. See the below comparison of COUNTRY field.

 

if you want to start the text in the same position, you need to split the header(colspan) and then align left.

DEFINE FILE CAR

TITL /A15V = England;

END

TABLE FILE CAR

SUM SALES

RETAIL_COST

BY COUNTRY

HEADING

<TITL

" <COUNTRY <+0>"

ON COUNTRY PAGE-BREAK

ON TABLE SET HTMLCSS ON

ON TABLE PCHOLD FORMAT PDF

ON TABLE SET STYLE *

TYPE=HEADING,

HEADALIGN=BODY,

$

TYPE=HEADING,

LINE=1,

COLSPAN=3,

JUSTIFY=CENTER,

$

TYPE=HEADING,

LINE=2,

ITEM=2,

COLSPAN=1,

JUSTIFY=CENTER,

$

TYPE=HEADING,

LINE=2,

ITEM=3,

COLSPAN=1,

JUSTIFY=LEFT,

$

ENDSTYLE

END

-RUN

Posted

Thank you very much Thirumaran. You definitely pointed me in the right direction. I found out when you make colspan 1 with a field, it aligns the field better than if you colspan the entire report.

really appreciate it. this is solved

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
  • Create New...