Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Vilhelm-Ion Praisach
  Where is Vilhelm-Ion Praisach?
 Resita
 Romania
 Vilhelm-Ion Praisach
 To: Murali Narayanan
  Where is Murali Narayanan?
 Mumbai
 India
 Murali Narayanan
 Tags
Subject: RE: Count actual Printed pages
Thread ID: 416515 Message ID: 416518 # Views: 60 # Ratings: 1
Version: Visual FoxPro 9 SP2 Category: Reports and Printers
Date: Tuesday, December 30, 2014 6:20:07 PM         
   


> Dear all,
> I have 3 similar printers (IP based).
> I wish to know how many actual pages along with their sizes (A4/Custom) etc. are printed on that particular printer.
> The count should be actual ie:- if someone cancels a report then it should not increment, also if someone prints 100 pages & then cancels on the printer after lets say 5 pages then it should update accordingly.
>
> An Example would be highly appreciated.
>
> Regards
> Murali Narayanan

Declare a private (or public) variable named "pcounter" (or whatever name you choose) and in the On Exit event of the report's Page footer band, place :
_vfp.setvar("pcounter",_PAGENO)


Here is a demo
https://www.foxite.com/uploads/86d39ef1-9696-4158-8c47-c0a520675390.rar

(launch the prg and press Esc)
PRIVATE pcounter
LOCAL lni
CLEAR 
CREATE CURSOR cc (ii I AUTOINC,cc C(10) DEFAULT SYS(2015))
FOR lni = 1 TO 100000
	APPEND BLANK
NEXT
REPORT FORM cc
?pcounter


Respectfully

ENTIRE THREAD

Count actual Printed pages Posted by Murali Narayan @ 12/30/2014 5:58:38 PM
RE: Count actual Printed pages Posted by Vilhelm-Ion Praisach @ 12/30/2014 6:20:07 PM
RE: Count actual Printed pages Posted by Tore Bleken @ 12/30/2014 8:33:07 PM
RE: Count actual Printed pages Posted by Jun Tangunan @ 12/31/2014 12:26:12 AM
RE: Count actual Printed pages Posted by mk sharma @ 12/31/2014 7:22:23 AM