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

Multi-Range parameter help

Status
Not open for further replies.

mgkSHA

Programmer
Jul 12, 2002
126
US
I am not sure if this is possible. I can do this is VB, but I am not sure how to do it in Crystal.

I have a personnel VB application I am working on. I have created a work history report that shows the present and past work history events for each employee. Now, I can easily pass a parameter with the unique social security number and pull up the employee requested as:

{ado.SSNO} = {?SSNOparameter}

The problem is, we have over 500 employees and the HR staff can't recognize an employee via their SSN number. I have two questions:

1) Is it possible to pass a mulitple range parameter such as "Last Name" and "First Name". something like
{ado.Firstname} = {?NameParameter - start range}
{ado.Lastname} = {?NameParameter - end range}

I can create a parameter for first name OR last name OR SSN, I am just not sure how do get more than one.

I am sure some experienced Crystal developers have an answer to this, I am just not sure how to do it. Thanks
 
Dear mgksha,

Sure you can do this.

Create 2 parameters, one for first name and one for last name.

In your select expert you can do:

({ado.Lastname}+{ado.Firstname}) = ({?LnameParam}+{?FNameParam})

For faster performance you can create a SQL expression that concatenates the LName and Fname and compare just that:

{#sqlexprLNAME&FNAME} = ({?LnameParam}+{?FNameParam})


Hope that helps,

ro
Rosemary Lieberman
rosemary@microflo.com, Microflo provides expert consulting on MagicTSD and Crystal Reports.
 
Thanks, that is exactly what I needed. I knew it would be something simple.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top