Focal Point
[SOLVED]WRAP and OVER together don't work properly

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

October 26, 2009, 04:20 PM
OnQuest
[SOLVED]WRAP and OVER together don't work properly
I'm having problems with WRAP on a OVER column. My source data is large text with multiple lines but my output shows one line for this column that goes all the way to the right of page and breaks there. Output format is PDF.

I also tried SQUEEZE which actually truncates the data (puts a ! at the end).
I have seen a number of posts on the forum, the closest was by Francis MAriani..
Post
..where the direction was to use MORE. that didn't work out for me.
Any ideas how to do this?
Thanks.

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


WebFOCUS 767, Windows XP
Excel, HTML, PDF
October 26, 2009, 05:18 PM
john drews
Can you show us the code you are using?


7.7.02 on Windows
October 27, 2009, 10:25 AM
Francis Mariani
This code illustrates the problem:

TABLE FILE CAR
SUM
COMPUTE DUMMY1/A400 =
       WARRANTY  || (' ' | STANDARD) ||
(' ' | WARRANTY) || (' ' | STANDARD) ||
(' ' | WARRANTY) || (' ' | STANDARD); AS ''

OVER

COMPUTE DUMMY2/A400 =
       STANDARD  || (' ' | WARRANTY) ||
(' ' | STANDARD) || (' ' | WARRANTY) ||
(' ' | STANDARD) || (' ' | WARRANTY); AS ''

BY COUNTRY

ON TABLE SET STYLE *
TYPE=REPORT, PAGESIZE=LETTER, ORIENTATION=LANDSCAPE, FONT='Arial', SIZE=9, BOTTOMGAP=.05, $$
TYPE=REPORT, COLUMN=DUMMY1, WRAP=5, COLOR=BLUE, $
TYPE=REPORT, COLUMN=DUMMY2, WRAP=5, COLOR=GREEN, $
ENDSTYLE
ON TABLE PCHOLD FORMAT PDF
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
October 27, 2009, 10:34 AM
Francis Mariani
Methinks this is a bug, and bad news, they've papered-over the bug with a statement about OVER not supported with WRAP:

Creating Reports With WebFOCUS Language > Formatting Report Data > Positioning Data in a Report:

quote:
Reference: Usage Notes for WRAP and SQUEEZE
Most Web browsers—by default—determine the width of a report column using an internal algorithm. If a data value exceeds the column's width, the browser wraps that data onto the next line of the column. If you want to prevent these line breaks, you can override this browser behavior by using the WRAP StyleSheet attribute.
Specifying a width is supported in HTML reports that generate an internal Cascading Style Sheet, as well as in PDF and PostScript reports.
The WRAP and SQUEEZE attributes are incompatible. You should not apply both of them to the same report component.
The OVER attribute is not supported with WRAP.
The WRAP attribute is for alphanumeric columns, and is not supported for text (TX) columns.



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
October 27, 2009, 10:48 AM
Francis Mariani
The work-around using the MORE command:

SET HOLDLIST=PRINTONLY
SET HOLDFORMAT=ALPHA

TABLE FILE CAR
SUM
COMPUTE DUMMY1/A400 =
       WARRANTY  || (' ' | STANDARD) ||
(' ' | WARRANTY) || (' ' | STANDARD) ||
(' ' | WARRANTY) || (' ' | STANDARD);
BY COUNTRY
ON TABLE HOLD AS H001
END

TABLE FILE CAR
SUM
COMPUTE DUMMY1/A400 =
       STANDARD  || (' ' | WARRANTY) ||
(' ' | STANDARD) || (' ' | WARRANTY) ||
(' ' | STANDARD) || (' ' | WARRANTY); AS ''
BY COUNTRY
ON TABLE HOLD AS H002
END

TABLE FILE H001
PRINT DUMMY1
BY COUNTRY
ON TABLE HOLD AS H003
MORE
FILE H002
END

TABLE FILE H003
PRINT
DUMMY1
BY COUNTRY

ON TABLE SET STYLE *
TYPE=REPORT, PAGESIZE=LETTER, ORIENTATION=LANDSCAPE, FONT='Arial', SIZE=9, BOTTOMGAP=.05, $$
TYPE=REPORT, COLUMN=DUMMY1, WRAP=5, COLOR=BLUE, $
ENDSTYLE
ON TABLE PCHOLD FORMAT PDF
END

This puts the two columns that need to be OVER each other in two separate HOLD files that are then merged together with the MORE statement. They end up being one column, two rows instead of two columns OVER each other.

I hope this helps.


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
October 29, 2009, 12:43 PM
OnQuest
Thanks Much Francis!
This solution works for me. I do have a few fields that are displayed in the normal way, (column after column horizontally) and then the 2 OVER columns..
But, I can use your work-around to try and achieve that.
Thanks!


WebFOCUS 767, Windows XP
Excel, HTML, PDF