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!

Field with qty > 0 2

Status
Not open for further replies.
Oct 12, 2005
204
GB
Hi,


Part_no Material History Qty

1234 Issue 200


Part_no Material History Qty
1234 Unissue 100


what I would like is to only return the records when (issued parts - unissued parts) Qty are greater than 0

Is there a way to do this?

I hope my explaination makes sense?

Regards,

mick.
 
I would write a formula field, doing the calculation. Then use the select expert and select only those records where the formula field is gretaer than 0.

Depending on your need,, you could always use a command, (sql satatement), doing the math in the command,, and then the select expert, choosing those records greater than 0.
 
As issue and Unissue are different recordsets you must group by Part_no.

In Group Selection enter

sum(issuedparts, partno) - sum(unissueuparts, partno) <> 0

Ian



 
For Ian's solution, you need to create two conditional formulas:

//{@issue}:
if {table.MaterialHistory} = "Issue" then
{table.qty}

//{@unissue}:
if {table.MaterialHistory} = "Unissue" then
{table.qty}

Then go to report->selection formula->GROUP and enter:

sum({@issue}, {table.partno}) - sum({@unissue}, {table.partno}) <> 0

-LB

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top