FIX: CREATE REPORT on SELECT-SQL Cursor Uses Original FieldsLast reviewed: October 20, 1997Article ID: Q118292 |
2.60
WINDOWS
kbprg kbfixlist kbbuglist
The information in this article applies to:
SYMPTOMSAfter you issue a SELECT-SQL statement in FoxPro version 2.6 for Windows and limit the fields that end up in the new table or cursor, running the CREATE REPORT command on the newly created table or cursor brings up all the fields from the original table. This behavior occurs even when the original table is closed. This behavior cannot be duplicated in any other version of FoxPro.
CAUSEThis problem only occurs when there are no additional clauses (such as WHERE or HAVING) on the SELECT statement.
RESOLUTIONTo work around this problem, add a WHERE, HAVING, ORDER BY, or GROUP BY clause to the SELECT statement. If you don't need a clause, add WHERE .T. to the end of the SELECT statement; for example:
SELECT customer.cno, customer.state; FROM customer; INTO CURSOR test WHERE .T. CREATE REPORT test.frx FROM test WIDTH 788 REPORT FORM test.frx PREVIEWThe above code works correctly and will display only two fields in the preview: CNO and STATE.
STATUSMicrosoft has confirmed this to be a problem in the Microsoft products listed at the beginning of this article. This problem was corrected in FoxPro version 2.6a for Windows.
MORE INFORMATION
Steps to Reproduce BehaviorExecute the following commands:
SELECT customer.cno, customer.state; FROM customer; INTO CURSOR test CREATE REPORT test.frx FROM test WIDTH 788 REPORT FORM test.frx PREVIEWAll the fields from CUSTOMER.DBF will be displayed in the preview. If you were to open the report, you would see that all the fields from CUSTOMER are included. If you check the expression, you will see that it does not include the alias, but the table listed in the popup at the bottom will be TEST. The expression evaluates to TRUE, which would lead you to believe that the fields actually all ended up in TEST. However, if you browse TEST, it will contain only the two fields specified.
|
Additional reference words: FoxWin 2.60 buglist2.60 fixlist2.60a relational
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |