Focal Point
[SOLVED] borders and data

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

November 12, 2008, 11:17 AM
Donald
[SOLVED] borders and data
I have read many post concerning borders and grids but my simple question is, can I have a border or a grid around the data in a PDF document without the lines in between? Just a box style grid or border. I have been trying using the cars database with no answer.
 TABLE FILE CAR
PRINT
     CAR
     MODEL
     BODYTYPE
     SEATS
     DEALER_COST
     LENGTH
ON TABLE SET PAGE-NUM OFF
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT PDF
ON TABLE SET STYLE *
     UNITS=IN,
     PAGESIZE='Letter',
     SQUEEZE=ON,
     ORIENTATION=PORTRAIT,
$
TYPE=REPORT,
     GRID=ON,
     FONT='ARIAL',
     SIZE=9,
     RIGHTGAP=0.125000,
$
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,
$
ENDSTYLE
END
 

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


Prod: WebFocus 7.7.3 Win 2003
Dev: WebFocus 7.7.3 Win 2003
November 12, 2008, 12:14 PM
Mighty Max
You have the format the data columns seperately.
BORDER is the most flexible of the two.
Start off with BORDER=OFF and then format individual stylesheet items.

  
TABLE FILE CAR
PRINT
     CAR
     MODEL
     BODYTYPE
     SEATS
     DEALER_COST
     LENGTH

ON TABLE SET PAGE-NUM OFF
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT PDF
ON TABLE SET STYLE *
     UNITS=IN,
     PAGESIZE='Letter',
     SQUEEZE=ON,
     ORIENTATION=PORTRAIT,
$
TYPE=REPORT,
     BORDER=OFF,
     FONT='ARIAL',
     SIZE=9,
     RIGHTGAP=0.125000,
$
TYPE=TITLE,
     BORDER=LIGHT,
     STYLE=BOLD,
$
TYPE=TABHEADING,
     SIZE=12,
     STYLE=BOLD,
$
TYPE=TABFOOTING,
     SIZE=12,
     STYLE=BOLD,
$
TYPE=DATA,
     COLUMN=CAR,
	 BORDER-LEFT=LIGHT,
$
TYPE=DATA,
     COLUMN=LENGTH,
	 BORDER-RIGHT=LIGHT,
$
TYPE=DATA,
     BORDER-BOTTOM=LIGHT,
	 WHEN=CAR EQ 'PEUGEOT',
$
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,
$
ENDSTYLE
END



WebFOCUS 8.1.05M Unix Self-Service/MRE/Report Caster - Outputs Excel, PDF, HTML, Flat Files
November 12, 2008, 12:20 PM
Donald
Perfect!!!! Thank You


Prod: WebFocus 7.7.3 Win 2003
Dev: WebFocus 7.7.3 Win 2003
November 12, 2008, 12:28 PM
Donald
One question though.... I don't know the last value will be,its dynamic. In your example you specify the car type to place the bottom border.


Prod: WebFocus 7.7.3 Win 2003
Dev: WebFocus 7.7.3 Win 2003
November 12, 2008, 12:49 PM
Mighty Max
You need to set a flag on the last record. Only way I could think of doing this was by using a hold file to first read the number of records and then store that value in an amper variable. Then use a computed field to indicate the row number. Then compare the row number and number of records in the style sheet. Someone else may have a better solution.

 
TABLE FILE CAR
PRINT      
     CAR
     MODEL
     BODYTYPE
     SEATS
     DEALER_COST
     LENGTH
ON TABLE HOLD AS HOLD1
END
-SET &RECS = &RECORDS;



TABLE FILE CAR
PRINT
     CAR
     MODEL
     BODYTYPE
     SEATS
     DEALER_COST
     LENGTH
     COMPUTE REC_NUM/I2 = REC_NUM + 1; NOPRINT

ON TABLE SET PAGE-NUM OFF
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT PDF
ON TABLE SET STYLE *
     UNITS=IN,
     PAGESIZE='Letter',
     SQUEEZE=ON,
     ORIENTATION=PORTRAIT,
$
TYPE=REPORT,
     BORDER=OFF,
     FONT='ARIAL',
     SIZE=9,
     RIGHTGAP=0.125000,
$
TYPE=TITLE,
     BORDER=LIGHT,
     STYLE=BOLD,
$
TYPE=TABHEADING,
     SIZE=12,
     STYLE=BOLD,
$
TYPE=TABFOOTING,
     SIZE=12,
     STYLE=BOLD,
$
TYPE=DATA,
     COLUMN=CAR,
	 BORDER-LEFT=LIGHT,
$
TYPE=DATA,
     COLUMN=LENGTH,
	 BORDER-RIGHT=LIGHT,
$
TYPE=DATA,
     BORDER-BOTTOM=LIGHT,
	 WHEN=REC_NUM EQ &RECS,
$
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,
$
ENDSTYLE
END



WebFOCUS 8.1.05M Unix Self-Service/MRE/Report Caster - Outputs Excel, PDF, HTML, Flat Files
November 12, 2008, 01:04 PM
Darin Lee
Maybe you could just draw a single box around the whole data area. It isn't as dynamic(the size of the box doesn't vary with the amount of data,) but still looks nice.
TABLE FILE CAR
PRINT
     CAR
     MODEL
     BODYTYPE
     SEATS
     DEALER_COST
     LENGTH
HEADING
"Heading Line 1"
"Heading Line 2"
" "
ON TABLE SET PAGE-NUM OFF
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT PDF
ON TABLE SET STYLE *
     UNITS=IN,
     PAGESIZE='Letter',
     SQUEEZE=ON,
     ORIENTATION=PORTRAIT,
$
TYPE=REPORT,
     GRID=OFF,
     FONT='ARIAL',
     SIZE=9,
	 RIGHTMARGIN=1.0,
	 LEFTMARGIN=1.0,
$
TYPE=TITLE,
     STYLE=BOLD,
$
TYPE=REPORT, NAME='BOX001', OBJECT=BOX,
POSITION=(0.75 0.75),
DIMENSION=(7.0 9.5),
BORDER=MEDIUM,
$
TYPE=HEADING, STYLE=BOLD, JUSTIFY=CENTER,$
ENDSTYLE
END



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 12, 2008, 01:21 PM
Donald
MIGHTY NICE..Thank you


Prod: WebFocus 7.7.3 Win 2003
Dev: WebFocus 7.7.3 Win 2003