FIX: Using SET COLOR TO & Printing a Report Prints Blank Page

Last reviewed: February 20, 1997
Article ID: Q162085
The information in this article applies to:
  • Microsoft Visual FoxPro for Windows, versions 3.0, 3.0b
  • Microsoft Visual FoxPro for Macintosh, version 3.0b

SYMPTOMS

When using the SET COLOR OF SCHEME or SET COLOR TO command to change the foreground color of the desktop to white, any reports that are previewed or sent to the printer are blank. These commands are still used for backward compatibility. The _SCREEN.FORECOLOR and _SCREEN.BACKCOLOR commands should be used instead.

RESOLUTION

Using the following commands instead results in the Report Writer performing properly:

   _SCREEN.FORECOLOR=RGB(255,255,255)
   _SCREEN.BACKCOLOR=RGB(0,0,255)

STATUS

Microsoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. This bug has been fixed in Visual FoxPro 5.0 for Windows.

MORE INFORMATION

The SET COLOR OF SCHEME or SET COLOR TO commands are used to set colors in the FoxPro environment. Issuing one of the following commands changes the foreground color of FoxPro's desktop to white and the background color to blue:

   SET COLOR TO w+/b
   SET COLOR OF SCHEME 1 to RGB(255, 255, 255, 0, 0, 150)

Issuing the CLEAR command afterward changes the desktop colors. If a FoxPro report is then previewed or printed, the result is blank pages.

Steps to Reproduce Behavior

  1. Type the following code into the Command window:

          SET COLOR TO w+/b
    

  2. Create a quick report and preview it. Note that the pages are blank and can be paged through depending on the number of records there in the table. Sending the report to the printer prints out blank pages.

  3. Quit FoxPro and after restarting, type the following code in the Command window:

          _SCREEN.FORECOLOR=RGB(255,255,255)
          _SCREEN.BACKCOLOR=RGB(0,0,255)
          CLEAR
    

  4. Now preview or print the report and note that the pages of the report have data in them.


KBCategory: kbtool kbprg kbbuglist kbfixlist
KBSubcategory: FxprgSet FxtoolReportdes FxtoolRwriter FxotherDisplay
buglist3.00 buglist3.00b fixlist5.00 vfoxwin vfoxmac
Additional reference words: 3.00 3.00b invisible hidden


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: February 20, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.