hi all
Using Crystal 9.0 and connecting to Access Database.
I'd like to have my report select records based on whether a any of a number of strings appear in a text field in the report.
I have a diagnosis_text field in the report and want to search that for the strings "TACI" or "TIA".
What i have at the moment is an array specified in the recordselection section and a for loop which i'm trying to loop through for each of the array entries, see below :
----------------------------------------------------------
numbervar i;
global stringvar array Freetext := MakeArray("TIA","TACI"
;
{PATIENT_REFERRAL.DATE_OF_REFERRAL} in {@StartDate(1)} to {@EndDate(2)}
and
left({CONTACTS.CONTACT_TYPE},1) = "D"
and
(
for i := 1 to 4 step 1 do
instr({PATIENT_REFERRAL_DIAGNOSIS_TEXT.DIAGNOSIS}, Freetext) > 0
)
-----------------------------------------------------------
The date_of_referral and Contact_type are the other selection criteria required, these work. I cannot however seem to get the array and for loop working. Could someone point me in the right direction as to what i've done wrong or how i should be going about doing this.
Thanks in advance
Using Crystal 9.0 and connecting to Access Database.
I'd like to have my report select records based on whether a any of a number of strings appear in a text field in the report.
I have a diagnosis_text field in the report and want to search that for the strings "TACI" or "TIA".
What i have at the moment is an array specified in the recordselection section and a for loop which i'm trying to loop through for each of the array entries, see below :
----------------------------------------------------------
numbervar i;
global stringvar array Freetext := MakeArray("TIA","TACI"
{PATIENT_REFERRAL.DATE_OF_REFERRAL} in {@StartDate(1)} to {@EndDate(2)}
and
left({CONTACTS.CONTACT_TYPE},1) = "D"
and
(
for i := 1 to 4 step 1 do
instr({PATIENT_REFERRAL_DIAGNOSIS_TEXT.DIAGNOSIS}, Freetext) > 0
)
-----------------------------------------------------------
The date_of_referral and Contact_type are the other selection criteria required, these work. I cannot however seem to get the array and for loop working. Could someone point me in the right direction as to what i've done wrong or how i should be going about doing this.
Thanks in advance