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

multiple input parameters

Status
Not open for further replies.

CrystalX

Programmer
Feb 8, 2011
4
US
Hi,
My data look like this:

Last_Name First_Name Last_FirstInit Total_Last_Name
Crawford Cindy Crawford C 1
Locked John John L 2
Locked Farrah Farrah L 2
Johnson Cathy Cathy J 1

How can I list the names above if my input parameters like:
Crawford, Locked J, Johnson

We only specify last name + initial if we think we have the same last name.
Could you help? Thanks in advance!.

CrystalX
 
Do you mean, how can I select a value like Locked J?

You could do it easily with two parameters, with the parameter for initials defaulting to blank and not testing if it is blank.

If you want it all in one parameter you can still do this. Something like
Code:
if ubound(split({param.field}," ")) = 2 then
split({param.field}," ")[2]
else " "
If you want to search for several names at the same time, that is more complex and multiple parameters might be better. But the method I showed can be adapted, only wiht an extra split based on commas.

[yinyang] Madawc Williams (East Anglia, UK). Using Crystal 11.5 with SQL and Windows XP [yinyang]
 
I need to display those persons (Crawford, Locked J and Johnson) and exclude Locked F. I have only one parameter (accept multiple value) in report.
So the input would be like : Crawford, Locked J, Johnson

I like to use two fields {last_name} and {last_firstinit} such as
if {myparam} contains initials then use {last_firstinit} to compare the specific record
else use {last_name}.

Any thought?
 
Data:
Last_Name First_Name Last_FirstInit
Crawford Cindy Crawford C
Locked John Locked J
Locked Farrah Locked F
Johnson Cathy Johnson C

In oracle PL/SQL I could simply use statement like:

Select * from emp_tab
where last_name in ('Crawford', 'Locked J', 'Johnson')
OR last_firstinit in ('Crawford', 'Locked J', 'Johnson')
it would give me 3 names listed above. anyone can help? Thanks
 
In Crystal, you need to do things within the limits of the reporting tool. (It is not a programming language.)



[yinyang] Madawc Williams (East Anglia, UK). Using Crystal 11.5 with SQL and Windows XP [yinyang]
 
Ok, understand that.
I added additional parameter to handle last name + initial then.
Thanks Madawc for your input!, I'd appreciated it.

CrystalX
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top