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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Linking Tables 2

Status
Not open for further replies.

BobHorne2

IS-IT--Management
Jan 28, 2002
9
GB
I have a report that uses two tables from the same database. One table contains Time & attendance info, i.e list of shop floor staff and their clock on /off hours for each day. The other table contains information about the jobs the men worked on, which is usually one job in the day but could be 2 or 3 different jobs in the day.
I am trying to compare T&A hours with Hours worked on jobs on the same day. Where the man has worked on only one job in the day, the report is fine. However, where the man works on several jobs in the day I get multiple instances of the T&A hours, which is a problem when I am trying to compare totals.
eg
Date Id T&A_Hours Job_Hours Job
12/05/2002 222 8.5 8.2 Job123
12/05/2002 321 8.5 0.3 Job222
12/05/2002 321 8.5 8.1 Job456

The problem here is that man 321 only worked one shift in the day, but two instances are showing in the list.

Thanks for any ideas
 
If this printout takes place in the detail section and you are just eyeballing the values you can enable the "suppress if duplicated" for the T&A field and only the first one will show up....the same can be done with ID.

I think you are wasting report real estate though with this layout...since the date is repeated on each line.

If you group first on date and then on ID your report could look like this:

Date : 12/05/2002 (this is in the Date group header)

Id T&A_Hours Job_Hours Job

222 8.5 8.2 Job123

321 8.5 0.3 Job222
8.1 Job456

the extra space between ID's is done with a small blank ID footer...you can also present the sums for Job_hours here easily

Jim Broadbent
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top