Focal Point
Removing underlines from Column titles in WP format

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

November 23, 2009, 01:33 AM
Piscian
Removing underlines from Column titles in WP format
Hi All,

Is it possible to remove underlines from Column titles in WP format.
Please let me know how to apply some basic formatting with WP format.

Thanks!


Thanks and Regards,
Piscian

WebFocus 714
Windows Server 2003
Enterprise Edition
HTML,Excel,PDF
November 23, 2009, 05:20 AM
Danny-SRL
Piscian,

WP format is a very limited format way back from the Mainframe. Stylesheets do not apply and many of the new SET commands will not have any effect.

The underlines cannot be removed with a command, so if this is a must you will have to do it yourself.

I played around a bit with the problem and this is what I have arrived at. I suppose you will be getting other solutions.

  
-* File Piscian1.fex
-SET &ECHO=ALL;
-* create the WP file. 
-* note: one cannot leave the beginnig of the lines as spaces because when using DM later
-*       it will squeeze the blanks out... (somebody knows why?)
TABLE FILE CAR
SUM CAR MODEL SALES
BY COUNTRY NOPRINT
BY CAR NOPRINT
BY MODEL NOPRINT
ON COUNTRY PAGE-BREAK
HEADING CENTER
"Report for Country:<COUNTRY "
ON TABLE HOLD AS PISCIAN FORMAT WP
END
-*!COPY PISCIAN.WP C:\TEMP
-* for the final output the lines in the WP file must have equal length
-* so use DM to copy the WP file line by line and complete to the desired length, in this example 133 chars
FILEDEF WPISCIAN DISK WPISCIAN.WP
-RUN
-#NEXT
-READ PISCIAN,&WPLINE
-IF &IORETURN GOTO #END;
-SET &WPLINE=SUBSTR(&WPLINE.LENGTH, &WPLINE, 1, &WPLINE.LENGTH, 133, 'A133');
-WRITE WPISCIAN &WPLINE
-GOTO #NEXT
-#END
-*!COPY WPISCIAN.WP C:\TEMP
-RUN
-* create a MASTER file for the fixed length WP file
EX -LINES 4 EDAPUT MASTER,WPISCIAN,C,MEM
FILENAME=WPISCIAN, SUFFIX=FIX
SEGNAME=WPISCIAN, SEGTYPE=S0
FIELDNAME=WPLINE, ALIAS=WPLINE, FORMAT=A133 ,ACTUAL=A133, $ 
-RUN
-* create a new WP file in which the --- have been removed
TABLE FILE WPISCIAN
PRINT WPLINE AS ''
IF WPLINE OMITS '---'
ON TABLE SET PAGE NOPAGE
ON TABLE HOLD AS FINAL FORMAT WP
END
-*!COPY FINAL.WP C:\TEMP
-* the copy commands were used for debugging. i left them in



Daniel
In Focus since 1982
wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF

November 23, 2009, 09:01 AM
PBrightwell
I haven't used WP in years, but it might be easier for you to create your titles as a heading line.

TABLE FILE CAR
SUM CAR AS '' IN 5
MODEL AS '' IN 20
SALES AS '' IN 40
BY COUNTRY NOPRINT
BY CAR NOPRINT
BY MODEL NOPRINT
ON COUNTRY PAGE-BREAK
HEADING CENTER
"Report for Country:"<5 CAR <20 MODEL <40 SALES"
ON TABLE PCHOLD AS PISCIAN FORMAT WP
END


Pat
WF 7.6.8, AIX, AS400, NT
AS400 FOCUS, AIX FOCUS,
Oracle, DB2, JDE, Lotus Notes
November 23, 2009, 12:06 PM
Darin Lee
Someone forgot to put their code inside the code makers - always gets you when you're trying to display fields embedded in a heading.

As Daniel says, styling and WP format do not go together. You get one or the other. If you must have WP format, I would go with Pat's suggestion to remove column headings and put them in a page heading line.


Regards,

Darin



In FOCUS since 1991
WF Server: 7.7.04 on Linux and Z/OS, ReportCaster, Self-Service, MRE, Java, Flex
Data: DB2/UDB, Adabas, SQL Server Output: HTML,PDF,EXL2K/07, PS, AHTML, Flex
WF Client: 77 on Linux w/Tomcat
November 23, 2009, 02:36 PM
Danny-SRL
I agree.

Putting the column TITLEs in the HEADING is much better...


Daniel
In Focus since 1982
wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF

November 24, 2009, 07:33 AM
PBrightwell
oops! Red Face I guess I got in a hurry. I'm properly chastised Darin.


Pat
WF 7.6.8, AIX, AS400, NT
AS400 FOCUS, AIX FOCUS,
Oracle, DB2, JDE, Lotus Notes