if !empty(mHealthCard) select * from referal_to ; where referal_to.hlth_card = mHealthCard ; order by referal_to.refer_date ; into cursor LettersForThisPatient nofilter if _tally > 0 * Select the field required to display the clinic information on the report and * store that information into a cursor. select clnc_name, address2, address22,; alltrim(proper(city))+", "+alltrim(upper(Province))+" "+ alltrim(PostalCode) as CityProvcode,; alltrim(str(area_phone))+" "+alltrim(str(phone)) as telephone,; alltrim(str(area_fax))+" "+alltrim(str(facsimile)) as faxnumber; from clinic into cursor clinicinfo nofilter select lettersForThisPatient report form ViewReferralLetter preview else do form not_find endif endif