Focal Point
[CLOSED] Using OVER in a pdf

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

July 28, 2010, 01:31 PM
rfbowley
[CLOSED] Using OVER in a pdf
This client is running WebFOCUS 7.6.10 on an i-Series / AS400 server. The database is DB2. The report requirement is to list pairs of columns from one table OVER the next pair. The problem is that the second field in each pair is format A800. I.E.

TEXT1 COMMENT1
TEXT2 COMMENT2
TEXT3 COMMENT3

For some reason that I cannot figure out, the WRAP command works fine for the first pair of fields, but not for any that follow the OVER statement. Here is an example using CAR:

[code}

DEFINE FILE CAR
COMMENT1/A800=WARRANTY | WARRANTY | WARRANTY | WARRANTY | WARRANTY | WARRANTY | WARRANTY | WARRANTY | WARRANTY | WARRANTY | WARRANTY | WARRANTY | WARRANTY | WARRANTY | WARRANTY | WARRANTY | WARRANTY | WARRANTY | WARRANTY;
COMMENT2/A800=CAR.EQUIP.STANDARD | CAR.EQUIP.STANDARD | CAR.EQUIP.STANDARD | CAR.EQUIP.STANDARD | CAR.EQUIP.STANDARD | CAR.EQUIP.STANDARD | CAR.EQUIP.STANDARD | CAR.EQUIP.STANDARD | CAR.EQUIP.STANDARD | CAR.EQUIP.STANDARD | CAR.EQUIP.STANDARD | CAR.EQUIP.STANDARD | CAR.EQUIP.STANDARD | CAR.EQUIP.STANDARD | CAR.EQUIP.STANDARD | CAR.EQUIP.STANDARD | CAR.EQUIP.STANDARD | CAR.EQUIP.STANDARD | CAR.EQUIP.STANDARD;
END
TABLE FILE CAR
PRINT
'CAR.ORIGIN.COUNTRY' AS ' '
'CAR.WARANT.COMMENT1' AS ' ' OVER
'CAR.COMP.CAR' AS ' '
'CAR.WARANT.COMMENT1' AS ' '
HEADING
""
FOOTING
""
WHERE CAR.CARREC.MODEL EQ 'TR7';
ON TABLE SET PAGE-NUM OFF
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT PDF
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
UNITS=IN,
PAGESIZE='Letter',
SQUEEZE=ON,
ORIENTATION=LANDSCAPE,
$
TYPE=REPORT,
GRID=ON,
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,
$
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,
$
TYPE=REPORT,
COLUMN=N1,
WRAP=1.000000,
$
TYPE=REPORT,
COLUMN=N2,
WRAP=7.000000,
$
TYPE=REPORT,
COLUMN=N3,
WRAP=1.000000,
$
TYPE=REPORT,
COLUMN=N4,
WRAP=7.000000,
$
ENDSTYLE
END
[/code]

Any suggestions would be greatly appreciated.

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


Robert F. Bowley Jr.
Owner
TaRa Solutions, LLC

In WebFOCUS since 2001
July 28, 2010, 05:39 PM
Francis Mariani
This looks suspiciously like a bug!

Try as I might, I couldn't get two long fields to WRAP in the PDF report.

DEFINE FILE CAR
COMMENT1/A850 =
  '1 ' |
  (' ' | MODEL) || (' ' | MODEL) || (' ' | MODEL) || (' ' | MODEL) || (' ' | MODEL) ||
  (' ' | MODEL) || (' ' | MODEL) || (' ' | MODEL) || (' ' | MODEL) || (' ' | MODEL) ||
  (' ' | MODEL) || (' ' | MODEL) || (' ' | MODEL) || (' ' | MODEL) || (' ' | MODEL) ||
  (' ' | MODEL) || (' ' | MODEL) || (' ' | MODEL) || (' ' | MODEL);
COMMENT2/A850 =
  '2 ' |
  (' ' | MODEL) || (' ' | MODEL) || (' ' | MODEL) || (' ' | MODEL) || (' ' | MODEL) ||
  (' ' | MODEL) || (' ' | MODEL) || (' ' | MODEL) || (' ' | MODEL) || (' ' | MODEL) ||
  (' ' | MODEL) || (' ' | MODEL) || (' ' | MODEL) || (' ' | MODEL) || (' ' | MODEL) ||
  (' ' | MODEL) || (' ' | MODEL) || (' ' | MODEL) || (' ' | MODEL);
BLANK1/A1 = '';
END

TABLE FILE CAR
PRINT
COUNTRY   AS ' '
COMMENT1  AS ' '
OVER
CAR       AS ' '
COMMENT2  AS ' '

BY COUNTRY NOPRINT
BY CAR     NOPRINT
BY MODEL   NOPRINT

HEADING
"BOWLEY1"
" "
ON TABLE SET PAGE-NUM OFF
ON TABLE PCHOLD FORMAT PDF
ON TABLE SET STYLE *
UNITS=IN, PAGESIZE='Letter', SQUEEZE=ON, ORIENTATION=LANDSCAPE, $
TYPE=REPORT, FONT='ARIAL', SIZE=7, $
TYPE=REPORT, COLUMN=COUNTRY(2) , WRAP=0.5, COLOR=BLUE, $
TYPE=REPORT, COLUMN=COMMENT1   , WRAP=6.0, COLOR=ORANGE, $
TYPE=REPORT, COLUMN=CAR(2)     , WRAP=0.5, COLOR=RED, $
TYPE=REPORT, COLUMN=COMMENT2   , WRAP=6.0, COLOR=GREEN, $
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
July 28, 2010, 06:06 PM
Waz
This must be related to OVER and WRAP.

I would suggest making the three sets of data into rows, and it should then work.


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!

July 29, 2010, 08:15 AM
Tom Flynn
Use SQUEEZE:

  
TYPE=REPORT,
COLUMN=N1,
SQUEEZE=0.65,
$
TYPE=REPORT,
COLUMN=N2,
SQUEEZE=8.8,
$
TYPE=REPORT,
COLUMN=N3,
SQUEEZE=0.65,
$
TYPE=REPORT,
COLUMN=N4,
SQUEEZE=8.8,
$


If that doesn't work, WRAP the text yourself with PARAG function...

hth


Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe