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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CE 9 string parameter and wildcard *

Status
Not open for further replies.

beardenb

MIS
Jan 16, 2003
36
0
0
US
I have a report I developed in CR 9 with a string parameter called "Contract" which accepts multiple values. The record selection uses this parameter as follows:

{table.cntrct_used_cd} startswith {?Contract}

In CR 9 I run the report and when prompted I can enter a single value, multiple values, values with wildcards, or if I want the report to show everything, I simply enter a space which results in the SQL: sumry_cust_usage.cntrct_used_cd LIKE '%'


This works fine in CR 9, but when I move it to CE 9, I can't get the wildcard only option to work.

If I enter a space in CE 9 as I do in CR 9, the resulting SQL is:
sumry_cust_usage.cntrct_used_cd LIKE ' %'
which yields no rows.

If I enter an asterisk (which I thought was the right way to do this), the resulting SQL is:
sumry_cust_usage.cntrct_used_cd LIKE '*%'
which yields no rows.

If I enter nothing for this parameter, the report fails with the message:
Information is needed before this report can be processed.

I'm stuck! Is this a bug or am I missing the right way to go about it.

Thanks
 
You could try using the 'is like' operator instead of 'starts with' as this does allow the * and ? wildcards.

C.
 
Hi,
you could also revise the way the parameter is handled:

Code:
If 
( IsNull( {?Contract}) or  {?Contract} < '0') ) then
True
else
sumry_cust_usage.cntrct_used_cd startswith {?Contract}


[profile]
 
I took the simple route and tried 'is like'. That took care of it! Thank you carwillin and Turkbear for your input.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top