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 across more than one column

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED] Heading across more than one column
 Login/Join
 
Gold member
posted
Is there in WebFOCUS a posibility to span the first line of the heading for more than one column and for every column under that big heading to set a heading by its own?

E.g. we have the neccessity to have a heading lets call "Europe" span over more than one column named "Germany", "France", "Italy", ...
We must not use the headings like "Europe, Germany" (in Excel you do that by "concatenate cells")

... or in html code:











Europe
GermanyItalyFrance





Thanks a lot

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


WebFOCUS 7.6, 7.7
Windows, All Output formats
 
Posts: 90 | Location: Stuttgart | Registered: October 20, 2010Report This Post
Virtuoso
posted Hide Post
Michael, by "Heading" do you mean the column title?

There is no "out-of-the-box" support for that in WebFOCUS that I know of.

When faced with a need like that in HTML, I've had to resort to the use of the actual report HEADING to try and fake that, or in some cases a SUBHEAD. A combination of HEADALIGN=BODY, COLSPAN=m in the Style sheet section will keep you going.

An "easier" approach would be possible if "Europe" existed as an actual value in your table (or you can make it happen with a DEFINE). In that case, you could use ACROSS to have a similar effect?

DEFINE FILE CAR
CONTINENT/A20 = IF COUNTRY EQ 'JAPAN' THEN 'ASIA' ELSE 'EUROPE';
END
TABLE FILE CAR
SUM DEALER_COST
BY CAR
ACROSS CONTINENT AS ''
ACROSS COUNTRY AS ''
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
TYPE=ACROSSVALUE, JUSTIFY=CENTER, $
END



Prod/Dev: WF Server 8008/Win 2008 - WF Client 8008/Win 2008 - Dev. Studio: 8008/Windows 7 - DBMS: Oracle 11g Rel 2
Test: Dev. Studio 8008 /Windows 7 (Local) Output:HTML, EXL2K.
 
Posts: 1533 | Registered: August 12, 2005Report This Post
Virtuoso
posted Hide Post
Also look into COLSPAN in the Focus styling notes. I have a heading that puts a single phrase across the top of three columns like this:

TYPE=HEADING, HEADALIGN=BODY, STYLE=BOLD, $
TYPE=HEADING, LINE=4, ITEM=2, COLSPAN=3, JUSTIFY=CENTER, $

I think the HEADALIGN option on the line above it is important. But I think it was a little ornery depending on whether it was html or pdf.

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



 
Posts: 1012 | Location: At the Mast | Registered: May 17, 2007Report This Post
Expert
posted Hide Post
This also depends on the format of the output.

You can use COLSPAN with HTML and Excel, but PDF will be more dificult.


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

 
Posts: 6347 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
Gold member
posted Hide Post
Hi,

COLSPAN is also supported with PDF, just can't remember the WebFOCUS release it was introduced, but the code below works in 7.7.03 (possibly with 7.6.nn, too).

Cheers,
Mika

SET PAGE = NOPAGE

TABLE FILE CAR
SUM SALES
    DEALER_COST
    RETAIL_COST
BY COUNTRY
BY CAR
BY MODEL

HEADING
"Car Sales Report<+0>&DATEDMYY"
" "
"Car Details<+0>Dollar Details"
" "

ON COUNTRY SUBFOOT
"Total Dollars:<ST.SALES<ST.DEALER_COST<ST.RETAIL_COST"
" "

ON TABLE PCHOLD FORMAT PDF
ON TABLE SET STYLE *
TYPE=REPORT, FONT='ARIAL', SIZE=10, SQUEEZE=ON, $
TYPE=HEADING, HEADALIGN=BODY, $
TYPE=HEADING, LINE=1, ITEM=1, COLSPAN=4, SIZE=12, JUSTIFY=CENTER, $
TYPE=HEADING, LINE=1, ITEM=2, COLSPAN=2, SIZE=8, JUSTIFY=RIGHT, $
TYPE=HEADING, LINE=3, ITEM=1, COLSPAN=3, JUSTIFY=CENTER, $
TYPE=HEADING, LINE=3, ITEM=2, COLSPAN=3, JUSTIFY=LEFT, $
TYPE=SUBFOOT, HEADALIGN=BODY, STYLE=BOLD, $
TYPE=SUBFOOT, LINE=1, ITEM=1, COLSPAN=3, JUSTIFY=RIGHT, $
ENDSTYLE
END
-RUN


WebFOCUS 7.6.x
PMF 5.2.x
 
Posts: 58 | Location: Sydney, Australia | Registered: April 22, 2005Report This Post
Master
posted Hide Post
I like it ! Smiler


WebFOCUS 7.7.05 Windows, Linux, DB2, IBM Lotus Notes, Firebird, Lotus Symphony/OpenOffice. Outputs PDF, Excel 2007 (for OpenOffice integration), WP
 
Posts: 674 | Location: Guelph, Ontario, Canada ... In Focus since 1985 | Registered: September 28, 2010Report This Post
Virtuoso
posted Hide Post
If I remember correctly, support in PDF for HEADALIGN=BODY and all the niceties that come with it were introduced in WF 7.6.11.

What I've liked the most about this is that I can now easily position SUBFOOT elements just by using appropriate sport markers (<+0> ) instead of resorting to POSITION=n.



Prod/Dev: WF Server 8008/Win 2008 - WF Client 8008/Win 2008 - Dev. Studio: 8008/Windows 7 - DBMS: Oracle 11g Rel 2
Test: Dev. Studio 8008 /Windows 7 (Local) Output:HTML, EXL2K.
 
Posts: 1533 | Registered: August 12, 2005Report This Post
Master
posted Hide Post
This is a nice technique for headings, footings etc., but after 25 years of (Web)FOCUS one thing I can't now do is indent or right-justify the text for a SUBTOTAL.

The default is:
Column1 Column2 Column3               Column4 Column5 Column6
*TOTAL                                Value1  Value2  Value3

What I want is:
Column1 Column2 Column3               Column4 Column5 Column6
                              Total:  Value1  Value2  Value3

Of course I could use the SUBHEAD technique if I were only subtotalling unique columns, but that doesnt work ACROSS years, for example.

It seems to me I used to be able to do this with:
ON FIELDNAME SUBTOTAL AS 'Total: ' IN 30

But that doesn't work any more...

This message has been edited. Last edited by: George Patton,


WebFOCUS 7.7.05 Windows, Linux, DB2, IBM Lotus Notes, Firebird, Lotus Symphony/OpenOffice. Outputs PDF, Excel 2007 (for OpenOffice integration), WP
 
Posts: 674 | Location: Guelph, Ontario, Canada ... In Focus since 1985 | Registered: September 28, 2010Report This Post
Virtuoso
posted Hide Post
I'm with you on that George.

Why is it that we always seem to have to compromise on some functionality that should "just work" ?

TABLE FILE CAR
SUM DEALER_COST AND RETAIL_COST
ACROSS SEATS
BY COUNTRY
BY CAR
BY MODEL
ON COUNTRY SUBTOTAL AS 'Total: '
ON TABLE SET STYLE *
TYPE=SUBTOTAL, BY=COUNTRY, BACKCOLOR=SILVER, $
TYPE=SUBTOTAL, BY=COUNTRY, OBJECT=TEXT, ITEM=1, JUSTIFY=RIGHT, $  WebFOCUS doesn't care!
TYPE=GRANDTOTAL, BACKCOLOR=GREY, $
TYPE=GRANDTOTAL, OBJECT=TEXT, ITEM=1, JUSTIFY=RIGHT, $ WebFOCUS doesn't care either!
ENDSTYLE
END



Prod/Dev: WF Server 8008/Win 2008 - WF Client 8008/Win 2008 - Dev. Studio: 8008/Windows 7 - DBMS: Oracle 11g Rel 2
Test: Dev. Studio 8008 /Windows 7 (Local) Output:HTML, EXL2K.
 
Posts: 1533 | Registered: August 12, 2005Report This Post
Virtuoso
posted Hide Post
Well, the alignment does work up to a certain point:

TABLE FILE CAR
SUM DEALER_COST AND RETAIL_COST
ACROSS SEATS
BY COUNTRY
BY CAR
BY MODEL
ON COUNTRY SUBTOTAL AS 'Total: '
ON TABLE SET STYLE *
TYPE=SUBTOTAL, BY=COUNTRY, BACKCOLOR=SILVER, JUSTIFY=RIGHT, $
TYPE=GRANDTOTAL, BACKCOLOR=GREY, JUSTIFY=RIGHT, $
ENDSTYLE
END



But then it messes up the alignment of each individual column although if data elements are right-justified then this should not matter.



Prod/Dev: WF Server 8008/Win 2008 - WF Client 8008/Win 2008 - Dev. Studio: 8008/Windows 7 - DBMS: Oracle 11g Rel 2
Test: Dev. Studio 8008 /Windows 7 (Local) Output:HTML, EXL2K.
 
Posts: 1533 | Registered: August 12, 2005Report This Post
Virtuoso
posted Hide Post
Although not as easily addressable as SUBFOOT and SUBHEAD, some styling of SUBFOOT is possible in the StyleSheet:

TABLE FILE CAR
 SUM DEALER_COST
     RETAIL_COST
 ACROSS SEATS
 BY COUNTRY
 BY CAR
 BY MODEL
 ON COUNTRY SUBTOTAL AS 'Total: '
 ON TABLE SET STYLE *
  TYPE=SUBTOTAL, BY=COUNTRY, BACKCOLOR=SILVER, $
  TYPE=SUBTOTAL, BY=COUNTRY, COLUMN=COUNTRY, JUSTIFY=RIGHT, $
  TYPE=SUBTOTAL, BY=COUNTRY, COLUMN=RETAIL_COST(2), STYLE=BOLD+ITALIC, $
  TYPE=GRANDTOTAL, BACKCOLOR=GREY, $
  TYPE=GRANDTOTAL, COLUMN=COUNTRY, JUSTIFY=RIGHT, $
 ENDSTYLE
END


WebFOCUS 7.7.05
 
Posts: 1213 | Location: Seattle, Washington - USA | Registered: October 22, 2007Report 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 across more than one column

Copyright © 1996-2020 Information Builders