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

Dynamic Parameters

Status
Not open for further replies.

Oglesbay

Instructor
May 5, 2006
71
US
Let me start off by giving some background. I work with a hospital system with multiple hospitals and we would like to create a report that allows us to first select the hospital and then select the corresponding cost centers within that hospital. The details would be the classes attended by the employees in the selected cost centers.

If I had a nice clean database this would be simple and I would be done already. The problem is our database is very old and very disorganized. For example, instead of having 15 different hospitals, we have like 70 because of misspellings and other problems. So when I use the dynamic parameter I get all 70 when I only want the 15 correct hospitals.

My question is, how can I create a dynamic parameter from a text file with the correct information, and not the database with all the incorrect information. Any guidance would be greatly appreciated. Thanks everyone!
 
Why not use a view of the data. Then use that view to populate your selection parameter.

Ian
 
Another method is to create a formula field that covers the 70 miss-spellings and generate a valid value. E.g.
Code:
if {hospital} in ["St Mary", Stmary", "St Beary" "stary"]
then "St Mary"
else ...
Continue with all options, and end with else "Unknown - " - {hospital}. Do this first as a listing and then adapt it for selections.

You don't say if case matters. Crystal includes UpperCase, LowerCase and 'ProperCase' commands, the last giving Title Case.

It helps to give your Crystal version - 8, 8.5, 9, 10, 11 or whatever. Methods sometimes change between versions, and higher versions have extra options. In this case, it probably makes no difference.

[yinyang] Madawc Williams (East Anglia, UK). Using Windows XP & Crystal 10 [yinyang]
 
Why not use a view of the data. Then use that view to populate your selection parameter."

Can you explain more please?
 
Create a data view on the database.

If you are not familiar with SQL, your DBA should be able to help.

Ian
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top