Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Print a report with draft fonts
Message
De
04/04/2001 06:56:04
Edward See
Magicalogic Consultancy System
Quezon, Philippines
 
 
À
03/04/2001 21:35:03
Ransome So
Ransome's Workshop
Hong Kong, Hong Kong
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de rapports & Rapports
Divers
Thread ID:
00491658
Message ID:
00491750
Vues:
15
>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform