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] Merge Cells

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED] Merge Cells
 Login/Join
 
Platinum Member
posted
There are few postings already about column merge but none of them are useful for the format I am trying to achieve. Please review the image. I am trying to merge the cells in the column conditionally. I am trying achieve this in HTML, PDF and Excel formats. Please let me know if you guys have any suggestions.


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


WebFOCUS 8207.11
App Studio 8207
 
Posts: 146 | Registered: January 06, 2009Report This Post
Expert
posted Hide Post
To do this in all the formats will be quite difficult.

If you don't want the grid, then it is possible, but you will need to create the report/parts of the report as SUBHEADs, and use colspan or position to get the fields in the right spot.


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
Expert
posted Hide Post
Consider setting the column width using SQUEEZE.
 
Posts: 3132 | Location: Tennessee, Nashville area | Registered: February 23, 2005Report This Post
Platinum Member
posted Hide Post
quote:
Originally posted by Waz:
.....report as SUBHEADs, and use colspan ....


Although the sample looks simple the actual report is complex. It has lot of data. The client is very particular about the borders around the cells. Hence, I cannot put the data in the subheads. Any other suggestions? Thanks.


WebFOCUS 8207.11
App Studio 8207
 
Posts: 146 | Registered: January 06, 2009Report This Post
Platinum Member
posted Hide Post
quote:
Originally posted by Doug:
Consider setting the column width using SQUEEZE.

You are right. I can use column width and SQUEEZE to control the width of the columns. But I cannot merge columns. Any other suggestions?


WebFOCUS 8207.11
App Studio 8207
 
Posts: 146 | Registered: January 06, 2009Report This Post
Expert
posted Hide Post
Don't you want to see the data in the SEATS and SALES columns? If DESCRIPTION column were to be merged with the SEATS and SALES columns, then you wouldn't see thos columns.
 
Posts: 3132 | Location: Tennessee, Nashville area | Registered: February 23, 2005Report This Post
Platinum Member
posted Hide Post
quote:
Originally posted by Doug:
Don't you want to see the data in the SEATS and SALES columns? If DESCRIPTION column were to be merged with the SEATS and SALES columns, then you wouldn't see thos columns.

That is true. The sample is just a mockup. In my report, the data is different for each sort field.


WebFOCUS 8207.11
App Studio 8207
 
Posts: 146 | Registered: January 06, 2009Report This Post
Expert
posted Hide Post
You must keep in mind that WebFOCUS output is tabular in nature.

HTML and Excel by default support spanning columns, but WebFOCUS generation of PDF does not.

I can think of one possibility, but as anyone who really knows me, it is way out there, and very complicated.

If I can find the time, I'll try to create an example, PDF only.


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
Expert
posted Hide Post
OK, here is my example for PDF....

This works for this example, but may not be able to be implemented for other reports.

TABLE FILE CAR
SUM
RETAIL_COST
COMPUTE CNTR/I9 = LAST CNTR + 1 ;
COMPUTE DESCRIPTION1/A50 = DECODE CNTR (1 'DISCOUNT 1%'
                                        2 'IN STOCK'
                                     ELSE ' ') ;
COMPUTE DESCRIPTION2/A50 = DECODE CNTR (1 'DISCOUNT 1%'
                                        2 'IN STOCK'
                                        3 'THIS CAR HAS BEEN SUBJECT TO TESTING'
                                        4 'MARKED FOR SALE. ANY OFFER.'
                                     ELSE ' ') ;
COMPUTE MERGECELLS/A1    = IF CNTR IN (3,4) THEN 'Y' ELSE 'N' ;
COMPUTE SEATS/I3 MISSING ON = IF CNTR IN (3,4) THEN MISSING ELSE SEATS ;
COMPUTE SALES/I6 MISSING ON = IF CNTR IN (3,4) THEN MISSING ELSE SALES ;
BY COUNTRY
BY BODYTYPE
ON TABLE HOLD AS TMP_DATA
ON TABLE SET HOLDLIST PRINTONLY
END

SET NODATA = ' '

SET HTMLARCHIVE=ON
COMPOUND LAYOUT PCHOLD FORMAT PDF
UNITS=CM, $
SECTION=section1, LAYOUT=ON, METADATA='0.5^0.5^0.5^0.5^4', MERGE=OFF, ORIENTATION=PORTRAIT, PAGESIZE=A4, $
PAGELAYOUT=1, NAME='Parameters', text='Statement Parameters', TOC-LEVEL=1, BOTTOMMARGIN=0.5, TOPMARGIN=0.5, METADATA='BOTTOMMARGIN=0.5,TOPMARGIN=0.5,LEFTMARGIN=0,RIGHTMARGIN=0,', $
COMPONENT='RPT1', TEXT='Under', TOC-LEVEL=2, POSITION=(0.478 0.478), DIMENSION=(* *), METADATA='Z-INDEX: 100; LEFT: 0.478cm; WIDTH: 19.949cm; POSITION: absolute; TOP: 0.478cm; HEIGHT: 13.467cm', $
COMPONENT='RPT2', TEXT='Over' , TOC-LEVEL=1, POSITION=(0.478 0.478), DIMENSION=(* *), RELATIVE-TO='a_5610_0', RELATIVE-POINT=BOTTOM-LEFT, POSITION-POINT=TOP-LEFT, METADATA='Z-INDEX: 100; LEFT: 20px; WIDTH: 750px; POSITION: absolute; TOP: 534px; HEIGHT: 150px', $
END
SET COMPONENT='RPT1'
-*component_type report
TABLE FILE TMP_DATA
SUM
RETAIL_COST
DESCRIPTION1    AS 'DESCRIPTION'
SEATS
SALES
MERGECELLS NOPRINT
BY COUNTRY
BY BODYTYPE
ON TABLE SET PAGE NOPAGE
ON TABLE SET STYLE *
 SQUEEZE=ON, $
 TYPE=REPORT, BORDER=MEDIUM, $
 TYPE=REPORT, COLUMN=SEATS, BORDER-LEFT=OFF,BORDER-RIGHT=OFF,WHEN=MERGECELLS EQ 'Y', $
 TYPE=REPORT, COLUMN=SALES, BORDER-LEFT=OFF,BORDER-RIGHT=OFF,WHEN=MERGECELLS EQ 'Y', $
ENDSTYLE
END
SET COMPONENT='RPT2'
-*component_type report
TABLE FILE TMP_DATA
SUM
RETAIL_COST
DESCRIPTION2    AS ''
BY COUNTRY
BY BODYTYPE
ON TABLE SET PAGE NOPAGE
ON TABLE SET STYLE *
 SQUEEZE=ON, $
 TYPE=REPORT, BORDER=MEDIUM, $
 TYPE=REPORT, COLUMN=DESCRIPTION2, BORDER=OFF, $
ENDSTYLE
END
COMPOUND END


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
Expert
posted Hide Post
Smiler I like the overlay technique...
Afterall: Necessity is the mother of inventions (for the creative mind)
 
Posts: 3132 | Location: Tennessee, Nashville area | Registered: February 23, 2005Report This Post
Platinum Member
posted Hide Post
Thanks for the reply Waz. Your example works great for the same size reports so that they can be overlaid over each other to appear as single report. Good technique. However, it may not work for my report. I guess in my posting I have put a simple example. My report is not simple. There are many rows, wraps and merge conditions.


WebFOCUS 8207.11
App Studio 8207
 
Posts: 146 | Registered: January 06, 2009Report This Post
Virtuoso
posted Hide Post
Another approach:

-SET &OUTPUT = 'HTML';
-*
DEFINE FILE CAR
 TITLEX/A15 WITH BODYTYPE = ' ';
 COUNTER/I5 WITH BODYTYPE = LAST COUNTER + 1 ;
END
-*
TABLE FILE CAR
 BY TITLEX    NOPRINT
 BY COUNTER   NOPRINT
 ON TITLEX SUBHEAD
  "Country<+0>Retail Cost<+0>Model<+0>Seats<+0>Sales"
 ON COUNTER SUBFOOT
  "<COUNTRY<RETAIL_COST<MODEL"
  WHEN COUNTRY EQ 'JAPAN';
 ON COUNTER SUBFOOT
  "<COUNTRY<RETAIL_COST<MODEL<SEATS<SALES"
  WHEN COUNTRY NE 'JAPAN';
 ON TABLE SET PAGE-NUM NOLEAD
 ON TABLE SET HTMLCSS ON
 ON TABLE SET STYLE *
  TYPE=REPORT, HEADALIGN=BODY, $
-GOTO :&OUTPUT
-:EXL2K
-:PDF
  TYPE=SUBHEAD, OBJECT=TEXT,  ITEM=2, POSITION=1.5, $
  TYPE=SUBHEAD, OBJECT=TEXT,  ITEM=3, POSITION=3.0, $
  TYPE=SUBHEAD, OBJECT=TEXT,  ITEM=4, POSITION=5.0, $
  TYPE=SUBHEAD, OBJECT=TEXT,  ITEM=5, POSITION=6.0, $
  TYPE=SUBFOOT, OBJECT=FIELD, ITEM=2, POSITION=1.5, JUSTIFY=RIGHT, $
  TYPE=SUBFOOT, OBJECT=FIELD, ITEM=3, POSITION=3.0, $
  TYPE=SUBFOOT, OBJECT=FIELD, ITEM=3, POSITION=3.0, COLSPAN=3, WHEN=COUNTRY EQ 'JAPAN', $
  TYPE=SUBFOOT, OBJECT=FIELD, ITEM=4, POSITION=5.0, JUSTIFY=RIGHT, $
  TYPE=SUBFOOT, OBJECT=FIELD, ITEM=5, POSITION=6.0, JUSTIFY=RIGHT, $
-GOTO :ENDSTYLE
-:HTML
  TYPE=SUBFOOT, OBJECT=FIELD, ITEM=2, JUSTIFY=RIGHT, $
  TYPE=SUBFOOT, OBJECT=FIELD, ITEM=3, COLSPAN=3, WHEN=COUNTRY EQ 'JAPAN', $
  TYPE=SUBFOOT, OBJECT=FIELD, ITEM=4, JUSTIFY=RIGHT, $
  TYPE=SUBFOOT, OBJECT=FIELD, ITEM=5, JUSTIFY=RIGHT, $
-:ENDSTYLE
 ENDSTYLE
 ON TABLE PCHOLD FORMAT &OUTPUT
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] Merge Cells

Copyright © 1996-2020 Information Builders