Focal Point
[SOLVED] Multiple alignments on same heading line

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

June 04, 2009, 07:37 PM
JohnB
[SOLVED] Multiple alignments on same heading line
I have a report that needs to have heading text in the same line in 3 positions:

Left Centered Info Right

That's the "easy" part. The tricky part is the word "Centered" needs to be in Navy and the word "Info" needs to be in green. The problem is keeping "Centered" and "Info" one space apart from each other. Here is the source code.


 
-* File HEADING.fex
TABLE FILE CAR
PRINT
     COUNTRY
     CAR
     MODEL
     SALES
HEADING
"Left<0>Center<+0>Info<+0>Right<+0> "
" "
ON TABLE NOTOTAL
ON TABLE SET STYLE *
     UNITS=IN,
     SQUEEZE=ON,
     ORIENTATION=PORTRAIT,
$
TYPE=REPORT,
     GRID=OFF,
     FONT='TIMES NEW ROMAN',
     SIZE=10,
$
TYPE=HEADING,
     HEADALIGN=INTERNAL,
$
TYPE=HEADING,
     LINE=1,
     OBJECT=TEXT,
     ITEM=1,
     COLOR='RED',
$
TYPE=HEADING,
     LINE=1,
     OBJECT=TEXT,
     ITEM=2,
     COLOR='BLUE',
     JUSTIFY=CENTER,
$
TYPE=HEADING,
     LINE=1,
     OBJECT=TEXT,
     ITEM=3,
     COLOR=RGB(51 153 102),
     JUSTIFY=LEFT,
$
TYPE=HEADING,
     LINE=1,
     OBJECT=TEXT,
     ITEM=4,
     COLOR=RED,
     JUSTIFY=RIGHT,
$
ENDSTYLE
END
 


Thank you,

John

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


WF 7.7.03, Windows 7, HTML, Excel, PDF
June 04, 2009, 08:58 PM
Doug
I think, if I understand you, that there's an easy solution:

1) Use "<0>Left<+1>Center<+1>Info<+1>Right<+0>" for your heading line.
2) Don't use "TYPE=HEADING, HEADALIGN=INTERNAL,$" in this partular case.
3) Use " TYPE=HEADING, LINE=1, OBJECT=TEXT, ITEM=iterm number, 1-3, COLOR='pick a color, i.e.: NAVY',$"

I hope this helps. It works for me.
June 05, 2009, 04:20 AM
<JJI>
John,

What is the output format of your report?

This works for both HTML and EXL2K:
 
HEADING
"Left<0>Center Info<+0> <+0>Right<+0> " 

...
 $
TYPE=HEADING,
     HEADALIGN=BODY,
$ 



Unfortunately this will not work for PDF. I'll see what I can do to make this work also for PDF. I'll hope this works for you.

This message has been edited. Last edited by: <JJI>,
June 05, 2009, 09:20 AM
Doug
I assumed HTML as nothing was mentioned otherwise. However, if you want to PCHOLD FORMAT PDF, then use "Left<+0> Center<+0> Info<+0> Right<+0>" for your HEADING line. Note the spaces to the right of the <+0>'s.
June 05, 2009, 12:27 PM
JohnB
The user has the choice of HTML, PDF, and Excel. I was looking for the HTML solution initially.

Thank you,

John

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


WF 7.7.03, Windows 7, HTML, Excel, PDF