Printing a memo field

Printing a memo field

Postby hag » Thu Feb 17, 2011 7:56 pm

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
hag
 
Posts: 598
Joined: Tue Apr 15, 2008 4:51 pm
Location: LOs Angeles, California

Re: Printing a memo field

Postby TimStone » Thu Feb 17, 2011 10:28 pm

::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
Tim Stone
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit
User avatar
TimStone
 
Posts: 2944
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA

Re: Printing a memo field

Postby hag » Fri Feb 18, 2011 1:40 am

Thanks Tim for the help. Not working.

Heres the code but not printing/
Print.ch and report.ch are set.


Code: Select all  Expand view
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 nil
Thank you
Harvey
hag
 
Posts: 598
Joined: Tue Apr 15, 2008 4:51 pm
Location: LOs Angeles, California

Re: Printing a memo field

Postby Richard Chidiak » Fri Feb 18, 2011 5:34 am

Harvey

oprn:startpage() and oprn:endpage() are missing

Hth

Richard
http://www.cbati.com

Uestudio
Fwh 13.05 Harbour 3.2 MSVC 2013
User avatar
Richard Chidiak
 
Posts: 946
Joined: Thu Oct 06, 2005 7:05 pm
Location: France

Re: Printing a memo field

Postby hag » Fri Feb 18, 2011 5:42 am

Thanks
So simple. Works..
Thank you
Harvey
hag
 
Posts: 598
Joined: Tue Apr 15, 2008 4:51 pm
Location: LOs Angeles, California


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 80 guests