PRB: Report Writer Rounds Numeric Values

Last reviewed: June 27, 1995
Article ID: Q128892
The information in this article applies to:
  • Microsoft FoxPro for Windows, version 2.6a

SYMPTOMS

The Report Writer rounds numeric values when the field on the report is physically smaller than the original size of the field.

CAUSE

When the field size is not too small (where the field cannot hold the size of the numeric value) but the field is not large enough to hold the complete value, the Report Writer rounds the value.

RESOLUTION

  1. Increase the physical size of the field on the report.

  2. Leave the field the original size created by the Report Writer, but reduce the font size when more space is needed horizontally.

  3. Use the "TOP -- FIELD CAN STRETCH" option. This will cause the number to wrap to the next line.

STATUS

This behavior is by design.

MORE INFORMATION

In the Report Writer, if a field is too small to contain a given value, the field will contain asterisks to indicate numeric overflow. However, before this point is reached, you can decrease the size of the field and the Report Writer will round the number to fit it into the smaller field.

Steps to Reproduce Behavior

  1. In FoxPro, create a new report.

  2. In the Report Writer, Open the Customer table.

  3. Add the ytdpurch field to the report, and set the font to Courier New, size 10)

  4. Add a second ytdpurch field next to the first. Resize this field so that only "ytdpur" is displayed in the field box.

  5. Add a third ytdpurch field next to the second. Resize this field so that only "ytd" is displayed in the field box.

  6. Perform a Page Preview, and observe these results:

        - The original field displays the proper value from the Customer table.
    

        - Some of the values in the second field are rounded (all values in the
          thousands range).
    

        - Most of the values in the third field are asterisks (values in the
          thousands) with the remainder of the values rounded.
    

NOTE: If the second field has a "TOP--FIELD CAN STRETCH" attribute, you'll be able to see full value, but it will be wrapped.


Additional reference words: FoxWin 2.60a Report Writer round asterisk
KBCategory: kbtool kbprb
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.