>Dear all,
>
>I want to control the dot-matrix printer to pront my preset report by the commands report form
to print ..... such that the dot-matrix print print a report with the draft fonts of the print preset. How can I do that?
>Practically, the printer pritn out a report with courtier fonts which is too slow for a large report.
>
>With Regards,
>
>Ransome
Maybe I can help.
Please open a low level text file and then send the command to the printer.
Example :
LOCAL f,l,heading
f=FOPEN('c:\data.txt')
nlines=0
heading=.F.
SELECT sales
=FPUTS(f,CHR(27)+'@'+CHR(18)) * INITIALIZE PRINTER TO DRAFT
SCAN
IF NOT heading
=FPUTS(f,'DATE CUSTOMER SALES AMOUNT') * HEADING
=FPUTS(f,'---- -------- ----- ------')
=FPUTS(f,'') * BLANK LINE
heading=.T.
ENDIF
=FPUTS(f,DTOC(date)+' '+customer+' '+TRANSFORM(amount,'999,999.99')
nlines=nlines+1
IF nlines>=50
=FPUTS(f,CHR(12)) * EJECT
nlines=0
heading=.F.
ENDIF
ENDSCAN
=FPUTS(f,CHR(12))
=FCLOSE(f)
RUN TYPE c:\data.txt>LPT1
PLEASE IMPROVE ACCORDING TO YOUR REQUIREMENTS, THIS IS JUST WRITTEN ON THE FLY.
Use things, not people. Love people, not things