Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2020 : Report Design
Message Icon Topic: Using Like operator with parameter Post Reply Post New Topic
Author Message
victoria61485
Newbie
Newbie


Joined: 14 Apr 2010
Online Status: Offline
Posts: 19
Quote victoria61485 Replybullet Topic: Using Like operator with parameter
    Posted: 14 Apr 2010 at 5:32am
Is there a way to use the Like Operator with a Parameter field? I have a Parameter, {?CRA}, which has a list of default values. The field that I want to use {?CRA} with is IDB. It has entries such as 1FDG or 25BK163g. There are thousands of variations but the default values in the parameter, in this case would be, FDG and BK. A user will need to find all of the records in IDB with FDG and BK somewhere in the field using a drop down box. I cannot possibly import all of the thousands of variations into the default value list in {?CRA} so I was wondering if there was a way to select IDB = *{?CRA}* or IDB Is Like {?CRA}?
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 14 Apr 2010 at 5:53am
yes.
Make your param as the two options of FDG and BK
in your select expert
 
instr({table.field},{?CRA})>0
IP IP Logged
victoria61485
Newbie
Newbie


Joined: 14 Apr 2010
Online Status: Offline
Posts: 19
Quote victoria61485 Replybullet Posted: 14 Apr 2010 at 6:00am
If I get an error message that says"This array must be subscripted, do I put {?CRA} in brackets, [{?CRA}]?
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 14 Apr 2010 at 6:05am
You are letting them select more than one option in the parameter?
IP IP Logged
victoria61485
Newbie
Newbie


Joined: 14 Apr 2010
Online Status: Offline
Posts: 19
Quote victoria61485 Replybullet Posted: 14 Apr 2010 at 7:05am
I took that out and now it has an error that says "Does not support."
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 14 Apr 2010 at 7:14am

the param says does not support or the select statement gives that error?

IP IP Logged
victoria61485
Newbie
Newbie


Joined: 14 Apr 2010
Online Status: Offline
Posts: 19
Quote victoria61485 Replybullet Posted: 14 Apr 2010 at 7:32am
I re-ran it several times and it seems to work now, Thank you!
IP IP Logged
Post Reply Post New Topic
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



This page was generated in 0.047 seconds.