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!

Trying to look for item in an array

Status
Not open for further replies.

agrarian

Programmer
Jan 30, 2012
2
US
CR # 8.5
I have a list of items that need to be printed out on various reports. We used to only have US items, but now we have International items as well. I am using a Report with many Sub-reports.

My old sub-reports should now only show US items. At the end of the old report is a new sub-report that should only show International items.

US item numbers begin with an alphanumeric character. International Item Numbers begin with their two-character alpha country code. There are 50 of those codes which I can put into an array.

I want to add this new criteria into the Record Selection Formula (i.e. UpperCase(Left({dataTable.[ItemNumber]}, 2)) not in ["AU", "CA", "CH", "CN", "DE", etc]). But this does not work.

Any idea what I'm doing wrong?
 
agrarian,

The syntax for "Not In" is to wrap an "In" statement in a Not() as follows:

Code:
[blue]Not[/blue]([blue]UpperCase[/blue]([blue]Left[/blue]({dataTable.[ItemNumber]}, 2) [blue]in[/blue] ["AU","CA", etc etc])

Hope this helps! Cheers!

Mike
---------------------------------------------------------------
"To be alive is to revel in the moments, in the sunrise and the sunset, in the sudden and brief episodes of love and adventure,
in the hours of companionship. It is, most of all, to never be paralyzed by your fears of a future that no one can foretell."
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top