yeah, here's the trick on aligning parts of a heading; You need to define a variable with contains the heading, all its parts, embraced with html code. The heading gets put into a TABLE,with , 1 row and, say, 3 cells. The first cell willcontain what you want left justified. the second cell will contain what you want centered. and the third cell will contain what you want right justified. And you'll control placement by WIDTH and ALIGN attributes in the TD tags. There's an article on this on the ibi tech support site, but i can't find it. I'll keep looking and let you know. Ah. found it: http://techsupport.informationbuilders.com/tech/wbf/wbf_tcn_021.html
TABLE FILE CAR HEADING "LEFT<+0>CENTER<+0>RIGHT" " " PRINT COUNTRY CAR MODEL SALES ON TABLE SET STYLE * TYPE=HEADING, HEADALIGN=INTERNAL, $ TYPE=HEADING, ITEM=2, JUSTIFY=CENTER, $ TYPE=HEADING, ITEM=3, JUSTIFY=RIGHT, $ END Regards, MikelThis message has been edited. Last edited by: <Mabel>,
I am able to get this to work with hard coded text, but not defined fields in the heading. If you have a defined field in left, and another in near the center of page, it slides the 2nd defined field off the page, or way beyond the # of columns that you specified. Any ideas?
June 08, 2004, 09:58 PM
Brett, we need to see the code, please.
June 11, 2004, 12:23 PM
Sometimes you have to use POSITION=5.5 in the style for the field.
Also, I found that I have to use <+0 sometimes.
Be aware that you still have to declare what it is you are trying to use Field or Text in the style.
I expect position of the first ITEM (TEXT "Total") to be placed below 1st column.
The ITEM=2 (FIELD with numeric value) to be placed in below 7th column.
The ITEM=2 (FIELD with text value) to be placed in below 8th column.
Actual result: The 1 ITEM below column 1 The 2 ITEM below column 2 The 3 ITEM below column 3
Note the same behavior with simple TEXT ITEMS. WebFOCUS 5.2.5
July 16, 2004, 01:36 PM
Pranas, I had similar problem with HTML output. But it works fine with PDF output. It may be a bug with HTML output. I put <+0> 2 times if I want two column space inbetween. You may want to try this. This will not effect PDF output. and Instead of N1, N2,... I used P1, P2,...
July 16, 2004, 01:59 PM
<Pietro De Santis>
A little hint: when playing with WebFOCUS style sheets, add a COLOR tag to see if the style sheet entry is actually being applied as you want it. If you find that the element is not being coloured, then that particular entry is not coded correctly. For your subfoots, you may need to have spaces between the <+0> .
July 16, 2004, 02:10 PM
Example which I suppose is a good illustration of how the HEADING (or FOOTING, SUBHEADING etc.) with HEADALIGN=BODY works: (WF 5.2.3 on Windows)
-DEFAULT &OUTFMT=HTML DEFINE FILE CAR FIELD1/A2 = 'F1'; FIELD2/A2 = 'F2'; FIELD3/A2 = 'F3'; SAL1/I6 = SALES; SAL2/I6 = SALES; SAL3/I6 = SALES; SAL4/I6 = SALES; SAL5/I6 = SALES; END -RUN END TABLE FILE CAR HEADING " <+0>TEXT1 <|FIELD1 TEXT2<0> <0> <0> <0><|FIELD2" SUM SAL1 SAL2 SAL3 SAL4 SAL5 BY COUNTRY BY CAR BY MODEL ON TABLE SET STYLE * TYPE=REPORT, GRID=ON, SIZE=10, ORIENTATION=LANDSCAPE, $ TYPE=HEADING, HEADALIGN=BODY, STYLE=BOLD, FONT=ARIAL, BACKCOLOR=YELLOW,$ -* The leading space is ITEM=1 for TEXT objects TYPE=HEADING, OBJECT=TEXT, ITEM=2, COLOR=RED, POSITION=P2,$ TYPE=HEADING, OBJECT=TEXT, ITEM=3, COLOR=BLUE, POSITION=P3, $ -* TEXT objects, and FIELD objects are counted separately ! TYPE=HEADING, OBJECT=FIELD, ITEM=1, COLOR=BLUE, POSITION=P4,$ TYPE=HEADING, OBJECT=FIELD, ITEM=2, COLOR=RED, POSITION=P8,$
ENDSTYLE ON TABLE SET PAGE-NUM OFF ON TABLE SET HTMLCSS ON ON TABLE SET ONLINE-FMT &OUTFMT END
This is also the result of experiments and I agree with kj:
Spot markers do not affect PDF output potitioning, they only divide the LINE into ITEMS
Spot markers performs positioning for HTML output.
POSITION attribute does not affect HTML output.
POSITION attribute affects PDF output.
For the POSITION attribute the P1, P2, ... should be used instead of N1, N2, ...
Spot markers divide the LINE into ITEMS, but the spaces between spot markers are very important.
(I used the syntax <|FIELD to protect the code against being removed by the forum engine - should be without pipe |)
July 19, 2004, 06:25 AM
Thanks gurus: kj, Pietro De Santis, Grzegorz
It is very complicated procedure to put subtotals in correct columns. I think FOCUS language may be extended in order to support "supressing display of BY values"
... [BY=PRINT|NOPRINT] ...
... "?! I hope project development team will see my post.
December 05, 2005, 02:42 PM
Originally posted by Mikel: Easy, Try this example using HEADALIGN=INTERNAL combined with JUSTIFY.
TABLE FILE CAR HEADING "LEFT<+0>CENTER<+0>RIGHT" " " PRINT COUNTRY CAR MODEL SALES ON TABLE SET STYLE * TYPE=HEADING, HEADALIGN=INTERNAL, $ TYPE=HEADING, ITEM=2, JUSTIFY=CENTER, $ TYPE=HEADING, ITEM=3, JUSTIFY=RIGHT, $ END Regards, Mikel