Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Print a report with draft fonts
Message
From
04/04/2001 06:56:04
Edward See
Magicalogic Consultancy System
Quezon, Philippines
 
 
To
03/04/2001 21:35:03
Ransome So
Ransome's Workshop
Hong Kong, Hong Kong
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Miscellaneous
Thread ID:
00491658
Message ID:
00491750
Views:
20
>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform