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

Drop-Down List Question

Status
Not open for further replies.

dsmbwoy

Programmer
Nov 11, 2008
35
CA
I'm wondering if what I'm looking for is even possible in Crystal. I created a parameter list that displays a distinct dynamic list of values on a parameter drop-down list when users refresh a report. For example 'Red', 'Blue', 'White'. The values that are displayed in the list is a distinct list of values that actually exist in the database field that I would like to filter for in my results.

The above is working fine for me. What I was wondering however is if it was possible to alter my list and still achieve the same results.

For example instead of displaying a distinct list of values from a database field ('Red', 'Blue', 'White') I would like to display ('R', 'B', 'W') but retrieve the actual values ('Red', 'Blue', 'White') from the database.

Is this possible in Crystal?


Thanks,

DB


 
Never mind. I made a change in the source database to accommodate this change.


Thanks,

DB
 
You could use a command to create the picklist, like:

select table.`color`, {fn left(table.`color`,1)} as Initial
from table

The syntax/punctuation would be specific to your datasource. Then in the parameter setup screen, select {command.color} as your value, and {command.Initial} as your description field for the dynamic parameter. Set the parameter to display only the description field. Of course, this wouldn't distinguish Pink from Purple in the parameter selection screen.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top