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 » Thu Jan 30, 2020 1:40 pm

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: 2
Joined: Fri Jan 06, 2017 9:50 am

Re: Crystal Report - SQL SP Parameter Dynamic Values

Post by brandon.ritchie » Thu Jan 30, 2020 4:11 pm

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