Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Using parameter to search string Post Reply Post New Topic
Author Message
Debh
Newbie
Newbie


Joined: 03 Mar 2008
Online Status: Offline
Posts: 6
Quote Debh Replybullet Topic: Using parameter to search string
     Posted: 10 Mar 2008 at 9:31am

I am using a parameter to pass the search criteria to crystal. I search a database field for this string. The parameter can be any length and upper or lower case. Same thing with the database field. I put the following formula in the record select. I am uppercasing the parameter and the database field before doing the string function. It does not do the uppercasing. Do you know how else to accomplish this?  Thanks.

UpperCase ({?SearchFor});
UpperCase ({ClearQuest.HEADLINE});
InStr ({ClearQuest.HEADLINE}, {?SearchFor}) > 0


Edited by Debh - 10 Mar 2008 at 11:44am
IP IP Logged
Debh
Newbie
Newbie


Joined: 03 Mar 2008
Online Status: Offline
Posts: 6
Quote Debh Replybullet Posted: 10 Mar 2008 at 11:21am
I fixed this by making the uppercase function of each field a formula and then using the formula fields in the record select. Tongue
 


Edited by Debh - 10 Mar 2008 at 11:44am
IP IP Logged
J.J.
Newbie
Newbie


Joined: 08 Dec 2009
Online Status: Offline
Posts: 9
Quote J.J. Replybullet Posted: 23 Jun 2011 at 3:00pm
I was looking for a way to search from a parameter into a string. InStr({?Param}

But it still was only searching lowercase or uppercase. Not both. So doing 2 uppercase functions in the formula field as you suggested worked perfect.

Record Select:
InStr({Uppercase String}),{@Uppercase Search}) > 0
IP IP Logged
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum