R
rgrantz
I've been sitting here making queries, rewports, and subreports for about 2
hours, and thought maybe there was a very simple answer to what I need to
do:
I have a table (ItemDetail) with UnitID (unique identifier). In this table
is also DateProduced (date unit was manufactured)
I have a second table (QCData) which has UnitID as relational tie to
ItemDetail (many to one relationship; there are many entries in QCData
relating to one entry in ItemDetail). In QCData is also Defect, Qty (for
number of that defect found), and Solution (what was done to repair defect).
There can be many defects per UnitID. Each defect has a Qty AND Solution
UNLESS the Defect is the number standing for "No Defects."
Ex. in ItemDetail table:
UnitID DateProduced
1234 2/1/05
3456 2/2/05
ex in QCData table:
UnitID Defect Qty Solution
1234 crack 3 Reseal
1234 discoloration 1 Repaint
1234 wrong part 1 Remake
So, UnitID 1234 has a total of 4 defects that did NOT result in a remake,
and 1 instance of a Remake
There are four main focal points of reporting:
Total UnitID's produced
Total Instances of Solution = 1 (complete remake)
Total Instances of Solution = 2 (3/4 remake)
Total Instances of Defects (Sum of Qty in QCData) whose solutions were NOT 1
or 2
I need to run a report that, in any given date range shows how many UnitID's
TOTAL were produced per day (DateProduced is a date range parameter from
reporting form), how many TOTAL defects were found that day (not per UnitID)
whose Solutions were NOT 1 or 2, how many instances of Solution = 1, and how
many instances of Solution = 2.
My Grouping is by DateProduced
ex of Report (one day):
----1/2/05----
Total Units: 25 (Count of all UnitID's with DateProduced = 1/2/05)
Total Complete Remakes (Count of all QCData records with Solution = 1,
and DateProduced for all ItemID's is 1/2/05): 4
Total 3/4/ Remakes (same as above, only Solution = 2): 3
Total defects (Sum of the Qty field in QCData where that Defect did NOT
have a Solution of 1 or 3): 38
I have tried making 3 separate queries to get all the appropriate counts,
but then when they are put together in one query, I only get the number of
records where ALL their criteria match, so I'm probably not thinking about
the query construction right.
Can anyone help me get the query structure together so I can do this?
Thanks for any help
hours, and thought maybe there was a very simple answer to what I need to
do:
I have a table (ItemDetail) with UnitID (unique identifier). In this table
is also DateProduced (date unit was manufactured)
I have a second table (QCData) which has UnitID as relational tie to
ItemDetail (many to one relationship; there are many entries in QCData
relating to one entry in ItemDetail). In QCData is also Defect, Qty (for
number of that defect found), and Solution (what was done to repair defect).
There can be many defects per UnitID. Each defect has a Qty AND Solution
UNLESS the Defect is the number standing for "No Defects."
Ex. in ItemDetail table:
UnitID DateProduced
1234 2/1/05
3456 2/2/05
ex in QCData table:
UnitID Defect Qty Solution
1234 crack 3 Reseal
1234 discoloration 1 Repaint
1234 wrong part 1 Remake
So, UnitID 1234 has a total of 4 defects that did NOT result in a remake,
and 1 instance of a Remake
There are four main focal points of reporting:
Total UnitID's produced
Total Instances of Solution = 1 (complete remake)
Total Instances of Solution = 2 (3/4 remake)
Total Instances of Defects (Sum of Qty in QCData) whose solutions were NOT 1
or 2
I need to run a report that, in any given date range shows how many UnitID's
TOTAL were produced per day (DateProduced is a date range parameter from
reporting form), how many TOTAL defects were found that day (not per UnitID)
whose Solutions were NOT 1 or 2, how many instances of Solution = 1, and how
many instances of Solution = 2.
My Grouping is by DateProduced
ex of Report (one day):
----1/2/05----
Total Units: 25 (Count of all UnitID's with DateProduced = 1/2/05)
Total Complete Remakes (Count of all QCData records with Solution = 1,
and DateProduced for all ItemID's is 1/2/05): 4
Total 3/4/ Remakes (same as above, only Solution = 2): 3
Total defects (Sum of the Qty field in QCData where that Defect did NOT
have a Solution of 1 or 3): 38
I have tried making 3 separate queries to get all the appropriate counts,
but then when they are put together in one query, I only get the number of
records where ALL their criteria match, so I'm probably not thinking about
the query construction right.
Can anyone help me get the query structure together so I can do this?
Thanks for any help