Crystal Report - SQL SP Parameter Dynamic Values

Discussions related to Crystal Reports development.

Moderator: Lisa Ennis

Post Reply
mlevi
Posts: 53
Joined: Mon Dec 01, 2014 2:33 pm

Crystal Report - SQL SP Parameter Dynamic Values

Post 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?
brandon.ritchie
Posts: 7
Joined: Fri Jan 06, 2017 9:50 am
Contact:

Re: Crystal Report - SQL SP Parameter Dynamic Values

Post 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
Brandon Ritchie
Reports Technical Team Lead
SoftPro
Post Reply