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!

How can I look up table without bringing records

Status
Not open for further replies.

dreman

Programmer
Jan 16, 2002
272
US
Using CR 8 with SQL Server 2000

What I am doing is trying to do the follwing:
Each items is stored in all location (A, B,C)
table connections:
Header_order -> Header_detail -> Items
I only need to test for specific items.
if items (ranges 1..10) has qty in location B
but for all the rest I need to check location A and C
Please advice.
Thank you
 
Crystal cannot just test records, but you can limit what is returned using the record/group selection formulas. These will, when properly used, pass SQL to the database, which in effect can *test* records and only return those of interest.

The most efficient means of *testing* records is by using a Stored Procedure, perhaps with parameters.

-k kai@informeddatadecisions.com
 
well you have defined a criteria for a record selection formula really

the way you describe your problem...you want Items with values 1 to 10 checked against a quantity in Location B as well as all items in Locations A and C

I am going to assume that Items 1 to 10 may exist in Locations A or C...as well that Item is a string variable...since it isn't clear from your post if they do

I would write a Record Selection Formula like the following to bring in the records of question

({Table.Item} in ("1","2","3","4","5","6","7","8","9","10")
and {Table.Location} = "B") OR
{Table.Location} in ("A","C")

I think that should work....if my assumptions are wrong then it is easily modified Jim Broadbent
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top