Solved

Parameter like

Posted on 2011-02-15
8
1,080 Views
Last Modified: 2012-05-11
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
Comment
Question by:GiaHughes
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
  • 2
8 Comments
 
LVL 12

Assisted Solution

by:JayConverse
JayConverse earned 150 total points
ID: 34895739
Let the users enter a parameter, then put this in the record selection formula

UpperCase({?myparam}) = uppercase(left({myfield},len({?mymaram})))
0
 

Author Comment

by:GiaHughes
ID: 34895848
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
 
LVL 12

Expert Comment

by:JayConverse
ID: 34895887
That's fine, just put those values into the selection list of the parameter.
0
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.

 

Author Comment

by:GiaHughes
ID: 34895892
Hi

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

Gordon
0
 

Author Comment

by:GiaHughes
ID: 34896120
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
 
LVL 26

Expert Comment

by:Kurt Reinhardt
ID: 34897752
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
 

Author Comment

by:GiaHughes
ID: 34902662
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
 
LVL 26

Accepted Solution

by:
Kurt Reinhardt earned 350 total points
ID: 34902699
{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

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I hate sub reports and always consider them the last resort in any reporting solution.  The negative effect on performance and maintainability is just not worth the easy ride they give the report writer.  Nine times out of ten reporting requirements…
Hot fix for .Net Crystal Reports 10.2.3600.0 to fix problems with sub reports running on 64 bit operating systems ISSUE: Reports which contain subreports fail with error "Missing Parameter Value" DEPLOYMENT SERVER OS: Windows 2008 with 64 bi…

749 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question