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

Printing the mapped name of a numeric parameter

Status
Not open for further replies.

steve053

Technical User
Oct 11, 2005
26
US
Crystal 10 & SQL 2000 database

I have a number field {MEDICATION_ID} and a string field {MEDICATION_NAME}.

Both fields are in the same table RX_MED_TWO.

I would like to use a parameter in my record selection using the medication number(s). I would then like to have the report return the list of medication names used in the record selection.

Input: 53201, 52302
Expected Output: Crestor 40 MG PO Tabs, Crestor 5 MG PO Tabs

I've found other posts and resources explaining how to return the {MEDICATION_ID} numbers, but nothing like this.

I could use the actual medication name in the parameter, but {MEDICATION_ID} is indexed, and I have a higher accuracy typing number strings than "greek" pharmacy names.

Thank you for help.
 
We had to do something similar to this and ended up using a subreport in the Report Header.
Your subreport would be linked to the main report using the same parameter that you're using for Main Report record selection.
The sole purpose of the subreport would be to read your table and return the long description relating to each of the codes entered in the main report's parameter.


Bob Suruncle
 
Thanks Uncle Bob! That should do the trick.
 
Hi,
The value of the parameter is not related to the data displayed except for limiting the records returned.

You can use the parameter to create a selection formula:
Code:
 {MEDICATION_ID}  = {?ParameterID}

But in your displayed fields, use {MEDICATION_NAME} not the ID...






[profile]

To Paraphrase:"The Help you get is proportional to the Help you give.."
 
Turkbear-

My problem is I don't know how to return all of the multiple values that are selected in the parameter.

Yes, my data will be restricted to the selection critera, but I want to list my entire selection critera (even if there are no records for a particular item).
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top