PRB: Inconsistent Field Width on Report Writer .FRX Form

Last reviewed: June 26, 1995
Article ID: Q93614
The information in this article applies to:
  • Microsoft FoxPro for Windows, versions 2.5 and 2.5a

SYMPTOMS

On the .FRX form, the Report Writer displays different lengths for fields specified to contain the same number of characters. Specifically, a numeric field appears shorter than a character field of the same length. However, the report appears correct in Print Preview and printed output.

CAUSE

All numbers are the same width independent of the font chosen to display the numbers. However, characters in a font have varying widths. The length of a character field is calculated using the average width of the characters of the font and an additional factor to increase the width.

STATUS

This behavior is expected based on the design of the fonts in Microsoft Windows.

MORE INFORMATION

Steps to Reproduce Problem

  1. Create a database (for example, NUM_CHAR.DBF) with the following fields:

          Name      Type           Length
          -------------------------------
    
          CHAR1     Character      1
          NUM1      Numeric        1
          CHAR2     Character      2
          NUM2      Numeric        2
          CHAR3     Character      3
          NUM3      Numeric        3
          CHAR4     Character      4
          NUM4      Numeric        4
          CHAR5     Character      5
          NUM5      Numeric        5
    
    

  2. Create a quick report for this database.

In the .FRX file, the displayed fields are larger for character fields than for numeric fields. On a printed record, numeric fields are shifted slightly to the right.


Additional reference words: FoxWin 2.50 2.50a
KBCategory: kbprg kbprb
KBSubcategory: FxprintFont


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