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!

Crystal Reports String Parameters 1

Status
Not open for further replies.

janedane

Programmer
Mar 8, 2004
22
IE
Hi All,
I have a two parameters as a range on a string field. Medical Number, it's alphanumeric.

I have following TrimLeft({PM_CHART_NUMBER_TABLE.MEDICAL_RECORD_NUMBER}) IN ({?param}) to ({?param2})
as a record selection. HOWEVER when I enter 500 and 550 as my parameters, crystal returns everything containing those numbers opposed to the range starting with 500 and ending with 550.

Any help would be greatly appreciated as this is sending me insane!!

Jane
 
Since you are using two parameters, they should each be discrete string parameters, not range parameters. You should provide a sample of your medical record field. If the field starts with the three numbers, then try:

trim(left({PM_CHART_NUMBER_TABLE.MEDICAL_RECORD_NUMBER},3)) in {?param} to {?param2}

Or, you could use one parameter {?Range} and use this formula:

trim(left({PM_CHART_NUMBER_TABLE.MEDICAL_RECORD_NUMBER},3)) = {?Range}

-LB
 
Thanks Ibass but unfortunately I have now receive no results.

I am using the two parameters as discrete values. Here are some examples of the medical field...


" 04"
" 255925"
" 331772"
" 57594QQ"


Thanks,
Jane
 
Sorry, I had the functions reversed. Try the following:

left(trim({PM_CHART_NUMBER_TABLE.MEDICAL_RECORD_NUMBER}),3) in {?param} to {?param2} //or

left(trim({PM_CHART_NUMBER_TABLE.MEDICAL_RECORD_NUMBER}),3) = {?Range}

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top