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

Printing Addtional Records That Don't Exist

Status
Not open for further replies.

Talgo

Technical User
Nov 27, 2003
17
0
0
US
I have 3 tables with the following relationships:

TimeCards
JobIDCodes
PhaseIDCodes

There is a one to many relationship between JobIDCodes & TimeCards

There is a one to many relationship between JobIDCodes & PhaseIDCodes

In the detail section of my report, I'm getting additional records printing for all PhaseIDCodes having the same JobIDCode. For example, if there are 3 hours charged to JobIDCode 31222 for PhaseIDCode 192, 3 hours will appear repeatedly for all other PhaseIDCodes having a JobIDCode of 31222 even if there are no hours charged to these codes. The one record that has hours is being repeated for all other PhaseIDCodes that appear in the PhaseIDCode table for that particular job.

I know I'm doing something wrong, but I can't seem to get the report to print records properly. Can anyone offer some suggestions?
 
Well it may acutally be correct behavior if you are print a query based on a 1 to many records. The one record will repeat. Under the properties of the field on the report, use the Suppress Duplicates option. This will hide the duplicate printed item. Another option is to use group headers/footers to display the parent (one) information. This assumes that the query used to generate the report is correctly joining to all relevent tables. htwh,

Steve Medvid
"IT Consultant & Web Master"

Chester County, PA Residents
Please Show Your Support...
 
Hi Steve,

Thanks for the quick response & fix suggestions. Moving my detail fields into the footer section did the trick, however, my job totals still include the unwanted records. Is there a way to only include the actual records in the job & grand totals?

Don
 
mmmm... Make sure your query is returning all the correct data.

Again, it is ok if there is duplicate parent (one) information.

I try to use the detail section of the report, then on those parent fields that duplicate, I use the property setting to hide duplicates from printing.

I use the footer typically for sub-totals...

In terms of the grand-total, you may want to again, review the query to make 100% sure you have just what you expect to get. When joining data across various tables, there is an assumption the data is correct... Could there be any dups or bad data in the child (many) tables?... htwh,

Steve Medvid
"IT Consultant & Web Master"

Chester County, PA Residents
Please Show Your Support...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top