PRB: Query Filter Has No Effect when Output to Report

Last reviewed: May 15, 1997
Article ID: Q168593
The information in this article applies to:
  • Microsoft Visual FoxPro for Windows, versions 3.0, 3.0b, 5.0, 5.0a
  • Microsoft Visual FoxPro for Macintosh, version 3.0b

SYMPTOMS

When running a query created by the Query Designer with report as the output destination, the filter condition does not take effect in the report.

RESOLUTION

Remove any view or table in the report's DataEnvironment; otherwise, the report uses the table or view instead of the results in the cursor that the query creates.

STATUS

This behavior is by design.

MORE INFORMATION

Steps to Reproduce Behavior

  1. Open Tastrade sample project.

  2. On the Data tab, select Queries on the project TreeView window, then select New on the right. Click New Query.

  3. On the Add Table or View dialog box, add customer table and then click Close.

  4. On Fields tab of the Query Designer, choose Add All.

  5. Using the Visual FoxPro 3.0 or 3.0b Selection Criteria tab or the Visual FoxPro 5.0 or 5.0a Filter tab, set the filter as follows:

          Customer.region = "WA"
    

  6. From the Query menu, click Query Destination and select Report as the output destination. Click OK.

  7. On the Query Destination dialog box, place a check next to Page preview. Click the Wizard icon (with a magic wand) on the right, then click Report Wizard.

  8. On Step 1 of the Report Wizard, select Company_name, City, and Region as the report fields. Click Finish to skip the remaining steps.

  9. Click Finish again to save the report for later use and return to the Query Destination dialog box.

  10. Click OK to close the Query Destination dialog box.

  11. From the Query menu, select Run Query.

Notice that the filter condition does not take effect.


Keywords : FxtoolQueryvwdes vfoxmac vfoxwin
Version : 3.0 3.0b 5.0 5.0a
Platform : MACINTOSH WINDOWS
Issue type : kbprb


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: May 15, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.