cancel
Showing results for 
Search instead for 
Did you mean: 

Look up Parameter in Crystal Report

Former Member
0 Kudos

How do I design a parameter that is of type "Look Up"?

That is the parameter is a pair, NameValue - id. The id type is numeric, and the NameValue is a string. I want to show the user the NameValue, which is more user friendly than the id.

For example the parameter maybe a dropdown. I am using Crystal 11.5 and Crystal 2008.

Many Thanks

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Thanks for the reply.

I mean a parameter that is similar to a drop down or a list of values (strings) Let's say the user is prompted for the parameter state, we do not want the user to type the state id or a type string, but to select it from a drop down.

How is this accomplished in Crystal?

Former Member
0 Kudos

In Crystal 2008, you would have the id under "Value", and the description under "Description". Then, under "Value Options", set "Prompt with Description only" to True.

I'm not sure what the 11.5 version of this would be -- I skipped over that one.

Former Member
0 Kudos

Try to create a dynamic parameter with the value field as ID and the description field as string field.

Regards,

Raghavendra

Answers (3)

Answers (3)

Former Member
0 Kudos

I closed this question sooner than I should.

I was able to set a Crystal Parameter as 'lookup' as answered in the previous post, using the dynamic value and prompting only for the description, however it is not possible to make the command parameter as a lookup?

For example: the report that is getting the data from a store procedure. The store procedure has a parameter of type int. I would like that instead of prompting for the int, what we want is prompt for the value description instaed.

How is this done in Crystal?

Many thanks,

Former Member
0 Kudos

Since you are using stored procedure the stored procedure parameter is always a static parameter. So you need to try creating list of values using Business View Manager in the repository and in the report edit the stored procedure parameter and make it as dynamic and select existing LOV from the repository by connecting to the server.

Regards,

Raghavendra.G

Former Member
0 Kudos

Got it working. Thanks!

Former Member
0 Kudos

Do you mean that the data in the database is in the format of NameValue - ID? If so then you need to try adding a query using Add Command option in the report and write the query that splits the field into two seperate columns and now you can use it in the parameter field.

If both are different fields then you can add the ID field in the value field of edit paraemter window and add the name field in the description so that the display field will be the name field and the selected field will be the value field.

Regards,

Raghavendra