Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Parameters Post Reply Post New Topic
Author Message
Crystal Learner
Newbie
Newbie


Joined: 12 Jul 2011
Online Status: Offline
Posts: 7
Quote Crystal Learner Replybullet Topic: Parameters
     Posted: 25 Aug 2011 at 8:34am
Hello Gurus,
 
Could you please guide me on how to search for values on a parameter.
 
For e.g. if I have a parameter on a Material (there could be thousands of values), instead of seeing the list of values the user should be capable of searching the values. Also i am unable to see all the values in the parameter is there any setting I can use to see all the values from the database.
 
Any input is really appreciated.
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 25 Aug 2011 at 8:40am
What do you mean by a user must be able to search the values?
 
a registry setting defines the total number of values that appear in the lov
 
 
 
IP IP Logged
Crystal Learner
Newbie
Newbie


Joined: 12 Jul 2011
Online Status: Offline
Posts: 7
Quote Crystal Learner Replybullet Posted: 25 Aug 2011 at 11:53am
Thank you for your time. what I meant was if there were 10000 values for a perticular filed, can the user search as per his requiremnt. For e.g. if there is filed by name 'Material Description' and the vale for that field as 'Steel for factory' , instead of loooking for 'Steel for factory', if the user gives the value as *Steel* he should be able to see all the vaalues related to Steel.
IP IP Logged
sharona
Senior Member
Senior Member
Avatar

Joined: 16 Oct 2008
Location: United States
Online Status: Offline
Posts: 255
Quote sharona Replybullet Posted: 26 Aug 2011 at 6:26am
yes, you need to create a like statement in the record selection
 
If {?Parameter}='ALL'
Then {Database.Field} like '*'
Else {Database.Field} = {?Parameter}

sharona
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 26 Aug 2011 at 11:32am
If you are only letting them search for one value use the instr() in your select statement so the end user does not have to remember to type in *'s on either end.
Instr(table.field,?param,1)>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