BUG: Group Header Information Prints Incorrectly

Last reviewed: May 5, 1997
Article ID: Q135617
The information in this article applies to:
  • Microsoft Visual FoxPro for Windows, versions 3.0, 3.0b, 5.0, 5.0a

SYMPTOMS

Group header information prints incorrectly when all of the following are true:

  • The group is defined to start on a new page.
  • The group header is defined to print on every page.
  • The group footer is the only band that prints on the last page of the group.

In this case, the group header information printed on the last page of the group is actually the header information for the next record. In Visual FoxPro version 5.0, the group header does not print at all in this case.

WORKAROUND

This workaround does not apply to Visual FoxPro version 5.0. There does not appear to be a workaround to make the group footer print in the case described above.

  1. Add a field to the Group Header. Set the field expression to a variable (for example, "repx").

  2. Add a field to the Group Footer. Set "Print Only When Expression is True" to .F. and "Field Expression" to a UDF (for example, "letsgo()").

  3. In the UDF type the following:

          repx=AGROUPS(i)  &&agroups is array that holds group header info.
          IF i<ALEN(agroups)
    
            i=i+1
          ENDIF
          RETURN
    
    

  4. Create a program for calling the report. Type the following into the prg:

          Select <insert fieldname of group> from <insert tablename> ;
    
            Group by <insert fieldname of group> into array agroups
          i=2
    
    

STATUS

Microsoft has confirmed this to be a problem in the Microsoft products listed at the beginning of this article. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.


KBCategory: kbprg kbprint kbbuglist
KBSubcategory: FxotherGeneral VFoxWin buglist5.00 buglist3.00 buglist3.00b
Additional reference words: 5.00 3.00 3.00b
Keywords : buglist3.00 buglist3.00b buglist5.00 kbprint vfpbug5.0a kbbuglist
Version : 3.0 3.0b 5.0 5.0a
Platform : WINDOWS
Issue type : kbbug


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: May 5, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.