BUG: TRIM() Function in dBASE Label Is Not Migrated

ID: Q112475

The information in this article applies to:

SYMPTOMS

When printing a label migrated from dBASE IV, there are extra spaces between fields.

CAUSE

When FoxPro migrates the label, it does not add the TRIM() function to the character fields that had the "T" picture function in dBASE.

RESOLUTION

Modify the FoxPro label and use the TRIM() function on each field on which the trailing spaces should be removed.

STATUS

Microsoft has confirmed this to be a problem in the Microsoft products listed at the beginning of this article. 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 Problem

1. In dBASE IV, create a label with the following layout:

      XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX  && field: company name
      XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX  && field: address
      XXXXXXXXXXXXXXX, XX  XXXXX           && fields: city, state, zip

   By default each of the character fields will have the picture function
   "T", which is the TRIM function code to remove trailing spaces.

2. In FoxPro 2.6, choose Convert dBASE files from the Run menu. Select the
   directory where the above label was saved, double-click the label to
   mark it, and then choose Process. When the migration is complete, choose
   Close.

3. Modify the label. The following will be the label definition:

      COMPANY
      ADDRESS
      CITY+","+" "+STATE+"  "+ZIP

Note that none of the fields are TRIMmed. This will cause the output from the label to be different from that of dBASE IV.

To correct this problem, the label definition should be:

   TRIM(company)
   TRIM(address)
   TRIM(city)+","+" "+TRIM(state)+"  "+TRIM(zip)

Additional reference words: FoxDos FoxWin 2.60 buglist2.60 migrate convert .lbl .lbx KBCategory: kbprg kbbuglist KBSubcategory: FxinteropDbase

Last Reviewed: June 28, 1995