BUG: Format Clause in Report Causes Erroneous Characters

Last reviewed: June 27, 1995
Article ID: Q117213
The information in this article applies to:
  • Microsoft FoxPro for Windows, versions 2.5, 2.5a, 2.5b, 2.6

SYMPTOMS

In the Report Writer, if a field has a format clause and an IIF(,,) statement in it, erroneous characters will appear if the field is blank.

RESOLUTION

If you remove the format clause ("XXXXXXXXXX" in the example below), the problem will no longer occur.

STATUS

Microsoft has confirmed this to be a problem in FoxPro versions 2.5, 2.5a, 2.5b, and 2.6. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.

MORE INFORMATION

Steps to Reproduce the Problem

  1. In the Command window, type the following commands:

    CLOSE ALL USE customer.dbf COPY TO test.dbf CLOSE ALL USE test.dbf REPLACE ALL company WITH ' ' FOR state = 'MA' GO TOP CREATE REPORT test.frx

  2. In the Report Writer, choose the Field button, place a field in the Detail band, choose the Expression button, and then type the following expression in the Expression For Field On Report box:

    IIF(company = ' ','BLANK',company)

  3. Choose Verify to make sure the expression is valid, and then choose OK.

  4. In the Format box, type the following, and then choose OK.

    XXXXXXXXXX

  5. From the Report menu, choose Page Preview. Choose the Zoom In button.

The first record is displayed as "BLANK00". It should be "BLANK". If the report expression is changed to IIF(company = ' ',' ',company), part of the field prints even though it should appear blank.


Additional reference words: FoxWin 2.50 2.50a 2.50b 2.60 buglist2.50
buglist2.50a buglist2.50b buglist2.60 Report IIF FORMAT RWriter
KBCategory: kbprg kbbuglist
KBSubcategory: FxtoolRwriter


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: June 27, 1995
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.