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] Two columns with one column title

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED] Two columns with one column title
 Login/Join
 
Silver Member
posted
I have done some searching but could not find the solution for this. I maybe searching for the wrong keywords.

I have to columns next two each other and I want them to share one column title. How can I do that?

Thanks,

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


WebFocus 7.6.4
SQL
HTML and Excel
 
Posts: 49 | Registered: June 06, 2008Report This Post
Expert
posted Hide Post
Make the text a heading or subheading and use POSITION in the stylesheet to position the title starting at the first column.


Ginny
---------------------------------
Prod: WF 7.7.01 Dev: WF 7.6.9-11
Admin, MRE,self-service; adapters: Teradata, DB2, Oracle, SQL Server, Essbase, ESRI, FlexEnable, Google
 
Posts: 2723 | Location: Ann Arbor, MI | Registered: April 05, 2006Report This Post
Silver Member
posted Hide Post
If I put it in as a heading or subheading it will show up on a seperate line in excel...

Thanks,


WebFocus 7.6.4
SQL
HTML and Excel
 
Posts: 49 | Registered: June 06, 2008Report This Post
Guru
posted Hide Post
and you do want the two cells that would have been used in excel for the column titles merged?


Developer Studio 7.64
Win XP
Output: mostly HTML, also Excel and PDF

"Never attribute to malice that which can be adequately explained by stupidity." - Heinlein's Razor
 
Posts: 285 | Location: UK | Registered: October 26, 2007Report This Post
Silver Member
posted Hide Post
Yes...

Thanks,


WebFocus 7.6.4
SQL
HTML and Excel
 
Posts: 49 | Registered: June 06, 2008Report This Post
Virtuoso
posted Hide Post
In order to truly get what you are looking for, Ginny's suggestion is about the only way. If you want them all on one line, then you have to put all the column titles in the heading/subheading. Check out "Aligning a Heading or Footing Element Across Columns in an HTML Report" in the Creating Report with WF Language Manual.

There isn't a way to share a column title straight-up. You also may be able to create something that appears correctly by creating an compoud report with an empty report at the beginning containing the columns as you want them to appear and then a second report with the data on it without column titles, headings, etc.


Regards,

Darin



In FOCUS since 1991
WF Server: 7.7.04 on Linux and Z/OS, ReportCaster, Self-Service, MRE, Java, Flex
Data: DB2/UDB, Adabas, SQL Server Output: HTML,PDF,EXL2K/07, PS, AHTML, Flex
WF Client: 77 on Linux w/Tomcat
 
Posts: 2298 | Location: Salt Lake City, Utah | Registered: February 02, 2007Report This Post
Expert
posted Hide Post
Here's an example of what you're looking for created with the Dev Studio GUI. Look for HEADALIGN and COLSPAN.

TABLE FILE CAR
PRINT 
     COUNTRY
     CAR
     MODEL
     BODYTYPE
     SEATS
     LENGTH
     WIDTH
HEADING
"Country<+0>Car<+0>Model<+0>Body Type<+0>Seats<+0>Dimensions"
FOOTING
""
ON TABLE SET PAGE-NUM OFF 
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT EXL2K
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
     UNITS=IN,
     SQUEEZE=ON,
     ORIENTATION=PORTRAIT,
$
TYPE=REPORT,
     GRID=OFF,
     FONT='ARIAL',
     SIZE=9,
$
TYPE=TITLE,
     STYLE=BOLD,
$
TYPE=TABHEADING,
     SIZE=12,
     STYLE=BOLD,
$
TYPE=TABFOOTING,
     SIZE=12,
     STYLE=BOLD,
$
TYPE=HEADING,
     SIZE=12,
     STYLE=BOLD,
     HEADALIGN=BODY,
$
TYPE=HEADING,
     LINE=1,
     OBJECT=TEXT,
     ITEM=1,
     COLSPAN=1,
     JUSTIFY=LEFT,
$
TYPE=HEADING,
     LINE=1,
     OBJECT=TEXT,
     ITEM=2,
     COLSPAN=1,
     JUSTIFY=LEFT,
$
TYPE=HEADING,
     LINE=1,
     OBJECT=TEXT,
     ITEM=3,
     COLSPAN=1,
     JUSTIFY=LEFT,
$
TYPE=HEADING,
     LINE=1,
     OBJECT=TEXT,
     ITEM=4,
     COLSPAN=1,
     JUSTIFY=LEFT,
$
TYPE=HEADING,
     LINE=1,
     OBJECT=TEXT,
     ITEM=5,
     COLSPAN=1,
     JUSTIFY=RIGHT,
$
TYPE=HEADING,
     LINE=1,
     OBJECT=TEXT,
     ITEM=6,
     COLSPAN=2,
     JUSTIFY=CENTER,
$
TYPE=FOOTING,
     SIZE=12,
     STYLE=BOLD,
$
TYPE=SUBHEAD,
     SIZE=10,
     STYLE=BOLD,
$
TYPE=SUBFOOT,
     SIZE=10,
     STYLE=BOLD,
$
TYPE=SUBTOTAL,
     BACKCOLOR=RGB(210 210 210),
$
TYPE=ACROSSVALUE,
     SIZE=9,
$
TYPE=ACROSSTITLE,
     STYLE=BOLD,
$
TYPE=GRANDTOTAL,
     BACKCOLOR=RGB(210 210 210),
     STYLE=BOLD,
$
ENDSTYLE
END


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Guru
posted Hide Post
Using Francis's code - if you don't want two lines of column titles then shut off the original column titles:

COUNTRY AS ''
CAR AS ''
MODEL AS ''
BODYTYPE AS ''
SEATS AS ''
LENGTH AS ''
WIDTH AS ''

Or you could mix and match - depending on what you'd like to show on your report.


Release: WebFOCUS 7.6.8
OS: Windows
Output formats: HTML, PDF, Excel, csv
 
Posts: 256 | Registered: July 21, 2008Report This Post
Expert
posted Hide Post
Sorry, of course I should have done that. Thanks.


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Expert
posted Hide Post
i cheat ...
i right adjust the first column title
and left adjust the second column title
eg:
In the first column title i put 'Net'
and in the second column title i put 'Income'
then i use some nice background color, or font color , or borders, or some other style techniques to make these two columns look like 1 entity..
works.




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
 
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003Report This Post
Expert
posted Hide Post
I think this should be put into IBI as an NFR (New Feature Request)

How many of us have come across a request for a report where 2 columns have one heading ?


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
Guru
posted Hide Post
Even more...

Each column having it's own unique heading but a group having a group heading. (Francis's technique would allow for this but it would be nice to allow it out of the box).

For example:
 
--------------------------------------------------
        Financial         |         Body         |
--------------------------------------------------
Retail Cost | Dealer Cost | Seats | MPG | Height |   
--------------------------------------------------


And also the ability to have column titles print AFTER a subhead. That one really kills.


Release: WebFOCUS 7.6.8
OS: Windows
Output formats: HTML, PDF, Excel, csv
 
Posts: 256 | Registered: July 21, 2008Report This Post
Guru
posted Hide Post
quote:
Originally posted by susannah:
i cheat ...


i think this is the best way personally, i can't understand why you would want a shared coloumn title in excel for anything other than display purposes as it wont let you filter or sort those two columns once you merge the title cells and really the only reason our team outputs to excel is so the end user can manipulate the data.


Developer Studio 7.64
Win XP
Output: mostly HTML, also Excel and PDF

"Never attribute to malice that which can be adequately explained by stupidity." - Heinlein's Razor
 
Posts: 285 | Location: UK | Registered: October 26, 2007Report This Post
Member
posted Hide Post
Does this do what you want?

DEFINE FILE CAR
acolumn/A20='my column heading';
END
TABLE FILE CAR
SUM
LENGTH
WIDTH
BY MODEL
ACROSS acolumn
WHERE RECORDLIMIT EQ 500
ON TABLE NOTOTAL
END


WebFOCUS 7.6.4
Windows XP against an Oracle Database mainly SCT Banner Higher Education ODS and EDW
Various output formats


Guy Brenckle
Budget Analyst
University of Northern Colorado
 
Posts: 25 | Location: Greeley Colorado | Registered: October 08, 2007Report This Post
Expert
posted Hide Post
nubi,

"i can't understand why..." - actually I get a lot of requests to set up column titles like ChannyS example. I am perfectly happy using HEADING and HEADALIGN and POSITION, etc to achieve that.


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Expert
posted Hide Post
I too have many requests, just line the example, and yes you can do it as Francis suggests, but wouldn't it be easier with standard FOCUS code.

What is worse is when they want borders and/or back colours.


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
Virtuoso
posted Hide Post
quote:
And also the ability to have column titles print AFTER a subhead. That one really kills.


I support this...

and also more ideas about the headings.

Also Guy's suggestion is a simple solution that works well in HTML. I do not know how it acts with excel.




Frank

prod: WF 7.6.10 platform Windows,
databases: msSQL2000, msSQL2005, RMS, Oracle, Sybase,IE7
test: WF 7.6.10 on the same platform and databases,IE7

 
Posts: 2387 | Location: Amsterdam, the Netherlands | Registered: December 03, 2006Report This Post
Guru
posted Hide Post
quote:
Originally posted by Francis Mariani:
nubi,

"i can't understand why..." - actually I get a lot of requests to set up column titles like ChannyS example. I am perfectly happy using HEADING and HEADALIGN and POSITION, etc to achieve that.


im sure you do; it just seemed a bit counterintuitive in the context of the way we work, many reports of ours with merged cells often gets a customer request at some stage to remove them and make it easier to manipulate-and we use a lot of Dialogue Manager to remove merged cells from the report if they select the excel output...


Developer Studio 7.64
Win XP
Output: mostly HTML, also Excel and PDF

"Never attribute to malice that which can be adequately explained by stupidity." - Heinlein's Razor
 
Posts: 285 | Location: UK | Registered: October 26, 2007Report This Post
Guru
posted Hide Post
quote:
Originally posted by FrankDutch:
quote:
And also the ability to have column titles print AFTER a subhead. That one really kills.


I support this...

and also more ideas about the headings.

Also Guy's suggestion is a simple solution that works well in HTML. I do not know how it acts with excel.


Another one (especially since we sometimes have to put column titles as the last row of subheads since the titles only show up before subheads...):
The ability to put borders/grids around elements of a heading/footing. This one kills too!!!


Release: WebFOCUS 7.6.8
OS: Windows
Output formats: HTML, PDF, Excel, csv
 
Posts: 256 | Registered: July 21, 2008Report This Post
Gold member
posted Hide Post
I need the same format as this.
I was able to get the column titles but, I am not able to get the borders around the heading for each individual item. What is the best way to do this?

quote:
--------------------------------------------------
Financial | Body |
--------------------------------------------------
Retail Cost | Dealer Cost | Seats | MPG | Height |
--------------------------------------------------


Thank you.


7.7.01,windows2008 R2
 
Posts: 65 | Registered: July 28, 2011Report 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] Two columns with one column title

Copyright © 1996-2020 Information Builders