Now I understand what You mean
a painted box as a border
Using pen 2 for lines I got a error, using pen 1 works.
I added 2 lines to the box as a test. One at left and one at bottom.
- Code: Select all Expand view
FUNCTION MAIN()
LOCAL oReport, oPen[2]
DEFINE PEN oPen[1] WIDTH 3
DEFINE PEN oPen[2] WIDTH 2
USE TEST NEW VIA "DBFCDX"
REPORT oReport TITLE "*** My First Report ***" PREVIEW PEN oPen[1], oPen[2]
COLUMN TITLE "St" DATA Test->State
COLUMN TITLE "First Name" DATA Test->First
COLUMN TITLE " Salary" DATA Test->Salary
END REPORT
oReport:CellView()
ACTIVATE REPORT oReport ;
ON STARTPAGE LINBOX(oReport)
CLOSE TEST
RETURN NIL
// -------------
STATIC FUNCTION LINBOX(oReport)
LOCAL nInchWidth, nInchHeight
nInchWidth := oReport:PhyWidth(RPT_INCHES)
nInchHeight := oReport:PhyHeight(RPT_INCHES)
oReport:Box( 0.3 ,; // top
1.0 ,; // left
nInchHeight -.3 ,; // Bottom
nInchWidth -.3 ,; // Right
1 ,; // first pen created
RPT_INCHES )
// vertical line
oReport:Line( 0.3 ,; // nTop
0.9 ,; // nLeft
nInchHeight -.2 ,; // nBottom
0.9 ,; // nRight
2 ,; // second pen created
RPT_INCHES )
// horizontal line
// horizontal line
oReport:Line( nInchHeight -.2 ,; // nTop
0.9 ,; // nLeft
nInchHeight -.2 ,; // nBottom
nInchWidth -.3 ,; // nRight
2 ,; // second pen created
RPT_INCHES )
RETURN NIL
regards
Uwe