I've tried a number of ways but can't get it right.
I have a memo field with a bunch of lines and I need to print it with each line displayed.
Help.
Thank you
Harvey
Harvey
I've tried a number of ways but can't get it right.
I have a memo field with a bunch of lines and I need to print it with each line displayed.
Help.
::oApt:aptnot is a memo field in a database.
// Print comment text
nLinCnt := MLCOUNT( ::oApt:aptnot, 80,, .t. )
IF nLinCnt > 0
nRow += 1.5 * nRsp
FOR lx := 1 TO nLinCnt
PAGEHEAD( oPrn, aHead )
oPrn:Say( nRow, 4 * nCsp, MEMOLINE( ::oApt:aptnot, 80, lx,, .t. ), oFcond )
nRow += nRsp
NEXT
ELSE
nRow += nRsp
ENDIF
unction prnMemo(cMemo4)
local nPixel
local linum := 1,xCol := 1
local nRow := 1
local nRsp,nCsp,say
local oReport, oPrn, oPen1
local oFcond,lx
DEFINE FONT oFont1 NAME "Arial" SIZE 12,10 of oPrn
PRINT oPrn NAME "Salesbyproduct"
prnlandscape()
ENDPRINT
PRINT oPrn NAME "Up Your Cash Flow - Sales by Product" //PREVIEW
nRSp := oPrn:nVertRes() / 50
nCSp := oPrn:nHorzRes() / 180
nLinCnt := MLCOUNT(cMemo4, 80,, .t. )
IF nLinCnt > 0
nRow += 1.5 * nRsp
FOR lx := 1 TO nLinCnt
oPrn:Say( nRow, 4 * nCsp, MEMOLINE(cMemo4 , 80, lx,, .t. ),oFont1 )
nRow += nRsp
NEXT
ELSE
nRow += nRsp
ENDIF
return nilHarvey
oprn:startpage() and oprn:endpage() are missing
Hth
Richard
Thanks
So simple. Works..