Microsoft KB Archive/122270

{| = FIX: RQBE Quick Report Shows All Fields Not Just Selected Ones =
 * width="100%"|

ID: Q122270

2.60 WINDOWS kbui kbprg kbbuglist kbfixlist

The information in this article applies to:


 * Microsoft FoxPro for Windows, version 2.6

SYMPTOMS
An RQBE Browse shows just the fields selected for output, but an RQBE Quick Report shows all the fields from the database, not just those selected.

WORKAROUND
Perform one of the following to work around this problem:

 Modify the Quick Report from the Command Window to remove the additional fields. Also, turn off the Overwrite File check box in the RQBE Display Options window so that the new report is not overwritten during subsequent runs of the query. -or- Include an order by in query. This causes the Quick Report to only include the selected fields.

STATUS
Microsoft has confirmed this to be a problem in Microsoft FoxPro version 2.6 for Windows. This problem was corrected in Microsoft FoxPro version 2.6a for Windows.

Steps to Reproduce Problem
1. In the Command Window, enter the following commands to set the default

working directory to the TUTORIAL subdirectory and open the CUSTOMER.DBF database:

SET DEFAULT TO C:\\TUTORIAL USE CUSTOMER 2. Create a query called TEST.QPR: CREATE QUERY test 3. Click Fields, and choose Remove All. Then select these fields: COMPANY STATE ZIP 4. Click OK to return to the main RQBE window. 5. Choose Do Query to see the Browse result, which shows just the three

selected fields. 6. Press the ESC key to return to the main RQBE window. 7. Under Output, change the selection from Browse to Report/Label.

8. Click Options. In the RQBE Display Options window, choose the Report

radio button. Then choose the Quick Report check box. 9. Click OK to accept the Quick Report name of TEST.FRX. 10. Click OK to close the RQBE Display Options window.

11. Click See SQL to view the underlying SELECT statement, which

accurately specifies the three output fields (COMPANY, STATE, ZIP):

SELECT Customer.company, Customer.state, Customer.zip; FROM Customer; INTO CURSOR Test CREATE REPORT test.frx FROM Test WIDTH 800 COLUMN NOOVERWRITE REPORT FORM test.frx PREVIEW 12. Choose Do Query to see the preview result. The preview shows a report designed with all the fields from the database that can fit across the page, instead of the three fields selected for output.