Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Borislav Borissov
  Where is Borislav Borissov?
 Sofia
 Bulgaria
 Borislav Borissov
 To: Khurram Tahir
  Where is Khurram Tahir?
 Karachi
 Pakistan
 Khurram Tahir
 Tags
Subject: RE: _pagetotal resetting on group
Thread ID: 112294 Message ID: 112324 # Views: 3 # Ratings: 0
Version: Visual FoxPro 9 Category: Reports and Printers
Date: Tuesday, November 07, 2006 11:35:26 AM         
   


> > Khurram,
> >
> > Here. Just start Test.PRG. I hope this is what you looking for.
> >
> > https://www.foxite.com/uploads/2961e701-e312-4cc4-9912-18c2f65b7946.zip
> >
> > Borislav Borissov
> >
> >

>
> Thanks for your solution
>
> one of the follwoing problem is coming
>
> Where we have to Initialize variable lcGrpTest
> Error message appears Data type mismatch on following line
> SEEK lcGrpTest IN C_GrpPageCnt


Open Report and check expression in the field where you print Page 1 / xxxx
I change it to be:

ALLTRIM(STR(_pageno)) / ALLTRIM(STR(UpdGroupPg(Acccd)))
or something like this. If you want this function to works in every cases, when you group by numeric, date or char field change the function to be:
FUNCTION UpdGroupPg(lcGrpTest)
    SEEK TRANSFORM(lcGrpTest) IN C_GrpPageCnt
    IF NOT FOUND([C_GrpPageCnt])
       INSERT INTO C_GrpPageCnt (rptGrp) VALUES (TRANSFORM(lcGrpTest))
    ENDIF
    replace PgCnt WITH MAX( C_GrpPageCnt.PgCnt, _pageno ) IN C_GrpPageCnt
RETURN C_GrpPageCnt.PgCnt



Borislav Borissov



ENTIRE THREAD

_pagetotal resetting on group Posted by Khurram Tahir @ 11/7/2006 6:32:11 AM
RE: _pagetotal resetting on group Posted by Borislav Borissov @ 11/7/2006 8:35:39 AM
RE: _pagetotal resetting on group Posted by Khurram Tahir @ 11/7/2006 9:07:10 AM
RE: _pagetotal resetting on group Posted by Borislav Borissov @ 11/7/2006 9:29:48 AM
RE: _pagetotal resetting on group Posted by Khurram Tahir @ 11/7/2006 11:19:31 AM
RE: _pagetotal resetting on group Posted by Borislav Borissov @ 11/7/2006 11:35:26 AM
RE: _pagetotal resetting on group Posted by Khurram Tahir @ 11/7/2006 12:54:19 PM