官术网_书友最值得收藏!

Filtering based on a contact field lookup

The simplest form of filtering for a report is to limit the report to only a portion of the contacts in your database. That way you only print the records that meet specific criteria. This type of filtering is done prior to running the report, and as such isn't directly part of running the report, but it's necessary for the filtering process in the report itself.

Getting ready

Before you create the lookup, you need to decide which report you plan to run, because the lookup needs to relate to the report you're creating. You also need to decide the criteria for the lookup. The example we'll use is the Contact Directory report and the lookup will be based on City and State.

How to do it...

  1. On the Detail Contact screen, right-click on the State field and choose Lookup State.
  2. If you don't see the full dialog box, click on Show more options. Verify the field type and type of query (Starts With) and use the dropdown to select the desired State. Make sure the For the current lookup is Replace Lookup.
    How to do it...
  3. Click the OK button. The screen will switch to the List View with a list of all the contacts in New York state.
  4. Click on Detail View to switch back.
  5. Right-click on City field and choose Lookup City.
  6. Verify the field and query type and use the dropdown to select the desired City. In the For the current lookup box, use the dropdown to choose Narrow Lookup.
How to do it...

How it works…

This procedure is a simple query chain. The first lookup examines the entire database and creates a temporary list of all the contacts in the specified state. The second lookup, by specifying Narrow Lookup, causes the query to look only at the temporary list, not the whole database, and then creates a new temporary list of contacts who are in the specified city within the specified state. This lookup is retained by the ACT! program until ACT! is closed or another new lookup is performed. It is called the Current Lookup and can then be used to filter a report.

There's more…

What was used here was a simple query lookup. The ACT! program provides other methods of querying the database that are more complex. As a general rule, if you need to create a lookup that is based on a couple of field values, the method shown here is a good one to use. A more complex query is shown in a later procedure.

Note

A special point to remember: the fields you use to create a lookup don't need to be used in the report you run. The lookup you create tells the report which contact to use, not the fields in the report.

主站蜘蛛池模板: 玛纳斯县| 盐源县| 桃源县| 本溪市| 朝阳市| 永寿县| 许昌市| 得荣县| 沈阳市| 华宁县| 施甸县| 民勤县| 塔河县| 会泽县| 丰宁| 宝山区| 奉节县| 禄丰县| 遵化市| 进贤县| 枝江市| 金塔县| 嘉禾县| 达孜县| 长宁县| 定西市| 阿坝县| 澳门| 泰来县| 福贡县| 三河市| 米易县| 台北市| 盐源县| 梧州市| 那坡县| 海晏县| 西宁市| 施秉县| 富宁县| 长汀县|