Microsoft KB Archive/93614

{| = PRB: Inconsistent Field Width on Report Writer .FRX Form =
 * width="100%"|

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.

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
 * }