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

parameter - display value and label for user when selecting

Status
Not open for further replies.

swhitten

Technical User
Sep 3, 2002
191
US
I have a report parameter that allows the user to select which customer to report on. I linked it to the customer list in my database. The user would like to be able to see both the customer ID AND the customer name when selecting which customer to report.

I can put the customer ID field in as both the value and the label, and that shows her the customer ID field. But I don't know how to show her both ID and name. If I link the Customer Name field as the label, it only shows her the Customer Name when she is selecting the customer.

Any ideas? Thanks!
 
If you are referring to the Parameter list for selection criteria for a report, then a very simple option may be:
Code:
SELECT [CustId] = CustomerId,
	[Display] = CAST(CustomerId AS VARCHAR) + ' - ' + CustName
FROM Customer
ORDER BY CustomerId;

--------------------------------------------------
“Crash programs fail because they are based on the theory that, with nine women pregnant, you can get a baby a month.” --Wernher von Braun
--------------------------------------------------
 
very simple option = best option ;-)

Rgds, Geoff

We could learn a lot from crayons. Some are sharp, some are pretty and some are dull. Some have weird names and all are different colours but they all live in the same box.

Please read FAQ222-2244 before you ask a question
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top