BUG: Scope on Report Command Doesn't Work as in version 2.xLast reviewed: May 5, 1997Article ID: Q135342 |
The information in this article applies to:
SYMPTOMSSpecifying a scope for a report to print does not print the correct records from the table.
CAUSEThe problem is that the DataEnvironment object created when the report was created performs an implicit GO TOP command as it initializes, even if the table is already open. This is necessary so that programmatic changes to Cursor object properties, such as Filter, take effect. A unexpected side- effect of this recent change is that the Scope clauses (ALL, NEXT, RECORD, and REST) on the REPORT FORM command do not affect which the records are printed. For example, if you have a table open and the record pointer is sitting at record 5, a REPORT FORM <x> NEXT 1 should print record number 5 only. However, because the DataEnvironment object performs a GO TOP command, the record pointer is re-positioned as the DataEnvironment object is initiated, so record number 1 prints - not 5.
WORKAROUNDTo use the REST, RECORD, and NEXT Scope clauses on the REPORT FORM command, you must prevent the implicit GO TOP command performed by the DataEnvironment object, which can be done in any one of these ways:
STATUSMicrosoft has confirmed this to be a problem in the Microsoft products listed at the beginning of this article. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.
MORE INFORMATION
Code to Reproduce Problemcreate table repotest (mychar c(1)) insert into repotest values ('1') insert into repotest values ('2') insert into repotest values ('3') insert into repotest values ('4') insert into repotest values ('5') create report repotest from repotest goto 2 REPORT FORM repotest next 1 &&Record 2 should print but record 1 prints |
Keywords : buglist3.00 buglist3.00b buglist5.00 kbtool vfpbug5.0a kbbuglist
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |