Solved

Parameter like

Posted on 2011-02-15
8
1,079 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
  • 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: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say 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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Suggested Solutions

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…
Hello everyone, Hope you find this as helpful as we did. We have on the company I work for an application built in Delphi V with Crystal Reports 8. We all know that Crystal & Delphi can be temperamental sometimes and the worst thing is, nearly…
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

861 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