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!

Data Repeats in Report

Status
Not open for further replies.

HJessen

Technical User
Dec 18, 2002
39
US
FIRST A THANK YOU TO EVERYONE WHO HAS HELPED ME IN THIS NEW ENDEAVOR OF MINE! WITHOUT YOUR HELP, I WOULD STILL BE ON PAGE ONE!


Now to my current problem: I have a report with a Sub-Reports inside of it. The query for the main part of the report is a link between table_1 and Table_2 as follows:

Table_1 has:
- SSN (This is the relationship field)
- Last_Name
- First_Name

Table_2 has:
- SSN (This is the relationship field)
- Event_Date
- Event_Remarks

The relationship is all records from Table_2 and only those from Table_1 that match. The result is five records for myself having all six fields shown.

Using the report wizard, and grouping on last_name, I end up with five records, shown five times. (i.e.
Myself (Group)
Event 1
Event 2
Event 3
Event 4
Event 5

Myself (Group)
Event 1
Event 2
Event 3
Event 4
Event 5

Myself (Group)
Event 1
Event 2
Event 3
Event 4
Event 5
etc.)

What am I doing wrong?

Thanks. H. Jessen
"Now I know more, and I feel dummer"
 
I think you need an equi-join. Only matching records from the two tables show.

Paul
 


TO: PaulBricker

Tried that - same result. I am frustrated with this. It seems so simple, but I can't get it to work! Print the info from table_1 once, and then put the subreport in with all the details for that one person. But if I have 12 events in table_2, I get 12 events printed 12 times.

I have to figure out a way to eliminate the duplicates!

H. Jessen
"Now I know more, and I feel dummer"
 
Sorry H, I missed the subreport part. You shouldn't have any query that joins these tables if you are using a subreport. Your main Report should have a Record Source of Table1 and your SubReport should have a Record Source of Table2 and you should set the link Master/Child Property on the SSN field.

Paul
 


Okay, Paul. But what I am trying to do is report ONLY those who have events to report. Otherwise I get a page with the individuals name and the rest of the page is blank - a real waste of paper and toner from the laser printer.

Somehow, I need to code that if there is no event then go to the next person WITHOUT printing the info - I think.

Harry. H. Jessen
"Now I know more, and I feel dummer"
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top