Combine 2 Reports

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have 2 reports (code included) I can get them both to work seperately but I
need a report that will combine the info.
The Cost in the EST_S84 needs to then subtract the info in the extendedprice
field to make the Available field which I guess would be
[LEBAEst_Cost]-[ExtendedPrice] but I get null errors and it isn't totalling
the info right.
I have tried to put the 2 qry's into one but it doesn't work. Also, the MAIN
category field is the 260, 270, 280 etc BUT sometimes there is currency in
those fields so I had thoght of making an unbound 260TTL field that would
calculate since these figures do not need to be stored. If I haven't included
enough information please let me know as I only have a couple of days to get
this figured out.

THANKS so much!
--------------------
SELECT qryPurchaseOrderRpt.ProjectID, qryPurchaseOrderRpt.CategoryID,
qryPurchaseOrderRpt.MainCatID, qryPurchaseOrderRpt.CategoryName,
qryPurchaseOrderRpt.MainCatName, qryPurchaseOrderRpt.ExtendedPrice
FROM qryPurchaseOrderRpt
GROUP BY qryPurchaseOrderRpt.ProjectID, qryPurchaseOrderRpt.CategoryID,
qryPurchaseOrderRpt.MainCatID, qryPurchaseOrderRpt.CategoryName,
qryPurchaseOrderRpt.MainCatName, qryPurchaseOrderRpt.ExtendedPrice
HAVING (((qryPurchaseOrderRpt.ProjectID) Like [What Project ID?
Example:LEBA] & "*"));

-------------------------------
SELECT DISTINCT qryCategoryLookup.MainCatID, qryCategoryLookup.MainCatName,
[EST_S-84a].Category, qryCategoryLookup.CategoryName, [EST_S-84a].LEBAEst_Cost
FROM [EST_S-84a] INNER JOIN qryCategoryLookup ON [EST_S-84a].Category =
qryCategoryLookup.CategoryID
WHERE ((([EST_S-84a].LEBAEst_Cost) Is Not Null))
ORDER BY [EST_S-84a].Category;
 
huh?

babybirthday77 said:
"lmv" เขียน:
I have 2 reports (code included) I can get them both to work seperately but I
need a report that will combine the info.
The Cost in the EST_S84 needs to then subtract the info in the extendedprice
field to make the Available field which I guess would be
[LEBAEst_Cost]-[ExtendedPrice] but I get null errors and it isn't totalling
the info right.
I have tried to put the 2 qry's into one but it doesn't work. Also, the MAIN
category field is the 260, 270, 280 etc BUT sometimes there is currency in
those fields so I had thoght of making an unbound 260TTL field that would
calculate since these figures do not need to be stored. If I haven't included
enough information please let me know as I only have a couple of days to get
this figured out.

THANKS so much!
--------------------
SELECT qryPurchaseOrderRpt.ProjectID, qryPurchaseOrderRpt.CategoryID,
qryPurchaseOrderRpt.MainCatID, qryPurchaseOrderRpt.CategoryName,
qryPurchaseOrderRpt.MainCatName, qryPurchaseOrderRpt.ExtendedPrice
FROM qryPurchaseOrderRpt
GROUP BY qryPurchaseOrderRpt.ProjectID, qryPurchaseOrderRpt.CategoryID,
qryPurchaseOrderRpt.MainCatID, qryPurchaseOrderRpt.CategoryName,
qryPurchaseOrderRpt.MainCatName, qryPurchaseOrderRpt.ExtendedPrice
HAVING (((qryPurchaseOrderRpt.ProjectID) Like [What Project ID?
Example:LEBA] & "*"));

-------------------------------
SELECT DISTINCT qryCategoryLookup.MainCatID, qryCategoryLookup.MainCatName,
[EST_S-84a].Category, qryCategoryLookup.CategoryName, [EST_S-84a].LEBAEst_Cost
FROM [EST_S-84a] INNER JOIN qryCategoryLookup ON [EST_S-84a].Category =
qryCategoryLookup.CategoryID
WHERE ((([EST_S-84a].LEBAEst_Cost) Is Not Null))
ORDER BY [EST_S-84a].Category;
 

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

Similar Threads

HELP! Report SQL 6
Qry not returning all records 2
UNION rpt?? 3
STRUCTURE confused 5

Back
Top