Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Anil Sharma
  Where is Anil Sharma?
 Anil Sharma
 To: Doug Syme
  Where is Doug Syme?
 Snow Road Station
 Doug Syme
Subject: RE: Re-setting pagetotal by group
Thread ID: 159206 Message ID: 159369 # Views: 30 # Ratings: 0
Version: Visual FoxPro 9 Category: Reports and Printers
Date: Tuesday, February 05, 2008 7:47:38 AM         

> Hi,
> I am a new member to Foxite and relativly new to VFP9 Report Writer.
> How can I get the total number of pages in a group? I am resetting the page numbering to 1 and reprinting the group header. I am having 2 problems:
> 1- The _pagetotal gets set to the total of the last group printed so I get 1/3; 1/3, 2/3, 3/3, 4/3, 5/3; 1/3, 2/3, 3/3. So it seems that the _pagetotal is calculated on the first pass and is stored in memory. Is there a solution to this?
> 2- The second problem happens only on the customers runtime version, not on my runtime version. The group header will not reprint. Any idea why?
> Thanks. Doug
Hi Doug
If you do not include a reference to _PAGETOTAL in the report, Visual FoxPro sets the value of _PAGETOTAL to the total number of pages at the end of printing and performs only one pass through the report.

You can force a second pass through the report using an expression such as the following:

IIF( _PAGETOTAL = 0, "","" )

for your 2nd problem i will sugest you the check the runtime files at customers
end they r not same with ur pc. you might using vfp9 sp2 so make them same!

(Fox is the solution for almost everything!!)


Re-setting pagetotal by group Posted by Doug Syme @ 2/3/2008 4:24:10 PM
RE: Re-setting pagetotal by group Posted by mike castillo @ 2/3/2008 4:57:41 PM
RE: Re-setting pagetotal by group Posted by Anil Sharma @ 2/5/2008 7:47:38 AM