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.
You may encounter a situation in which you create a record selection formula and, while header and footer information prints on your report, no detail information appears. The problem is the selection formula is rejecting all records. This usually occurs because of an error in the creation of the selection formula.
There are a couple of potential causes of your problem in the selection formula:
Correcting Uppercase/Lowercase Inconsistency
Record selection formulas are case sensitive. That is, "Bob" matches only with "Bob". It does not match with "bob", "BOB", "BoB", "bOB", "boB", or "BOb". Thus, if your selection formula is set to include only those records with "BOB" in the {customer.CONTACT FIRST NAME} field, but all the entries in the {customer.CONTACT FIRST NAME} field are mixed case ("Bob", for example), the selection formula will find no matches and thus will not print any details for the report.
You can solve this problem by using the UpperCase (str) or LowerCase (str) functions in your selection formula to convert field data to a consistent case before the program begins its selection. For example, if you were using this formula:
{customer.CONTACT FIRST NAME} = "BOB"
you can change the formula to this:
UpperCase({customer.CONTACT FIRST NAME}) = "BOB"
This second formula first converts the value of the {customer.CONTACT FIRST NAME} field to upper case characters and then checks to see if the value in that field is equal to "BOB". Using this formula, any instance of the three letters "b," "o," and "b" will be a match, regardless of case, because the case will be converted to uppercase.
You could use the LowerCase function in a similar manner to match with "bob."
Check your selection formula closely and make sure you have the correct case for any text you are trying to match. If in doubt, use the UpperCase (or LowerCase) function to assure consistency and proper matching.
Another formula which performs much the same functions is the following:
"BOB" in UpperCase({customer.CONTACT FIRST NAME})
Unwanted Spaces Appear in Selection Formula
Spaces are characters, and when you include spaces in the search key of a record selection formula, the formula looks for records with the exact match in the selected field, spaces and all. For example, the following formula:
"Mr . " in {customer.TITLE}
will not find any matches with the form of address "Mr." because there is an extra space in the search key between the letter "r" and the period. Likewise, "Ph. D" will not match "Ph.D".
Check your selection formula closely, and make sure that the spaces in the selection formula match the spaces in the fields you are trying to match.
Selecting Records | Pushing Down Record Selection to the Database Server