Registrations are now open. Join us today!
There is still a lot of work to do on the wiki yet! More information about editing can be found here.
Already have an account?

Microsoft KB Archive/104052

From BetaArchive Wiki

Article ID: 104052

Article Last Modified on 12/1/2003


  • Microsoft Visual FoxPro 3.0 Standard Edition
  • Microsoft FoxPro 2.5b
  • Microsoft FoxPro 2.5a
  • Microsoft FoxPro 2.6a Standard Edition

This article was previously published under Q104052


FoxPro for Windows will only send data with a precision of two decimal places to Microsoft Graph. In other words, numeric fields that contain more than two decimal places will be rounded to just two places. The settings for the SET DECIMALS TO and SET FIXED commands have no effect on this behavior.


This behavior is caused by a limitation in the way that the GraphWizard sends data to MS Graph.


Microsoft has confirmed this to be a problem in the Microsoft products listed at the beginning of this article. This problem was corrected in Visual FoxPro for Windows version 3.0b.


The results of a query in the RQBE window can be sent to a graph by selecting Graph from the Output list box. The GraphWizard then takes over and provides direction on the creation of the graph/chart.

Steps to Reproduce Behavior

  1. Create a new database that has one character field and two numeric fields. The fields can have the default width of ten. However, make sure the numeric fields have three decimal places.
  2. Add three records to the database. In the character field, enter the letters A, B, and C. Enter any number for the numeric fields, as long as it has three decimal places. (NOTE: The third decimal place should not be zero.)
  3. In the Command window, issue the following command:

    USE <database>

  4. From the Run menu, choose New Query. In the Output list box, select Graph.
  5. Choose Do Query. The GraphWizard will take over and provide guidance on the creation of the chart. For purposes of reproducing this problem, choose Next three times. You should now be at the screen that says "Here's your graph!"
  6. Choose the Zoom button to open the graph in a window by itself. Double-click the graph to start up MS Graph.

    When MS Graph is open, there will be two windows. The graph will be in a window in front and will say "FoxPro(####)-Chart" in the title bar. The window in the background will contain the datasheet and will say "FoxPro(####)-Datasheet" in the title bar.
  7. Activate the Datasheet window. Select (highlight) the cells that contain numbers either by using the mouse or by using the arrow keys while holding down the SHIFT key.
  8. From the Format menu, choose Number. In the Format box at the bottom of the dialog box, type "0.000" (without the quotation marks). This is a custom number format that will display three decimal places. Choose OK.

The datasheet for the graph will now display the numbers with three decimal places. Note that the third decimal place is always zero. The numbers have been rounded. You can manually enter additional decimal places in Graph, but they will not automatically transfer over from FoxPro due to the limitation in the GraphWizard.


Microsoft FoxPro for Windows "User's Guide," version 2.5, pages U13-17 through U13-21

Microsoft Graph "User's Guide," pages 35 through 42

Additional query words: VFoxWin FoxWin 2.50 popup Gengraph MSGraph 3.00b

Keywords: kbbug kbfix KB104052