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

Copy and Paste Multiple Values, Record Selection

Status
Not open for further replies.

JonathanNYC

IS-IT--Management
Mar 29, 2003
111
US
Is there a way to "copy and paste" multiple values (from an Excel table, for example) during the Record Selection process, rather than having to manually input such values or select from the drop-down menu. Or, is there another option that might ease the time to do this task?

Example: I am provided, sometimes, with a long list of six digit medical record numbers to select and report on. If the list is long it is a manually intensive task inputing all the applicable numbers or finding the numbers I need on the drop down table (there are over 100,000 medical record numbers, at this point).

Ideally, I would love to be able to copy the numbers from an Excel spreadsheet and paste them in Crystal using the "is one of" criteria.

I am using Crystal 10.0

 
Have you tried a list of values for the parameter?

Thanks so much!
satinsilhouette
 
Wonderful suggestion, that completely escaped me.
Help me please a step further, so I would create a parameter named, say "MedRecNumber" and then do I need to creat a formula, "MedRecNumber" and then simply paste the values into the formula. Then, in my select criteria I indicate table.medicalrecordnumber = to "medrecnumber"?
 
If you have the values in an Excel sheet, insert a column to the right of the first column, and enter a comma and copy it into every row of the column except the last. Then copy both columns, and in CR, go to report->selection formula->record and enter enter:

{table.field} in [ <paste here> ]

The values do not have to be entered horizontally (they can remain in vertical position).

-LB
 
LB to the rescue and thanks satinsilhouette. My sincere thanks.
 
I get the following message "a string is required here" when I do the following:

{pcmProcedure.procedureNumber} = 1 and
{@SurgDate} = {?DateRange} and
isnull({pcmprocedure.deletedon}) and
{pcxResources.resourceType} = "Implants" and
{pcxPatient.medicalRecordNumber} in [111111 ,
123456 ,
223344 ,
333666
]

I did the two column suggestion on Excel and and then pasted the numbers into the selection formula.

Am I missing some brackets somehwere?
 
Is your record number a string? Change the formula to:

{pcmProcedure.procedureNumber} = 1 and
{@SurgDate} = {?DateRange} and
isnull({pcmprocedure.deletedon}) and
{pcxResources.resourceType} = "Implants" and
tonumber({pcxPatient.medicalRecordNumber}) in [111111 ,
123456 ,
223344 ,
333666
]

-LB
 
Thanks again LBass, works perfectly - a huge performance boost to me. My sincere thanks and appreciation to you.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top