Page numbers are not incremented in a maximized Preview window in Windows XP (320874)



The information in this article applies to:

  • Microsoft Visual FoxPro for Windows 6.0
  • Microsoft Visual FoxPro for Windows 7.0

This article was previously published under Q320874

SYMPTOMS

If you preview a report form that was created in Visual FoxPro 6.0 or 7.0, the page numbers that appear in the title bar may not be incremented when you use the navigation buttons in the report preview toolbar to move through the report. This behavior occurs on Microsoft Windows XP-based computers. This behavior occurs in the Visual FoxPro development environment and in compiled Visual FoxPro programs.

RESOLUTION

To work around this behavior, use any of the following methods:
  • Turn off visual themes for the Visual FoxPro program (if the behavior occurs in the development environment) or in your program file (if the behavior occurs in a distributable program file). For additional information about how to turn off visual themes, click the article number below to view the article in the Microsoft Knowledge Base:

    292533 HOW TO: Use Windows Program Compatibility Mode in Windows XP

  • Preview the report in a window that is not maximized. If the report preview window is not maximized, the page number is incremented properly.
  • Place the report preview window in a window that you define. The following sample code creates a window and previews the report full-screen in the defined window:
    PUBLIC ofrmPreview
         ofrmPreview = NEWOBJECT("PreviewForm")
            ** Replace "Report1" with the name of your report (.frx) file.
         REPORT FORM Report1 PREVIEW WINDOW "PreviewForm" NOCONSOLE
         RELEASE ofrmPreview
         
    DEFINE CLASS PreviewForm AS FORM
         HEIGHT = _SCREEN.Height
         WIDTH = _SCREEN.Width
         CAPTION = ""
         MAXBUTTON = .F.
         NAME = "PreviewForm"
    ENDDEFINE
    					

MORE INFORMATION

Steps to Reproduce the Behavior

  1. Type the following command in a command window:

    report form home(2)+"tastrade\reports\listcust.frx" preview

  2. Maximize the report.
  3. On the report preview toolbar, click Next several times. The page number that appears in the title bar is not incremented.

Modification Type:MajorLast Reviewed:2/11/2005
Keywords:kbCodeSnippet kbprb kbReportWriter KB320874