Parameter like

I know you can add discrete values in a parameter llike London
I would like to have a flexible parameter like London% where the user can state London in the paramenter and it will find all values stating with London
Can this be done and if so how
Gordon
Gordon HughesDirectorAsked:
Who is Participating?
 
Kurt ReinhardtSr. Business Intelligence Consultant/ArchitectCommented:
{table.field} like {?param} and {table.field} startswith {?param} are functionally the same in this regard.  When Crystal Reports creates it's query to pass to the database, they'll both be converted like..

~Kurt
0
 
JayConverseCommented:
Let the users enter a parameter, then put this in the record selection formula

UpperCase({?myparam}) = uppercase(left({myfield},len({?mymaram})))
0
 
Gordon HughesDirectorAuthor Commented:
Hi
I would like to give the users a list to select from
ie
Selsey
Runcton
Fruit

When they select Selsey (for example) I want information returned for Selsey and Selsey Leaf

Hope this makes sense
Gordon
0
Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
JayConverseCommented:
That's fine, just put those values into the selection list of the parameter.
0
 
Gordon HughesDirectorAuthor Commented:
Hi

Do I still create a formula
UpperCase({?myparam}) = uppercase(left({myfield},len({?mymaram})))

Gordon
0
 
Gordon HughesDirectorAuthor Commented:
Hi

I tried to add the formula
?myparam guess this is replaced with ?factory being the parameter

Not sure what the other 2 are replaced with?

Gordon
0
 
Kurt ReinhardtSr. Business Intelligence Consultant/ArchitectCommented:
Create a parameter with values like London, Selsey, etc.. the use the following record selection criteria:

{table.field} like {?param}

No need to convert to uppercase unless your database doesn't allow for case insensitivity (Oracle, for example) AND you have mixed case data.  A "like" isn't particularly efficient, but at least it processes on the databaes, where as an uppercase against a databased field won't be.

~Kurt
0
 
Gordon HughesDirectorAuthor Commented:
Hi
I found the solution
A simple case of using the slect feature and adding field with starts with and add the ?parameter
It works ok
Gordon
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.