Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Multiple Value Parameters with wildcards

Status
Not open for further replies.

mdtimo

Programmer
Oct 18, 2001
38
0
0
US
I have a multiple value parameter that I want use to with wildcards to select records to pull up client names

For example If the user enters General and Ford it will pull up General Motors and Ford Motor Company.

I can't seem to place a multi value parameter in the "is like" part of the selection expert.

If I just manually enter in the criteria it looks like below.

{client.clname1} like ["*Ford*", "*General*"]

How can I use a multi value parameter with wildcards?

 
First decide how many parameter values you will allow, and prompt text like:

Please enter up to three names:

...and then go to report->selection formula->record and enter:

(
{client.clname1} like "*"+{?Name}[1]+"*"
or
(
ubound({?Name}) >= 2 and
{client.clname1} like "*"+{?Name}[2]+"*"
) or
(
ubound({?Name}) >= 3 and
{client.clname1} like "*"+{?Name}[3]+"*"
) //etc.
)

-LB
 

Make a multi select parameter called Name and treat it as you would a single select parameter.

{client.clname1} like {?Name}

Show the SQL to see what it sends to the database. It creates SQL like LBASS listed above.
 
lbass's technique worked.

Using the multi select parameter in the select criteria did not work.
 

I am using Oracle if that matters. It converts the asterisks into % signs and builds the expected SQL. It also converts the ?'s to _'s etc.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top