Information générale
Catégorie:
Gestionnaire de rapports & Rapports
Titre:
Report will not print to set printer
Versions des environnements
I have an application that I am converting from vfp6 to vfp9. In a form I have created a report that is created and printed to a pdf.'The pdf printer is set to silently save the pdf in a folder and then later an email will pick it up in an attachment.
The following code works fine in vfp6. But in vfp9 even though I set the printer to the pdf printer it prints to the default printer. ( a laser printer).
If I set the default printer to the pdf from windows then it will print correctly to the pdf printer.
LOCAL m.goodtogo
m.goodtogo=.f.
*check to be sure pdfFactory is installed on computer
cprintername="pdfFactory"
SET exact on
APRINTER(cprinters)
nfound=ascan(cprinters,cprintername)&&see if pdf factory is on computer
IF nfound > 0
SET Printer To Name (cprintername)
m.goodtogo=.t.
else
*message telling user printer is not installed
endif
REPO form rcard to print noconsole
WAIT window "Creating pdf file "+ alltrim(rcard.schname) + "RECEIVEDCARD.pdf" timeout 1
SET Printer To Default &&set printer back to the original
thanks,
Randy
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement