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

Select single field with multiple values problem CRv10

Status
Not open for further replies.

cvasquez

MIS
Feb 28, 2001
88
US
I am using Crystal Reports V10. I am trying to select a single field, which is an integer, with multiple values.
The only possible way I could do a select statement is
by selecting the a single field in the Formula Editor. This is the current select statement that works:

{INVENTOR.ITEM_ID} in "180860,180960,180871"

This is the answer I get:
180860
180960
180871
6
60
960

Why this result? I am only asking for those three ID's. Now If I try to delete the quotes and add ( ), this is not acceptable by the program. Please help. What am I doing wrong?


Carlo
 
Try using:

{INVENTOR.ITEM_ID} in ["180860","180960","180871"]

You might also create a numeric parameter and select a multiple value type, which will allow you to dynamically enter them, then the record selection would be:

{INVENTOR.ITEM_ID} = {?MyParameter}

-k
 
I think you should reformat the item ID. Assuming it is a string, then use:

totext(val({inventor.itemID}),"000000") in ["180860","180960","180871"]

This prevents item IDs with fewer digits that match subsets of an ID from being selected.

-LB


 
Thanks the first fix by synapsevampire worked.
Awzome guys.
 
synapsevampire, your second suggestion is awzome but I am not that familiar with Crystal yet. Is there documentation on how to do that..? Where would I put this: {?MyParameter}
value in?

Just asking.
 
Wow, just encountered a problem.
The select statement is not letting me search thru 3,500 data comparison values.

I wonder if I can make an array..? But I don't know where to start and would not know how to make one.

Please help.

Thanks.

Carlo
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top