BUG: Vars Used in UDF Called by Report Display on Desktop

ID: Q112353

The information in this article applies to:

SYMPTOMS

The values of the variables used in a user-defined function (UDF) called by a report are displayed on the desktop.

CAUSE

The SET TALK command is ON, and the SET STATUS BAR command is OFF.

WORKAROUND

Type either "SET TALK OFF" or "SET STATUS BAR ON" (without the quotation marks) in the Command window.

STATUS

Microsoft has confirmed this to be a problem in FoxPro versions 2.5, 2.5a, and 2.5b for Windows. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.

MORE INFORMATION

This behavior occurs when you perform a page preview while modifying a report, as well as when you issue the REPORT FORMAT command to run a report.

Steps to Reproduce Behavior

 1. Create a program named TESTUDF containing the following code:

       FUNCTION TestUDF
       var = "UDF text"
       RETURN ""

 2. Type the following code in the Command window::

       CREATE TABLE test (name C(20))
       INSERT INTO test (name) VALUES ('Chris Tester')
       SET TALK ON
       SET STATUS BAR OFF
       CREATE REPORT TEST

 3. From the Report menu, choose Quick Report.

 4. In the Quick Report dialog box, choose OK.

 5. From the toolbox, select the Field tool.

 6. Place a field object in the Detail band.

 7. In the Expression text box for the field, type "TESTUDF()" (without
    the quotation marks). Choose OK.

 8. From the Report menu, choose Page Preview.

 9. In the Page Preview screen, choose OK.

10. Close the report. When prompted to save the report, choose No.

Note that the text "UDF text" is displayed on the desktop.

Additional reference words: FoxWin 2.50 2.50a 2.50b buglist2.50 buglist2.50a buglist2.50b desk top KBCategory: kbenv kbprg kbbuglist KBSubcategory: FxenvGeneral

Last Reviewed: June 27, 1995