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     Wrap does not work in EXL2K, works in HTML

Read-Only Read-Only Topic
Go
Search
Notify
Tools
Wrap does not work in EXL2K, works in HTML
 Login/Join
 
Platinum Member
posted
Hi All

I have a report output HTML or Excel. Has two sections
in HTML it wraps but when run in EXL2K, it does not wrap. I have looked in the forum, and tried the suggestion made here, but still does not work..
I have a Very long stylesheet, I will post the relevant section.. Top Section and the code for the part of the stylesheet, that wraps in HTML, but not in EXL2k

Thanks
 
ON TABLE SET STYLE *
           UNITS=IN,
           PAGESIZE='Letter',
           LEFTMARGIN=0.500000,
           RIGHTMARGIN=0.500000,
           TOPMARGIN=0.500000,
           BOTTOMMARGIN=0.500000,
           SQUEEZE=ON,
           GRID=OFF,
           ORIENTATION=LANDSCAPE,
           WRAP=OFF,
		   $
-* at Report Level
TYPE=REPORT,FONT='ARIAL',SIZE=&FSIZE1.EVAL,$
TYPE=DATA,JUSTIFY=RIGHT,$
-* Heading/Subheading at Location Level
TYPE=SUBHEAD,BY=GLRE_LOC_ID,HEADALIGN=BODY,SIZE=&FSIZE1.EVAL,STYLE=BOLD,WRAP=OFF,JUSTIFY=CENTER,$
..
..
-* Following is the section that needs to wrap in Excel.. It DOES wrap in HTML
TYPE=SUBHEAD,LINE=25,HEADALIGN=BODY,SIZE=&FSIZE2.EVAL,COLOR=WHITE,BACKCOLOR='BLUE', SQUEEZE=1,WRAP=1,JUSTIFY=LEFT,$
..
ENDSTYLE
END

 


Prod/Dev/Test: WF 8.1.5 on (Windows Server 2012 R2 )
SandBox: WebFocus Server 8.1.5 on Windows Server 2008 R2
WebFOCUS App Studio 8.1.5 and Developer Studio 8.1.5 on Windows 7
 
Posts: 134 | Location: USA | Registered: August 21, 2008Report This Post
Master
posted Hide Post
Strange, because in our shop, all excel output, every cell wraps automatically. We never use WRAP or SQUEEZE. The only time we use WRAP is to control the physical width of a column, like this:

TYPE=REPORT, COLUMN=CNTYNM, WRAP=1.2,$

Seem I have read somewhere that using SQUEEZE with WRAP ignores WRAP.

We've gotten away from this and use Excel Macros in Templates to do a lot of our formatting.


In FOCUS since 1985. Prod WF 8.0.08 (z90/Suse Linux) DB (Oracle 11g), Self Serv, Report Caster, WebServer Intel/Linux.
 
Posts: 975 | Location: Oklahoma City | Registered: October 27, 2006Report This Post
Guru
posted Hide Post
From the document:

The WRAP and SQUEEZE attributes are incompatible. You should not apply both of them to the same report component.

jgelona is correct, please check the document you'll find some useful informations.You can search in index "wrapping data EXL2K display format"


-Rifaz

WebFOCUS 7.7.x and 8.x
 
Posts: 406 | Location: India | Registered: June 13, 2013Report This Post
Platinum Member
posted Hide Post
Thanks jgelona and Rifaz..

Checked documents and tried on CAR file.. It works as it says in the documents..both in HTML & EXL2K.. The document sample code is using PRINT Col1, COl2 etc..
BUT
my columns headings/data in ON TABLE Sorted Col SUBHEADS

here is a sample code.. It does wrap in HTML format.. but does not in EXL2K
 
ON LINE_DESC1 SUBHEAD
"Financial Analysis<+0>Goal<+0><MAX.PERIOD1<+0><MAX.PERIOD2<+0><MAX.PERIOD3<+0><MAX.PERIOD4<+0><MAX.PERIOD5<+0><MAX.PERIOD6<+0><MAX.PERIOD7<+0><MAX.PERIOD8<+0><MAX.PERIOD9<+0><MAX.PERIOD10<+0><MAX.PERIOD11<+0><MAX.PERIOD12<+0>12 Mo Trailing Avg<+0>12 Mo Avg from Goal<+0>Financial Impact"
"Income <+0>(12 Mo. Total)"
"<LDESC1<+0><GOAL_DUMMY<+0><MTD_AMT1<+0><MTD_AMT2<+0><MTD_AMT3<+0><MTD_AMT4<+0><MTD_AMT5<+0><MTD_AMT6<+0><MTD_AMT7<+0><MTD_AMT8<+0><MTD_AMT9<+0><MTD_AMT10<+0><MTD_AMT11<+0><MTD_AMT12<+0><MTD_AMTTOT><+0><BLK_GOAL<+0><BLK_FIMP"

 


Thanks


Prod/Dev/Test: WF 8.1.5 on (Windows Server 2012 R2 )
SandBox: WebFocus Server 8.1.5 on Windows Server 2008 R2
WebFOCUS App Studio 8.1.5 and Developer Studio 8.1.5 on Windows 7
 
Posts: 134 | Location: USA | Registered: August 21, 2008Report This Post
Platinum Member
posted Hide Post
I have created this example using CAR file. The last Line called "Wrap data" 1222--- 23333333333 needs to be wrapped in HTML and Excel.

Any ideas?

Thanks

 
-SET &WFFMT='HTML';
-*SET &WFFMT='EXL2K';
-RUN
DEFINE FILE CAR
COUNTRY1/A10=IF COUNTRY EQ 'ENGLAND' THEN 'ENGLAND' ELSE '';
COUNTRY2/A10=IF COUNTRY EQ 'FRANCE'  THEN 'FRANCE'  ELSE '';
COUNTRY3/A10=IF COUNTRY EQ 'ITALY'   THEN 'ITALY'   ELSE '';
COUNTRY4/A10=IF COUNTRY EQ 'JAPAN'   THEN 'JAPAN'   ELSE '';
COUNTRY5/A10=IF COUNTRY EQ 'W GERMANY' THEN 'W GERMANY' ELSE '';
SALES1/D11.2 WITH CAR = IF COUNTRY EQ 'ENGLAND'   THEN SALES ELSE 0;
SALES2/D11.2 WITH CAR = IF COUNTRY EQ 'FRANCE'    THEN SALES ELSE 0;
SALES3/D11.2 WITH CAR = IF COUNTRY EQ 'ITALY'     THEN SALES ELSE 0;
SALES4/D11.2 WITH CAR = IF COUNTRY EQ 'JAPAN'     THEN SALES ELSE 0;
SALES5/D11.2 WITH CAR = IF COUNTRY EQ 'W GERMANY' THEN SALES ELSE 0;
-* For Wrap test
SALE2/A115 WITH CAR = '1222--- 23333333333';
RPTLINE/A12 WITH CAR = 'REPORT 1';
END
-RUN
TABLE FILE CAR
SUM
MAX.COUNTRY1
MAX.COUNTRY2
MAX.COUNTRY3
MAX.COUNTRY4
MAX.COUNTRY5
MAX.SALES1
MAX.SALES2
MAX.SALES3
MAX.SALES4
MAX.SALES5
SALE2
BY RPTLINE
ON TABLE HOLD AS RPT1 FORMAT FOCUS INDEX RPTLINE
END
-RUN
-*EXIT
TABLE FILE RPT1
SUM SALE2 NOPRINT
BY RPTLINE NOPRINT
ON RPTLINE SUBHEAD
"Country<+0><COUNTRY1<+0><COUNTRY2<+0><COUNTRY3<+0><COUNTRY4<+0><COUNTRY5"
"Sales<+0><SALES1<+0><SALES2<+0><SALES3<+0><SALES4<+0><SALES5"
"Wrap data<+0><SALE2>"
ON TABLE SET PAGE NOLEAD
ON TABLE SET HTMLCSS ON
FOOTING
"*This is a Footer line"
-* SIZE1 IS HEADING FONT
-SET &FSIZE1='8';
-* SIZE2 - IS DATA FONTS
-SET &FSIZE2='8';
-* SIZE3 IS SUBHEADING FONTS
-SET &FSIZE3='7';
-IF &WFFMT EQ 'EXL2K' THEN GOTO RPTINEXL;
-IF &WFFMT EQ 'PDF'   THEN GOTO RPTINPDF;
ON TABLE PCHOLD FORMAT HTML
-GOTO MOVEON
-RPTINEXL
-* fONTS for excel
-SET &FSIZE1='12';
-SET &FSIZE2='8';
-SET &FSIZE3='10';
ON TABLE SET PAGE-NUM NOLEAD
ON TABLE SET HTMLCSS ON
ON TABLE NOTOTAL
ON TABLE SET COMPOUND BYTOC
ON TABLE PCHOLD FORMAT EXL2K OPEN NOBREAK
-GOTO MOVEON
-RPTINPDF
-* for pdf
ON TABLE SET PAGE-NUM NOLEAD
ON TABLE SET HTMLCSS ON
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT PDF
-MOVEON
ON TABLE SET STYLE *
           UNITS=IN,
           PAGESIZE='Letter',
           LEFTMARGIN=0.500000,
           RIGHTMARGIN=0.500000,
           TOPMARGIN=0.500000,
           BOTTOMMARGIN=0.500000,
           SQUEEZE=ON,
           GRID=OFF,
           ORIENTATION=LANDSCAPE,
           WRAP=OFF,
-* at Report Level
TYPE=REPORT,FONT='ARIAL',SIZE=&FSIZE1.EVAL,$
TYPE=SUBHEAD,BY=RPTLINE,LINE=1,HEADALIGN=BODY,SIZE=&FSIZE2.EVAL,COLOR=WHITE,BACKCOLOR='BLUE',JUSTIFY=LEFT,$
TYPE=SUBHEAD,BY=RPTLINE,LINE=1,ITEM=1,WIDTH=1,COLOR=WHITE,$
TYPE=SUBHEAD,BY=RPTLINE,LINE=1,OBJECT=FIELD,ITEM=1,WIDTH=1,COLOR=WHITE,$
TYPE=SUBHEAD,BY=RPTLINE,LINE=1,OBJECT=FIELD,ITEM=2,WIDTH=.75,COLOR=WHITE,$
TYPE=SUBHEAD,BY=RPTLINE,LINE=1,OBJECT=FIELD,ITEM=3,WIDTH=.75,COLOR=WHITE,$
TYPE=SUBHEAD,BY=RPTLINE,LINE=1,OBJECT=FIELD,ITEM=4,WIDTH=.75,COLOR=WHITE,$
TYPE=SUBHEAD,BY=RPTLINE,LINE=1,OBJECT=FIELD,ITEM=5,WIDTH=.75,COLOR=WHITE,$
-*"Sales<+0><SALES1<+0><SALES2<+0><SALES3<+0><SALES4<+0><SALES5"
TYPE=SUBHEAD,BY=RPTLINE,LINE=2,ITEM=1,WIDTH=1,COLOR=BLACK,$
-* if diff type object resets the ITEM no
TYPE=SUBHEAD,BY=RPTLINE,LINE=2,OBJECT=FIELD,ITEM=1,WIDTH=1,JUSTIFY=LEFT,COLOR=RED,$
TYPE=SUBHEAD,BY=RPTLINE,LINE=2,OBJECT=FIELD,ITEM=2,WIDTH=1,JUSTIFY=LEFT,COLOR=RED,$
TYPE=SUBHEAD,BY=RPTLINE,LINE=2,OBJECT=FIELD,ITEM=3,WIDTH=1,JUSTIFY=LEFT,COLOR=RED,$
TYPE=SUBHEAD,BY=RPTLINE,LINE=2,OBJECT=FIELD,ITEM=4,WIDTH=1,JUSTIFY=LEFT,COLOR=RED,$
TYPE=SUBHEAD,BY=RPTLINE,LINE=2,OBJECT=FIELD,ITEM=5,WIDTH=1,JUSTIFY=LEFT,COLOR=RED,$
TYPE=SUBHEAD,BY=RPTLINE,LINE=2,OBJECT=FIELD,ITEM=6,WIDTH=1,JUSTIFY=LEFT,COLOR=RED,$
-* LINE 3 WRAP
TYPE=SUBHEAD,BY=RPTLINE,LINE=3,ITEM=1,WIDTH=1,JUSTIFY=LEFT,COLOR=RED,WRAP=ON,$
TYPE=SUBHEAD,BY=RPTLINE,LINE=3,OBJECT=FIELD,ITEM=2,JUSTIFY=LEFT,COLOR=GREEN,WRAP=ON,$
ENDSTYLE
END
-EXIT
 
.


Prod/Dev/Test: WF 8.1.5 on (Windows Server 2012 R2 )
SandBox: WebFocus Server 8.1.5 on Windows Server 2008 R2
WebFOCUS App Studio 8.1.5 and Developer Studio 8.1.5 on Windows 7
 
Posts: 134 | Location: USA | Registered: August 21, 2008Report This Post
Expert
posted Hide Post
The styling needed to be cleaned up quite a bit. Width won't do it, and you cannot have different widths for different rows, at least not for Excel.

You cannot play with column widths when your report is composed of heading, subheading, footing or subfooting lines only. HEADALIGN must be used for all lines of a heading, not particular lines.

In my example below, I have one report row, made up of six blank values - one column for each of your subheading components. You can play with column widths for report columns. You may have to change the WRAP value depending on EXL2K or HTML output.




-SET &WFFMT='HTML';
-*-SET &WFFMT='EXL2K';

DEFINE FILE CAR
COUNTRY1/A10=IF COUNTRY EQ 'ENGLAND' THEN 'ENGLAND' ELSE '';
COUNTRY2/A10=IF COUNTRY EQ 'FRANCE'  THEN 'FRANCE'  ELSE '';
COUNTRY3/A10=IF COUNTRY EQ 'ITALY'   THEN 'ITALY'   ELSE '';
COUNTRY4/A10=IF COUNTRY EQ 'JAPAN'   THEN 'JAPAN'   ELSE '';
COUNTRY5/A10=IF COUNTRY EQ 'W GERMANY' THEN 'W GERMANY' ELSE '';
SALES1/D11.2 = IF COUNTRY EQ 'ENGLAND'   THEN SALES ELSE 0;
SALES2/D11.2 = IF COUNTRY EQ 'FRANCE'    THEN SALES ELSE 0;
SALES3/D11.2 = IF COUNTRY EQ 'ITALY'     THEN SALES ELSE 0;
SALES4/D11.2 = IF COUNTRY EQ 'JAPAN'     THEN SALES ELSE 0;
SALES5/D11.2 = IF COUNTRY EQ 'W GERMANY' THEN SALES ELSE 0;
-* For Wrap test
SALE2/A115 WITH CAR = '1222--- 23333333333';
RPTLINE/A12 WITH CAR = 'REPORT 1';
END
-RUN

TABLE FILE CAR
SUM
MAX.COUNTRY1
MAX.COUNTRY2
MAX.COUNTRY3
MAX.COUNTRY4
MAX.COUNTRY5
MAX.SALES1
MAX.SALES2
MAX.SALES3
MAX.SALES4
MAX.SALES5
SALE2
BY RPTLINE
ON TABLE HOLD AS RPT1 FORMAT FOCUS INDEX RPTLINE
END
-RUN

TABLE FILE RPT1
SUM SALE2 NOPRINT
COMPUTE DUMMY0/A1 = ''; AS ''
COMPUTE DUMMY1/A1 = ''; AS ''
COMPUTE DUMMY2/A1 = ''; AS ''
COMPUTE DUMMY3/A1 = ''; AS ''
COMPUTE DUMMY4/A1 = ''; AS ''
COMPUTE DUMMY5/A1 = ''; AS ''

BY RPTLINE NOPRINT

ON RPTLINE SUBHEAD
"Country<+0><COUNTRY1<+0><COUNTRY2<+0><COUNTRY3<+0><COUNTRY4<+0><COUNTRY5"
"Sales<+0><SALES1<+0><SALES2<+0><SALES3<+0><SALES4<+0><SALES5"
"Wrap data<+0><SALE2>"

ON TABLE SET PAGE NOLEAD
ON TABLE SET HTMLCSS ON

FOOTING
"*This is a Footer line"
-* SIZE1 IS HEADING FONT
-SET &FSIZE1='8';
-* SIZE2 - IS DATA FONTS
-SET &FSIZE2='8';
-* SIZE3 IS SUBHEADING FONTS
-SET &FSIZE3='7';

-IF &WFFMT EQ 'EXL2K' THEN GOTO RPTINEXL;
-IF &WFFMT EQ 'PDF'   THEN GOTO RPTINPDF;

ON TABLE PCHOLD FORMAT HTML
-GOTO MOVEON

-RPTINEXL
-* fONTS for excel
-SET &FSIZE1='12';
-SET &FSIZE2='8';
-SET &FSIZE3='10';
ON TABLE SET PAGE-NUM NOLEAD
ON TABLE SET HTMLCSS ON
ON TABLE NOTOTAL
ON TABLE SET COMPOUND BYTOC
ON TABLE PCHOLD FORMAT EXL2K OPEN NOBREAK
-GOTO MOVEON

-RPTINPDF
-* for pdf
ON TABLE SET PAGE-NUM NOLEAD
ON TABLE SET HTMLCSS ON
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT PDF

-MOVEON
ON TABLE SET STYLE *
           SQUEEZE=ON,
           GRID=OFF,

-* at Report Level
TYPE=REPORT, FONT='ARIAL', SIZE=&FSIZE1.EVAL, $

TYPE=REPORT, COLUMN=DUMMY0, WRAP=0.5, $
TYPE=REPORT, COLUMN=DUMMY1, WRAP=1.0, $
TYPE=REPORT, COLUMN=DUMMY2, WRAP=1.0, $
TYPE=REPORT, COLUMN=DUMMY3, WRAP=1.0, $
TYPE=REPORT, COLUMN=DUMMY4, WRAP=1.0, $
TYPE=REPORT, COLUMN=DUMMY5, WRAP=1.0, $

TYPE=SUBHEAD, HEADALIGN=BODY, $

TYPE=SUBHEAD, BY=RPTLINE, LINE=1, SIZE=&FSIZE2.EVAL, COLOR=WHITE, BACKCOLOR='BLUE', JUSTIFY=LEFT, $
TYPE=SUBHEAD, BY=RPTLINE, LINE=1, ITEM=1, COLOR=WHITE, $
TYPE=SUBHEAD, BY=RPTLINE, LINE=1, OBJECT=FIELD, ITEM=1, COLOR=WHITE, $
TYPE=SUBHEAD, BY=RPTLINE, LINE=1, OBJECT=FIELD, ITEM=2, COLOR=WHITE, $
TYPE=SUBHEAD, BY=RPTLINE, LINE=1, OBJECT=FIELD, ITEM=3, COLOR=WHITE, $
TYPE=SUBHEAD, BY=RPTLINE, LINE=1, OBJECT=FIELD, ITEM=4, COLOR=WHITE, $
TYPE=SUBHEAD, BY=RPTLINE, LINE=1, OBJECT=FIELD, ITEM=5, COLOR=WHITE, $

-*"Sales<+0><SALES1<+0><SALES2<+0><SALES3<+0><SALES4<+0><SALES5"
TYPE=SUBHEAD, BY=RPTLINE, LINE=2, ITEM=1, COLOR=BLACK, $

-* if diff type object resets the ITEM no
TYPE=SUBHEAD, BY=RPTLINE, LINE=2, OBJECT=FIELD, ITEM=1, JUSTIFY=LEFT, COLOR=RED, $
TYPE=SUBHEAD, BY=RPTLINE, LINE=2, OBJECT=FIELD, ITEM=2, JUSTIFY=LEFT, COLOR=RED, $
TYPE=SUBHEAD, BY=RPTLINE, LINE=2, OBJECT=FIELD, ITEM=3, JUSTIFY=LEFT, COLOR=RED, $
TYPE=SUBHEAD, BY=RPTLINE, LINE=2, OBJECT=FIELD, ITEM=4, JUSTIFY=LEFT, COLOR=RED, $
TYPE=SUBHEAD, BY=RPTLINE, LINE=2, OBJECT=FIELD, ITEM=5, JUSTIFY=LEFT, COLOR=RED, $
TYPE=SUBHEAD, BY=RPTLINE, LINE=2, OBJECT=FIELD, ITEM=6, JUSTIFY=LEFT, COLOR=RED, $

-* LINE 3 WRAP
TYPE=SUBHEAD, BY=RPTLINE, LINE=3, ITEM=1, JUSTIFY=LEFT, COLOR=RED, $
TYPE=SUBHEAD, BY=RPTLINE, LINE=3, OBJECT=FIELD, ITEM=1, JUSTIFY=LEFT, COLOR=GREEN, $
ENDSTYLE
END
-RUN


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
Platinum Member
posted Hide Post
Thanks Francis
The above code was just a quick lines to mimic what my lengthy code is, focusing on the wrap issue..
I reviewed all your comments, make sense.. I have those in my original code (not posted here)
but what made the difference was your idea of using Dummy fields, which resolved the issue I had..
Invisible columns with Wrap on

Thanks a Lot


Prod/Dev/Test: WF 8.1.5 on (Windows Server 2012 R2 )
SandBox: WebFocus Server 8.1.5 on Windows Server 2008 R2
WebFOCUS App Studio 8.1.5 and Developer Studio 8.1.5 on Windows 7
 
Posts: 134 | Location: USA | Registered: August 21, 2008Report This Post
Expert
posted Hide Post




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
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     Wrap does not work in EXL2K, works in HTML

Copyright © 1996-2020 Information Builders