Filtering Data Using a Query Prompt |
When you need the ability to provide filter criteria at print-time, you can use the Database Setup dialog to create a query prompt that appears each time the document is printed, allowing the user to enter criteria for a database search. Only records that match the entered text will be printed.
Query prompts are useful when you want the print operator to be able to print specific filtered records "on the fly." For example, suppose you run a shipping company where you want to give the print operator the ability to print shipping labels based on the city of the recipient. To do this, you would use the Filter property page of the Database Setup dialog to create a filter condition where the "City" field from the database equals a query prompt. At print-time, a query prompt dialog is then displayed, allowing the print operator to enter the city name. Only records that contain City fields that equal the name of the entered city will be printed. On the Filter property page of the Database Setup dialog, your query prompt might look like this:
City Equals ?CityPrompt
Learn how to use the Filter property page on the Database Setup dialog to create a query prompt that will appear at print-time, either as a separate user-input dialog or a control on a data entry form.
Adding a Query Prompt to the Form
You can optionally link certain data entry controls to your query prompt, allowing print operators to use those controls on the data entry form to specify the filter criteria to be used for the query prompt.
Using a Query Prompt to Filter Data in a Text File Database
Learn how to use wildcard and escape characters in a query prompt when filtering data from a text file database.