none
Why _pageTotal always shows 1 ???

    Question

  • in VFP9, I tried to use

     

    use my table

    report form test noconsole preview

    ?  "Page " + TRANS(_PAGENO) + " of " + TRANS( _PAGETOTAL)
    But the _pagetotal value is always 1 although the report contains 4 pages.  
    What is that?
    Tuesday, April 03, 2007 3:42 PM

Answers

  • I know why now.

     

    I had a group. and set the "Group on New page no. 1"

     

    Each group has different length and even if you have multiple pages for the group, you still have 1 _PageTotal.

     

    It might be a VFP9 bug. But unfortunately, we can hardly get support from Microsoft now.

    Tuesday, April 03, 2007 5:56 PM

All replies

  • In my reports I am using:

     

    Label1 Field1 Label 2 Fileld2

     

    where: Label1 = "Page"

                 Label2="/"

                 FIELD1 has expression : _pageno (no trans)

                 FIELD2 has expression: _pagetotal (no trans)

    I do not know why but I don't have any problem and it is working fine.
    Tuesday, April 03, 2007 3:52 PM
  • Thank you, but

    It shows the same even if I removed "Trans"

     

    ? "Page " , _PAGENO , "of", _Pagetotal

    Tuesday, April 03, 2007 4:13 PM
  • There were labels and fields that I did put direct in report designer. You need to run once the report to have a value for _PageTotal:

     

    REPORT FORM <ReportName> NOCONSOLE

     

    After that you may check   

                                 

    ? "Page " , _PAGENO , "of", _Pagetotal

     

    or with TRANS().

    Tuesday, April 03, 2007 4:39 PM
  • I know why now.

     

    I had a group. and set the "Group on New page no. 1"

     

    Each group has different length and even if you have multiple pages for the group, you still have 1 _PageTotal.

     

    It might be a VFP9 bug. But unfortunately, we can hardly get support from Microsoft now.

    Tuesday, April 03, 2007 5:56 PM
  • You may try:

     

    TotalPages  = 0
    REPORT FORM <ReportName> TO tmp.txt NOCONSOLE
    TotalPages=_pageno
    ERASE tmp.txt

     

    TotalPages should have the right total number of pages.

    Tuesday, April 03, 2007 7:21 PM
  • i know this. But it will slow down the process a lot.

    We have almost 2000 records to print. Each record has a group and different total pages.

    Thank you for your help anyway.

    Tuesday, April 03, 2007 7:28 PM
  • Actually, it's important to submit any bugs you know of now, so they can be considered for SP2. After that, only really serious bugs (data-eaters, for the most part) are likely to be fixed. But right now is our chance to get really broken things fixed.

    Tamar
    Tuesday, April 03, 2007 8:08 PM
  • Tamar,

     

    Could you help contact Microsoft for this problem? 

    I raised another question about the image control in the report.  It seems to remain unresolved, too.

     

    Thank you!

     

     

    Tuesday, April 03, 2007 8:30 PM
  • To get an error report to the team, use the Connect website:

    http://connect.microsoft.com/feedback/default.aspx?SiteID=210

    That's the official place to report problems.

    Tamar
    Wednesday, April 04, 2007 9:21 PM