Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Print Dialog with Number of Copies
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00508337
Message ID:
00508364
Vues:
32
Chuck,

I am just curious, why do not you accept keyboard '{CTRL-P}' from my previous post.
It does exactly what you askimg for: "is there a way to do this other than with PRINTER PROMPT"





>>>>>>>>>>>>>>previous messages below
>>Is there a Fox command for bringing up a print dialog that allows the user to select number of copies?
>>
>>I've tried SYS(1037)and GetPrinter. SYS(1037) offers more than GetPrinter, but neither offer number of copies.
>>
>>TIA,
>>Chuck
>
>The dialogue I get from the command below gives me a # of copies option:
>
>report form myreport to printer prompt
>
>The printer is an HP Laser 5.

Thanks Mark. Actually, in my post, I should've asked is there a way to do this other than with PRINTER PROMPT.

What I'm trying to accomplish is to have the user tell me which printer he intends to use before I go to REPORT FORM so that I can get a total page count and express "Page x of y" when the report prints. Here's my coding example at present (which isn't offering a number of copies option):


* Print Report
SELECT curHatFiRep && CURSOR containing records to report
PUBLIC mTotalPages && Page Count mvar
STORE 1 TO mTotalPages && Initial value to eliminate error with REPORT FORM.
* PRINTER PROMPT with =SYS(1037)...
* Otherwise, you may have an issue with the printable area
* being different between the default printer and the one
* chosen by the user. Potentially, this could mean that the
* "TO FILE" report would have a slightly different page count
* than the "TO PRINTER" report because the number of lines
* that can fit on the page may be slightly different.
=SYS(1037)
REPORT FORM HatFiRep TO FILE TempRept.prn NOCONSOLE
DELETE FILE TempRept.prn
STORE _PageNo TO mTotalPages && Actual value.
REPORT FORM HatFiRep TO PRINTER NOCONSOLE

I hate to bring up the printer dialog again by adding TO PRINTER PROMPT in the REPORT FORM statement. At best, it's a hassle for the user to have to experience 2 printer dialog boxes at report time. At worst, it looks like I'm not a clean programmer and it may mess up the page count on the report.
Chuck W Henry, MCP
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform