PRB: Y-Axis Format in Graph Is Lost After Using UPDATEGRPH

ID: Q108669

2.50 2.50a 2.50b WINDOWS kbprg kbprb

The information in this article applies to:

SYMPTOMS

When you use the UPDATEGRPH function to programmatically update a graph in a database created by Microsoft Graph through GENGRAPH.APP, the y-axis number format (for example, #,##0) that is saved with the graph's datasheet is lost after the graph is updated with the new data. The #,##0 format on the y-axis is replaced with the general format based on the new data.

STATUS

Microsoft is researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.

MORE INFORMATION

Steps to Reproduce Behavior

 1. In the Command window, issue the following command:

       CREATE QUERY

 2. Select the CUSTOMER.DBF file from the FOXPROW\TUTORIAL subdirectory.

 3. Select the Fields check box.

 4. In the RQBE Select Fields dialog box, choose the Remove All button.

 5. In the Table Fields list box, select the YTDPURCH field and then
    choose the Move button. Repeat this step again, but this time select
    the CONTACT field. Select the No Duplicates check box and then choose
    the OK button.

 6. Under Field Name, select the STATE field, select the logical operator
    LIKE, and in the Example text box, type the state LA.

 7. In the Output list box, select Graph.

 8. Choose the Do Query button.

 9. Select the Column chart type and then choose the Next button.

10. If you want, change the default title and then choose the Next
    button.

11. Choose the Zoom button.

12. Double-click the graph to open Microsoft Graph.

13. Click the datasheet and select the entire YTDPURCH column.

14. From the Format menu, choose Number, select the #,##0 format, and then

   choose the OK button. Check that the values on the Y-axis in the chart
   display in the newly selected format (that is, 12,0000, 10,000, and so
   on).

15. From the File menu, choose Update, and then choose Exit And Return To
   FoxPro [###].

16. Click the close box in the Zoom window.

17. In the Microsoft FoxPro GraphWizard dialog box, choose the Save As

    button.

18. Using the default filename (QRYGRAPH.DBF), save the graph in the
   FOXPROW directory and then choose the Save button. A WAIT window will
   appear with the drive and directory where the QRYGRAPH.DBF file is
   saved.

19. Choose the OK button in the Microsoft FoxPro GraphWizard dialog box and
   then press ESC to close the RQBE dialog box. You don't have to save the
   UNTITLED.QPR file.

20. From the Window menu, choose View.

21. In the View window, select a work area and open the QRYGRAPH.DBF file

   and then BROWSE the database. Double-click the field called GEN and
   verify that the chart's Y-axis is correctly formatted. Press ESC twice
   to exit the general field and the Browse window. Close the
   QRYGRAPH.DBF.

22. In the Command window or in a program, issue the following code:

       CLEAR ALL
       SELECT ytdpurch,contact FROM \Foxprow\Tutorial\CUSTOMER WHERE ;
          STATE="MA" INTO CURSOR query  && semicolon not required at
                            && the Command window
       DO UPDATEGRPH IN GENGRAPH.APP WITH ;
          "\FoxProw\qrygraph.dbf", 1, 1, "My Title"
       USE \Foxprow\qrygraph IN 0
       SELECT qrygraph
       BROWSE

23. In the Browse window, double-click the field called GEN; the values on
   the updated chart's y-axis will show a different number format. The
   #,##0 number format that was originally saved with the graph's
   datasheet will be replaced by the general format based on the new data.

Additional reference words: FoxWin 2.50 2.50a 2.50b gengraph updategrph format msgraph qrygraph chart relational query by example KBCategory: kbprg kbprb KBSubcategory: FxtoolRqbe
Keywords          : FxtoolRqbe 
Version           : 2.50 2.50a 2.50b
Platform          : WINDOWS

Last Reviewed: May 1, 1996