Page 1 of 1

Crystal Report - SQL SP Parameter Dynamic Values

Posted: Thu Jan 30, 2020 1:40 pm
by mlevi
I created a Crystal Report that runs based off a SQL stored procedure. One of the parameters in my SQL stored procedure is Client. Crystal reports automatically created a parameter @Client that maps to the SQL parameter. I am trying to set that @Client parameter in Crystal to show a prepopulated drop down of values where the user can choose one and that will be passed into the stored procedure. I tried to do this by using the PARAMETER_VALUES parameter, but for some reason it is not working and is causing an error.

Can I use the PARAMETER_VALUES parameter to create a prepopulated drop down of values for a parameter that was created from a SQL Stored Procedure or does that only work for parameters manually created in Crystal?

Re: Crystal Report - SQL SP Parameter Dynamic Values

Posted: Thu Jan 30, 2020 4:11 pm
by brandon.ritchie
Yes, you can use PARAMETER_VALUES to populate a combo list from a stored procedure parameter. It needs to be string/varchar but it works the same way as if it was a crystal parameter. Make sure to include the @ in the name in the parm. values parameter. They need to be the exact name as shown in the Crystal parameter list.

@Client
sql to populate list