Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Filling parameter drop down with data from sp...

Status
Not open for further replies.

marydn

Programmer
Mar 26, 2001
152
US
Can anyone tell me how I can fill a parameter drop down with data from a sp. I want the end-user to be able to select a customer from a drop down, but since the parameter is passed to the sp it wont allow it. Is there anyway I can code something that will allow this? Also, I am sing Crystal 8.

Thanks!
 
If I understood the question correctly, your parameter field requires values to be filled dynamically from a procedure. In this case, you can do it from the Reports server.
Create a separate report with sp and with the only field to display on this report is the result to be filled in your actual report parameter. Schedule this new report in the server exporting to a text file at approximate intervals in which your sp changes output.
Configure this text file as source to your actual report parameter in the server. You can generate report with latest parameter value selection.
 
I am not sure I understood this part:

"Configure this text file as source to your actual
report parameter in the server."

This configuration can't happen automatically in CR - at least not that I can see. Ken Hamady, On-site Custom Crystal Reports Training & Consulting
Public classes and individual training.
Guide to using Crystal in VB
tek@kenhamady.com
 
I have decided on a new way to handle this. I create a report that brings up the "parameter list" as its only output. The user "selects" the parameter which is displayed as a URL to the required report. It works so so.. at least the users are somewhat happy with it.


Lisa
 
Ken: It sounds like SekharEevani is referring to the old Crystal Info method of basing parameters on a text file.

You figured out a nice solution, Lisa. Within CR you cannot dynamically populate drop downs, an incredible design oversight, and one that apparently isn't scheduled to be corrected soon...

-k kai@informeddatadecisions.com
 
Thought that might be the case. Ken Hamady, On-site Custom Crystal Reports Training & Consulting
Public classes and individual training.
Guide to using Crystal in VB
tek@kenhamady.com
 
Thanks all for the responses. I decided to go the easy way and just pull all the cusotmers into the report and let the user select from there.I still use other parameters in the sp and it seems to work well.
 
Actually, that brings up a good point. You could create a report that is just a list of all customers, and then use an On-Demand subreport for the actual report. Ken Hamady, On-site Custom Crystal Reports Training & Consulting
Public classes and individual training.
Guide to using Crystal in VB
tek@kenhamady.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top