I have a report that allows me to enter multiple keywords and then searches for occurrences of them in a memo field. Here is the language I use in the selection criteria:
numbervar counter ;
stringvar holder ;
holder := "" ;
counter := 0 ;
for counter := 1 to count({?Search Value}) step 1 do
holder := {?Search Value}[counter] ;
holder in {Filename.memofield}
This works great. If I enter three keywords, the report returns all of the records in which EITHER the first word, OR the second word, OR the third word occurs.
Here's my problem: I would like to insert a parameter that allows the user to specify that he or she would like the report to consider ANY term or ALL OF THE TERMS.
In other words, what is the language if you want the report to return records in which the first keyword AND the second keyword AND the third keyword ALL APPEAR?
Obviously, I can set up a finite number of variables (e.g., Text 1 = parameter[1] and Text 2 = parameter[2] and so on), but this limits me to however many variables I create ahead of time. Also, it seems pretty inelegant to me.
Is there a better way? I am using Crystal Reports 9.2.
numbervar counter ;
stringvar holder ;
holder := "" ;
counter := 0 ;
for counter := 1 to count({?Search Value}) step 1 do
holder := {?Search Value}[counter] ;
holder in {Filename.memofield}
This works great. If I enter three keywords, the report returns all of the records in which EITHER the first word, OR the second word, OR the third word occurs.
Here's my problem: I would like to insert a parameter that allows the user to specify that he or she would like the report to consider ANY term or ALL OF THE TERMS.
In other words, what is the language if you want the report to return records in which the first keyword AND the second keyword AND the third keyword ALL APPEAR?
Obviously, I can set up a finite number of variables (e.g., Text 1 = parameter[1] and Text 2 = parameter[2] and so on), but this limits me to however many variables I create ahead of time. Also, it seems pretty inelegant to me.
Is there a better way? I am using Crystal Reports 9.2.