Filtering Data by Using a Query Prompt |
When you need 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 so that the print operator can enter criteria for a database search. Then, only the records that match the entered text are printed.
Query prompts are useful when you want the print operator to be able to print specific filtered records on an as-needed basis. For example, suppose your shipping company uses a process in which the print operator needs to print shipping labels based on the city of the recipient. In this case, you 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 displayed, which the print operator uses to enter the city name. Then, only the records that contain City fields that equal the name of the entered city are printed.
On the Filter property page of the Database Setup dialog, your query prompt might resemble the following:
City Equals ?CityPrompt
Learn how to use the Filter property page on the Database Setup dialog to create a query prompt that appears at print time, either as a separate user-input dialog or as 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, so that print operators can 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 you filter data from a text file database.