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

Parameters: create select list of values & desc from Table

Status
Not open for further replies.

misbrandy

MIS
Jun 12, 2007
41
US
I know this can be done; can't figure out how!

When setting the default values for an input parameter to be from a table, how do I get the matching description over as well?

Eg. User selects from a list of product codes for the report. Product codes are meaningless without the associated description. I want to pull both code & description into my parameter definition without having to type in the description for each myself.

code Description
231 Yellow highlighter 3 pack
247 Yellow highlighter single - wide tip
253 Pink highlighter - wide tip
 
Ordinarily, you would have a table that contains the code and the corresponding description, and then you would find the table in the dropdown list, and select code for the value, and description for the description field. If you don't have a table like that, then there is no choice but to type it in.

If you have elements of the description in separate fields, you can create a formula for the description in a separate report that also contains the code, export it to tab-separated text, remove quotes, and then import the text document into the report to become the parameter list of values.

-LB
 
Hi LB - Could you please explain further?

I have tried that, but I am missing something: I edit my parameter, click on 'default values', type in my table name, select my field CODE, and the list of codes are populated. I then use the '>>' to move all the CODEs over. But I cannot seem to be able to get the associated DESC to go with them.

Thanks.
 
What version of CR are you using? You should always specify this. Sounds like an older version. Also please clarify whether you have a table that contains both code and description.

-LB
 
Yes, of course, I am using Crystal 10.

And, yes, the same table has both CODE and DESC.

Thanks.
 
Hi,
In CR 10 you always need to manually add the description for default parameters - That version, which uses static parameters ( the ability to use a table's field to populate them is just a convenience, it never updates when the data changes), only provides for the first (i.e. code) value....

In XI, the dynamic parameter option allows the choice of separate fields for code and description..



[profile]

To Paraphrase:"The Help you get is proportional to the Help you give.."
 
If you have a lot of codes/descriptions, then you could use the option of developing a separate report for the list of values, that you then export to text and import into your current report. You would have to manually update this periodically though.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top