FIX: Upper Format Truncates Right/Center-Alligned Report Field

Last reviewed: October 20, 1997
Article ID: Q134308
3.00 3.00b WINDOWS kbtool kbprint kbbuglist kbfixlist

The information in this article applies to:

  • Microsoft Visual FoxPro for Windows, versions 3.0, 3.0b

SYMPTOMS

When using a report designed with a field, variable, or expression formatted as uppercase and justified (alligned) either to the right or center of the area on the page for that field, you may encounter a probem. Upon clicking the OK button to open and close the report expression dialog box repeatedly (usually done after previewing or printing the report), you may see that the field, variable, or expression has been reduced to a single character; all the characters to the right of the first character have been truncated. The field, variable, or expression now appears as a single uppercase character alligned to the right or to the center. The format picture code character string of "@!J" (without the quotes) is transposed and enlarged to the string "@J<space>!"

Each time the Report Expression dialog box is reentered the number of spaces between the justification code (J for right, I for center) and the uppercase code (!) is increased by one if the OK button is used to close the dialog box.

WORKAROUND

One way to restore the field to the desired format is to delete the format picture codes from the Format text box in the Report Expression dialog box. Then click the three-dot button at the right to move to the Format dialog. Restore the formats by selecting the To Upper Case check box, and the appropriate justification check box.

Another way to work around the problem is to delete the space(s) that appear in the format picture codes string between the justification character (a J or an I) and the exclamation point that indicates uppercase. This is the string that appears in the Format text box in the Report Expression dialog box.

STATUS

Microsoft has confirmed this to be a problem in the Microsoft products listed at the beginning of this article. This problem has been fixed in Visual FoxPro 5.0 for Windows.

MORE INFORMATION

Steps to Reproduce Problem

  1. Set the default directory to Samples\Data.

  2. Open the Testdata database by using the MODIFY DATABASE TESTDATA command,

  3. Open the Customer table by using the USE CUSTOMER command.

  4. Create a new report consisting of the Company, Contact, and Title fields. To do this, on the File menu, click New. Then click Report, and click New File. Then open the data environment of the report and add the Customer table to it. Drag the selected fields to the Detail band of the Report Designer.

  5. Double-click the Contact field to open the Report Expression dialog box.

  6. Click the three-dot button located to the right of the Format text box.

  7. Select the To Upper Case check box under Editing Options.

  8. Clear the Left justify check box, and select the Right justify check box.

  9. Click OK to return to the Report Expression dialog box. Note the format picture codes. Now click OK to exit the Report Expression dialog box.

  10. On the View menu, click Preview. Note that the Contact field appears is

        in uppercase and right-justified (right-alligned).
    

  11. On the Preview toolbar, click the open door icon to return to the

        Report Designer.
    

  12. Double-click the Contact field to open the Report Expression dialog

        box. Here you will observe, in the Format edit box that the picture
        code characters are in a sequence different from that originally seen.
    

  13. Click OK to return to the Report Designer, and on the View menu, click

        Preview to preview the report again. Note that the Contact field is now
        a single uppercase letter positioned at the right of the field's area
        on the report.
    

  14. Return to the Report Designer. Double-click the Contact field. Note the

        spacing between characters in the Format text box.
    

  15. Click OK. Then double-click the Contact field again, and note that the

        spaces in the Format text box have increased by one.
    


KBCategory: kbtool kbprint kbbuglist kbfixlist
KBSubcategory: FxprintGeneral fixlist5.00 VFoxWin buglist3.00 buglist3.00b
Additional reference words: 3.00 3.00b picture function
Keywords : buglist3.00 buglist3.00b fixlist5.00 FxprintGeneral vfoxwin kbbuglist kbfixlist kbprint kbtool
Version : 3.00 3.00b
Platform : WINDOWS
Solution Type : kbfix


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: October 20, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.