Focal Point Banner


As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.

Join the TIBCO Community
TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.

  • From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
  • Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
  • Request access to the private WebFOCUS User Group (login required) to network with fellow members.

Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED] Heading alignment for webfocus HTML report.

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED] Heading alignment for webfocus HTML report.
 Login/Join
 
<Scott_W>
posted
Is there a way in the heading of a report to automatically left, center, and right justify parts of that heading.

Essentially in a heading on one line I would like to left justify something, center something, and then right justify something else.

[I have example code if needed]

Details: we are using devstudio 521 and the report output is HTML.

Any ideas or tips?
Thanks.

This message has been edited. Last edited by: Kerry,
 
Report This Post
Platinum Member
posted Hide Post
Style sheet may be the way you want to go ....
Here is an example of one of mine. There are all kinds of things you can do with style sheets.

ON TABLE SET STYLE *
TYPE=REPORT, GRID=OFF, $
TYPE=HEADING, LINE=1, SIZE=12, STYLE=BOLD, JUSTIFY=CENTER, COLOR=RED, $
TYPE=HEADING, LINE=2, SIZE=08, JUSTIFY=LEFT, $
TYPE=HEADING, LINE=3, SIZE=10, STYLE=BOLD, JUSTIFY=CENTER, COLOR=RED, $
TYPE=HEADING, LINE=4, SIZE=10, STYLE=BOLD, JUSTIFY=CENTER, COLOR=RED, $
TYPE=HEADING, LINE=5, SIZE=08, JUSTIFY=LEFT, $
TYPE=HEADING, LINE=6, SIZE=08, JUSTIFY=LEFT, $
ENDSTYLE
 
Posts: 132 | Location: Kansas | Registered: November 12, 2003Report This Post
Expert
posted Hide Post
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
 
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003Report This Post
Platinum Member
posted Hide Post
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

This message has been edited. Last edited by: <Mabel>,
 
Posts: 173 | Location: Madrid, Spain | Registered: May 09, 2003Report This Post
Expert
posted Hide Post
 
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003Report This Post
<Brett Johnson>
posted
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?
 
Report This Post
Expert
posted Hide Post
Brett, we need to see the code, please.
 
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003Report This Post
Platinum Member
posted Hide Post
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.

-* TYPE=HEADING, LINE=7, OBJECT=TEXT, ITEM=1,
-*POSITION=N4, $

N4 is the fourth field in the table. This can be replaced with a hard spot as stated above.

David
 
Posts: 117 | Location: US | Registered: February 09, 2004Report This Post
<pranas>
posted
Hi,

I've stocked with the similar but not for SUBFOOT

I want to have some total values of SUBFOOT to be positioned below sertain data columns.

TABLE
SUM F1 F2 F3 F4 F5 F6 CHARGE FST.CURRENCY_CODE
BY CURRENCY_CODE SUP-PRINT
...
ON TABLE NOTOTAL
ON TABLE SET PAGE-NUM OFF
ON TABLE SET ONLINE-FMT &OUTPUT_FORMAT

ON CURRENCY_CODE RECAP TOTCHARGE=CHARGE;
SUBFOOT
"Total:<+0>"

ON TABLE SET STYLE *
-INCLUDE ubp
TYPE=REPORT, ORIENTATION=LANDSCAPE, $
TYPE=SUBFOOT, HEADALIGN=BODY,$
TYPE=SUBFOOT,
LINE=1,
OBJECT=TEXT,
ITEM=1,
POSITION=N1,
$
TYPE=SUBFOOT,
LINE=1,
OBJECT=FIELD,
ITEM=2,
POSITION=N7,
$
TYPE=SUBFOOT,
LINE=1,
OBJECT=FIELD,
ITEM=3,
POSITION=N8,
$

ENDSTYLE
END


Expected position of fields:

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

Some suggestions?

Thanks,
Pranas
 
Report This Post
<kj>
posted
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,...

Thanks,
kj
 
Report This Post
<Pietro De Santis>
posted
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> .

Pietro.
 
Report This Post
<Grzegorz>
posted
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 |)

Regards
Grzegorz
 
Report This Post
<pranas>
posted
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"

Like "
 ... [BY=PRINT|NOPRINT] ... 
... "?!
I hope project development team will see my post.
 
Report This Post
<Mabel>
posted
quote:
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
 
Report This Post
Silver Member
posted Hide Post
This page http://ecl.informationbuilders.../source/topic213.htm suggests there is an Alignment Grid for aligning fields in Headings and Footings.
But the things is always disabled Frowner.


WebFOCUS 8.0.0.8, Windows 7
 
Posts: 36 | Location: Portland, OR (USA) | Registered: October 11, 2012Report This Post
Virtuoso
posted Hide Post
The doc you have is for 7.7.03 - can you find a 8.0?
 
Posts: 1903 | Location: San Antonio | Registered: February 28, 2005Report This Post
Silver Member
posted Hide Post
But indeed, Mabel,

TYPE=HEADING,
HEADALIGN=INTERNAL,
$
TYPE=FOOTING,
HEADALIGN=INTERNAL,
$

is what I needed. Thanks!


WebFOCUS 8.0.0.8, Windows 7
 
Posts: 36 | Location: Portland, OR (USA) | Registered: October 11, 2012Report This Post
Silver Member
posted Hide Post
WebFOCUS 8 docs are here: http://infocenter.ibi.com/wf80/index.jsp

Why in the world product documentation is hidden behind a username and password is beyond me. I am probably not allowed to give you the credentials I got.


WebFOCUS 8.0.0.8, Windows 7
 
Posts: 36 | Location: Portland, OR (USA) | Registered: October 11, 2012Report This Post
Virtuoso
posted Hide Post
So you pay your maintence fees.
 
Posts: 1903 | Location: San Antonio | Registered: February 28, 2005Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED] Heading alignment for webfocus HTML report.

Copyright © 1996-2020 Information Builders