Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1095
  • Last Modified:

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
0
Gordon Hughes
Asked:
Gordon Hughes
  • 4
  • 2
  • 2
2 Solutions
 
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
 
JayConverseCommented:
That's fine, just put those values into the selection list of the parameter.
0
Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
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
 
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
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.

Join & Write a Comment

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

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.

  • 4
  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now