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

How to pass a list of names as a parameter from vb .net 2008

Status
Not open for further replies.

ticollins

Programmer
Nov 11, 2010
1
US
Hopefully I am in the right forum?

I am trying to pass a list of names (i.e. John Smith, Jane Doe, Fred Smith) as a parameter to a crystal report. I was hoping to create a sql 'IN' like structure in the Record Selection formula like:
First_Name & ' ' & Last_Name IN {?Full_Name}

If my list only contains a single value then the reports works.
 
Hi,
You can pass a multivalue string as a parameter but coding it can be tricky since strings and the URL need the proper quote mark enclosures and the separator for the IN clause has to be concatenated, something like:(Very rough pseudocode)

name1Str = "First_Name" & ' ' & "Last_Name"
name2Str = "First_Name_2" & ' ' & "Last_Name_2"
...

Then try:

ParamValueStr = name1Str & "," & name2Str & "," ...


PassedParam=ParamValueStr




[profile]

To Paraphrase:"The Help you get is proportional to the Help you give.."
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top