cancel
Showing results for 
Search instead for 
Did you mean: 

Parameters

0 Kudos

Hi Guys,

I am unsure how to achieve the following, all help would be greatly appreciated.

I have a table with the fields:-

ID

Forename

Surname

I have created a static parameter field based on the ID field, however when the users open the report and the parameter fields pop up, they can choose the code. Just the code is not very informative as there could be dozens.

I would like to display the Forename & Surname along with the ID for the user to choose the correct person, in a single drop down parameter option.

Is this possible?

Regards

Accepted Solutions (1)

Accepted Solutions (1)

abhilash_kumar
Active Contributor
0 Kudos

Hi,

To be able to use both the Forename and Surname, you would need to create a simple SQL query and point the parameter field to the field in this SQL Query:

1) Open the Database Expert > Click Add Command and type in a SQL Query like this:

Select ID, ForeName + ' ' + SurName Name from Table

For Oracle database, this would be:

Select ID, ForeName || ' ' || SurName Name from Table

2) Add this to the report and DO NOT JOIN to the other tables. Ignore the warning that follows.

3) Create a new Dynamic parameter and point the 'Value' field to 'ID' from the Command SQL and the Description to 'Name' from the same SQL.

-Abhilash

Answers (2)

Answers (2)

0 Kudos

Hi Abhilash,

That was excellent. It worked just the way I wanted it to.

Many Thanks for your help.

OAP

0 Kudos

Moved to Crystal Reports Forum.