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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Making default values for a second Paramater conditioned on the first?

Status
Not open for further replies.

jaybar48

Technical User
Feb 16, 2002
61
US
I want to write a report using paremeters, where the user is able to select from default names for Hospitals. The default values can come from the Hospital names field in the hospital table. {hospital.name}. That is easy to do?

Once the user selects a hospital, I want the user to then have a second parameter where a user can choose from a list of default programs for ONLY the hospital chosen. I don't know how to limit the choices in this popup, so that ALL programs for all hospitals don't appear. The data is coming from the program.name field in the program table.

The Hospital table and program table are related via the hospital_ID. Any Hospital Can have multiple programs.

How can I limit default program selection to only those program that relate to the hospital the user choses?

Thanks so much,


Jay
 
Crystal doesn't allow for dynamic parameters, nor a hierarchy, so this isn't possible.

You can populate the defaults for parameters at creation time, but if you add in new hospitals, you'll have to open the report and repopulate.

There is a 3rd party product that is designed to do this:


The alternative would be to write code.

-k
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top