Focal Point
Column Merge?

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

May 27, 2005, 06:03 PM
slfmr
Column Merge?
I have a report that exports to excel with for example let's say 12 columns with titles. For the first 5 columns (with their titles), in excel I can merge and center a separate title above for them.

Having it look like this (somewhat):
Merge-Centered Title
Title1 Title2 Title3 Title4 Title 5
data data data data data
data ...

Is this possible to do in WebFocus. I have the report and it's general titles, but can i take a group of titles/columns and give it a title. In excel, to do that we would highlight all columns we want and select the <-a-> looking thing in the toolbar.

Can anyone help?
May 27, 2005, 06:04 PM
slfmr
Okay, my little example didn't come out the way I though it would, but can anyone help still?
May 27, 2005, 07:36 PM
k.lane
Of course you can. You just need to use HEADALIGN=BODY and COLSPAN to get what you need.

NOTE: C+0 denotes a left caret because of restrictions.

Here's an example:

TABLE FILE tablename
SUM COL1 AS ''
COL2 AS ''
BY SORT_COL AS ''

HEADING
" C+0 CENTERED HEADING"
"Col1 Title C+0 Col2 Title C+0 Col3 Title "

ON TABLE PCHOLD FORMAT EXL2K
ON TABLE SET STYLE *
TYPE=HEADING,HEADALIGN=BODY,$
TYPE=HEADING,OBJECT=TEXT, LINE=1,ITEM=1, COLSPAN=1, $
TYPE=HEADING,OBJECT=TEXT, LINE=1,ITEM=2, COLSPAN=2, JUSTIFY=CENTER,$
TYPE=HEADING,OBJECT=TEXT, LINE=2,ITEM=1, COLSPAN=1, JUSTIFY=CENTER,$
TYPE=HEADING,OBJECT=TEXT, LINE=2,ITEM=2, COLSPAN=1, JUSTIFY=CENTER,$
TYPE=HEADING,OBJECT=TEXT, LINE=2,ITEM=3, COLSPAN=1, JUSTIFY=CENTER,$
ENDSTYLE
END

Depending on how your report is structured, you may be able to interchange the heading with subheadings. Also be on the watch for the spaces within the heading and subheadings. These are included as ITEMs.

This should do the trick for you (or some variation).

Ken
May 27, 2005, 07:41 PM
susannah
yeah, you use a HEADING with ALIGN=BODY
and then your HEADING instead of being 1 wide cell, is a bunch of little cells, like your table body.
So your style sheet references
HEADING,LINE=3, ITEM=1,COLSPAN=2,COLOR=etc
Just make sure you COLSPANs all add up to however many fields you actually have in your table. Takes a bit of experimenting.
I've used LINE=3 here, thinking you might have 2 lines of ordinary heading, the 3rd being your last, and the one you want to spread out as column group titles.
You ok with this?
good weekend to you.
May 27, 2005, 07:42 PM
susannah
ah...looks like two of us answered at the same time. You should be good to go, now.
May 30, 2005, 08:28 PM
slfmr
Thanks to all!! I will try these out. Your help was much appreciated.
May 30, 2005, 08:58 PM
slfmr
I am having a problem. Perhaps I am missing something, but when i do this:

TABLE FILE HOLDREM
HEADING
"Plan Types < Family Member < Effective Dates"
SUM
etc...

It tells me that family member is not a valid field. I know why i am getting the error, but am I separating the items correctly since I want to only display a title for them?
May 30, 2005, 09:47 PM
k.lane
Anything following the left caret < in the heading will be assumed to be a heading, unless of course it has a spot marker such as <10, <+1.

If you're using the left caret to separate the items in the title, then use <+0.
May 30, 2005, 09:48 PM
k.lane
ooops....assumed to be a 'field' NOT a heading as I indicated.

Ken
May 31, 2005, 12:32 PM
slfmr
PERFECT!! Thanks so much everyone!!