Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to count printed page???? 1

Status
Not open for further replies.

Gert

Programmer
Apr 9, 2000
240
DO
Hi all,
Could be some way to know with VFP how many page a printer have print, the file name or page resolution??
 
Gert

Could be some way to know with VFP how many page a printer have print

FAQ184-2911


Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
 
Hi

1. If you want the total number of pages after the printout is complete...

REPORT FORM myReport TO PRINTER PROMPT PREVIEW
nTotalPage = _PageNo

2. If your intention is to find this out even before printing... then..

REPORT FORM myReport TO FILE myFile.txt NOCONSOLE
nTotalPage = _PageNo
ERASE FILE myFile.txt

REPORT FORM myReport TO PRINTER PROMPT PREVIEW

3. If you want to know the status as the printing is in progress..

Add a function in your main.prg.. say..
myCurrentPage
*************
PARAMTERS pPage
WAIT WINDOW pPage NOWAIT
RETURN

In the Report form.. along the pageheader.. calling this function should provide you the details....
myCurrentPage(_PageNo)

:)

ramani :)
(Subramanian.G)
 
I read this as "How can I tell how many pages the printer has actually printed". I'm not aware of anyway to do this. VFP hands off printing to the Windows print spooler, then it's done.

Craig Berntson
MCSD, Visual FoxPro MVP, Author, CrysDev: A Developer's Guide to Integrating Crystal Reports"
 
As to the second and third parts of your question I'm afraid I have more questions than answers for you.

Filename?

Since you most likely use the report name or file name when you issue your print statement in VFP I'm not sure I understand this part of your question. Are you printing to a File instead of to port LPT1 for instance?

Page Resolution?

Are you printing images?

Slighthaze = NULL

[ul][li]FAQ184-2483
An excellent guide to getting a fast and accurate response to your questions in this forum.[/li][/ul]
 
sorry i´m not asking good question in this day, i want to know the page printed not matter wich program sendit to the printer, not just VFP
 
Gert

Not that easy, but here is a simple Printer queue form in VFP that lists the jobs names in the print queue, whether the where printed from VFP or not.


Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top