Report Question - Using Report to Calculate

A

Adam Charlton

I have two reports that calculate the sum of total pounds of parts. One is
for Parts Ordered one is for Parts Finished. I want to run a report that
calculates the difference in pounds between the two, but the queries can't
seem to be linked. How do I get both into the same report?
 
J

John Vinson

I have two reports that calculate the sum of total pounds of parts. One is
for Parts Ordered one is for Parts Finished. I want to run a report that
calculates the difference in pounds between the two, but the queries can't
seem to be linked. How do I get both into the same report?

Given that we have no idea how your tables are structured, or how
these totals are calculated on your existing reports, all I can say is
"I don't have any idea".

Could you post some explanation that might help someone answer?

John W. Vinson[MVP]
 
A

Adam

Here is the first one:

SELECT dbInventory.PartNumber, dbInventory.Description,
Sum(dbPurchaseOrderLineItems.WeightOrderd) AS SumOfWeightOrderd,
dbPurchaseOrderLineItems.PartNumberID
FROM dbInventory INNER JOIN dbPurchaseOrderLineItems ON
dbInventory.PartNoId=dbPurchaseOrderLineItems.PartNumberID
GROUP BY dbInventory.PartNumber, dbInventory.Description,
dbPurchaseOrderLineItems.PartNumberID
HAVING (((Sum(dbPurchaseOrderLineItems.WeightOrderd)) Is Not Null));

Here is the second

SELECT dbInventory.PartNumber, dbInventory.Description,
Sum(dbTicketLineItems.NetWeight) AS SumOfNetWeight
FROM dbInventory INNER JOIN dbTicketLineItems ON
dbInventory.PartNoId=dbTicketLineItems.PartNoID
GROUP BY dbInventory.PartNumber, dbInventory.Description;


My goal is to subtract the value in SumOfNetWeight in the second query from
WeightOrdered in the first query.

Thanks for your help,

Adam
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top