Troubleshooting record selection formulas

To troubleshoot your selection formula, you should first begin by making sure that all of the fields referenced in the selection formula are placed on your report. Then delete the selection formula and test it as you rebuild it,
step by step.

To troubleshoot record selection formulas
  1. Write down the record selection formula on paper. You will use this written copy to help you reconstruct the selection formula one step at a time.
  2. Remove the record selection formula from your report by deleting the formula from the formula text box in the Record Selection Formula Editor.
  3. Click Save and Close when finished.
  4. Make certain that all fields referenced in the record selection formula (the selectors) are on the report physically and are not hidden.

    For example, if one of the selectors is:

{customer.POSTAL CODE} > "80000"

but the {customer.POSTAL CODE} field is not used on your report (as in the case of a sales report that uses the postal code to define territories but does not include the postal code in the report data), then insert the {customer.POSTAL CODE} field into the report.

Or, if one of the fields referenced in the selection formula is on the report but is hidden, unhide it by deselecting the Suppress option in the Format Editor for that field.

  1. Print the report and verify that the data in those fields which are referenced in the selection formula print satisfactorily. Make certain that all the data prints. For example, if there are x total records in the database you should have x records printing for each of the referenced fields. This establishes a baseline against which you can compare the results of printing with the selection formula.
  2. When you are sure that you are getting satisfactory results without using the selection formula, you can enter the selection formula using only one of the selectors.

    For example, to use this as the final selection formula:

{customer.POSTAL CODE} > "80000" and {customer.CONTACT LAST NAME}[1] = "C" and {customer.LAST YEAR'S SALES} >= 5000

this formula will select all of those records that show a Postal code greater than 80000, a value in the {customer.CONTACT LAST NAME} field beginning with "C", and a value in the {customer.LAST YEAR'S SALES} field greater than or equal to 5000.

You might start with this as the first test selection formula:

{customer.POSTAL CODE} > "80000"

Print the report and evaluate the data that prints when you have only one selector activated. Does the {customer.POSTAL CODE} field show only ZIP codes greater than 80000?

  1. Once the selection formula with one selector activated is working properly, add a second selector. For example, the new selection formula might look like this:

{customer.POSTAL CODE} > "80000" and {customer.CONTACT LAST NAME}[1] = "C"

  1. Print the report and evaluate the data that prints when you have two selectors activated. Evaluate the data in the {customer.CONTACT LAST NAME} field (since you already evaluated {customer.POSTAL CODE} in the last step).

    Does the {customer.CONTACT LAST NAME} field show only text strings beginning with the letter "C"?

  2. Once the selection formula with two selectors activated is working properly, add a third selector, then a fourth, etc., until you have tested each selector in the selection formula.


Seagate Software, Inc.
http://www.seagatesoftware.com
Please send comments to:
techpubs@seagatesoftware.com